@charset "UTF-8";
/*
Theme Name: 一本书 (Hexo)
Theme URI: https://x09.cn
Author: 零九
Author URI: https://x09.cn
Description: 由 WordPress 主题《一本书》移植至 Hexo
Version: 0.9-hexo
*/

/* ===== imgbox.css 内联 ===== */
.img_box {
    text-indent: 0;
    max-width: calc(100% - 1em);
    display: inline-block;
    position: relative;
    padding: 8px 8px 25px 8px;
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.2);
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    line-height:0;
    cursor:pointer;
}
.img_tape {
    position: absolute;
    height: 25px;
    width: 100px;
    z-index: 0;
    background-color: rgba(255,228,127,.8);
    -ms-transform: rotate(-40deg);
    -moz-transform: rotate(-40deg);
    -webkit-transform: rotate(-40deg);
    -o-transform: rotate(-40deg);
    transform: rotate(-40deg);
    pointer-events: none;
    box-shadow: 0 0 1px rgba(0,0,0,.1)
}
.img_tape_top {
    top: 5px;
    left: -30px
}
.img_tape_buttom {
    bottom: 5px;
    right: -35px
}
.img_title {
    position: absolute;
    bottom: 0;
    right: 20px;
    text-align: right;
    font-size: 12px;
    line-height: 25px;
    z-index: 0;
    color: #aaa
}
#img_top_box{
    position:absolute;
    background:rgba(0,0,0,0.5);
    z-index:99999;
    display:inline-block;
    transition: all 0.5s;
    padding: 8px 8px 25px 8px;
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.2);
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    line-height:0;
    cursor: pointer;
    box-sizing: content-box;
}
#img_top_box_bg{
    position:fixed;
    background:rgba(0,0,0,0.0);
    left:0;
    top:0;
    z-index:996;
    width:100%;
    height:100%;
    transition: all 0.5s;
    display:none;
}
#img_top_box_bg2{
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    z-index:997;
    display:none;
}
#img_top_box img{
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
}
#img_title_q{
    position: absolute;
    bottom: 0;
    right: 20px;
    text-align: right;
    font-size: 12px;
    line-height: 25px;
    color: #aaa
}
@media screen and (max-width: 768px) {
    .img_box>.img_tape{
        display: none;
    }
}

/* ===== style.css 主体 ===== */
:root{
    --base-backgrundcolor:#c4d4cf;
    --base-backgrundcolor-desk:#baccc5;
    --base-backgrundcolor-dark:#262626;
    --base-backgrundcolor-desk-dark:#222;
}
*, *:after, *:before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    height: 100%;
    width: 100%;
    font-size: 20px;
}
body {
    background: var(--base-backgrundcolor-desk);
    background-attachment: fixed;
    height: 100%;
    font-family: 'LXGW WenKai';
    overflow-y:scroll;
}

a {
    text-decoration: none;
    color: #009999
}

a:hover {
    text-decoration: none;
    color: #009999
}

/* 键盘焦点可见性（替代被移除的 *{outline:0}） */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #009999;
    outline-offset: 2px;
}

/* z-index 分层规范：
   10 内容区 / 20 侧栏 / 90 控件(m_nav,setup,music) / 100 页脚 / 290 移动底栏
   996-9999 图片放大遮罩 / 9999 loading */

#header {
    height: 110px;
    padding: 20px;
}

#header h1 {
    font-size: 30px
}
.header {
    font-weight: bold;
}
#home {
    position: relative;
    width: 720px;
    height: 900px;
}

#home>.description {
    position: absolute;
    display: flex;
    justify-content: center;
    bottom: calc(50% - 150px);
    width: 100%;
    height: 150px;
    line-height: 150px;
    font-size: 2.5em;
    text-align: center;
    transform: skewY(-6deg);
    font-weight: bold;
}

#catlog_bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100%;
    z-index: 20;
    opacity: 0.8;
}
#catlog_bg:hover{
    opacity: 1;
}
.catlog_bg_hide {
    left: -270px!important;
    opacity: 0.3!important;
    -webkit-transition-property: left,opacity;
    -webkit-transition-duration: 1.5s;
    transition-property: left,opacity;
    transition-duration: 1.5s;
}
.catlog_bg_show {
    left: 0px!important;
    opacity: 1!important;
    -webkit-transition-property: left,opacity;
    -webkit-transition-duration: 1.5s;
    transition-property: left,opacity;
    transition-duration: 1.5s;
}
.catlog_bg_show_fast {
    left: 0px!important;
    opacity: 1!important;
    -webkit-transition-property: left,opacity;
    -webkit-transition-duration: 0.5s;
    transition-property: left,opacity;
    transition-duration: 0.5s;
}
#m_nav {
    width: 50px;
    height:50px;
    position: fixed;
    bottom: 100px;
    left: 250px;
    z-index: 99;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
    cursor: pointer;
}

/* 侧栏关闭按钮：仅手机端显示，桌面端隐藏 */
#catlog_close {
    display: none;
}

.m_navb {
    height: 6px;
    position: absolute;
    background: rgb(97, 113, 128);
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
    border-radius: 2px;
}

.m_nav_a {
    left: 19px;
    top: 13px;
    width: 25px;
    transform: rotate(30deg)!important;
}

.m_nav_b {
    top: 20px;
    width: 40px;
    left: 5px;
}

.m_nav_c {
    left: 19px;
    top: 27px;
    width: 25px;
    transform: rotate(-30deg)!important;
}
.m_nav_sel{
    left: 400px!important;
}
.m_nav_sel>.m_navb {
    background: rgb(168, 151, 113)
}

.m_nav_sel>.m_nav_c {
    left: 5px;
    transform: rotate(30deg)!important;
}

.m_nav_sel>.m_nav_b {
    transform: rotate(0deg)!important;
}

.m_nav_sel>.m_nav_a {
    transform: rotate(-30deg)!important;
    left: 5px;
}
#catlogButton{
    position:absolute;
    top: 0;
    right:0;
    width: 0%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}
#catlog {
    position: relative;
    padding: 50px 20px;
    height: calc(100% - 110px);
    overflow-x: hidden;
    overflow-y: scroll;
    transition: all 1s;
    padding-bottom: 150px;
}

#catlog::-webkit-scrollbar {
    width: 2px;
    transition: all 1s
}


#catlog::-webkit-scrollbar-thumb {
    background: #618f8fa6;
}

#catlog ul, #catlog li {
    list-style-type: none
}

#catlog ul {
    width: 100%
}

#catlog>ul>li {
    position: relative;
    -webkit-transition-property: box-shadow;
    -webkit-transition-duration: 0.5s;
    transition-property: box-shadow;
    transition-duration: 0.5s;
    width: 300px;
    margin-left: 22px;
}

#catlog>ul>li>a {
    color: #000;
    display: block;
    position: relative;
    width: 100%;
    padding: 5px 5px;
    line-height: 30px;
}

#catlog .al_mon_list_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    background-color: #80ce8f;
    height: 100%
}

#catlog>ul>li>.select, #catlog>ul>li>a:hover {
    color: #000000;
    font-weight: bold;
}

#catlog>ul>li>a>span {
    display: block;
    position: relative;
    overflow: hidden;
    width: 200px;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none
}

#catlog h2 {
    margin-top: 20px
}

#catlog>ul>li>i {
    font-style: normal;
    position: absolute;
    padding: 5px 5px;
    right: 5px;
    pointer-events: none;
    line-height: 30px;
    z-index: 2
}

/* 文章日期：放到标题同一行右侧并靠右对齐 */
#catlog>ul>li>time {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 30px;
    color: #888;
    font-size: 13px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
}
html[data-theme="dark"] #catlog>ul>li>time {
    color: #8a8a8a;
}

.al_year {
    font-size: 26px;
    margin-top: 20px;
    margin-bottom: 10px
}

.al_age {
    font-size: 16px;
    padding-left: 10px
}

#am-post {
    min-height: 100%;
    -webkit-transition-property: opacity, margin-left;
    -webkit-transition-duration: 0.7s;
    transition-property: opacity, margin-left;
    transition-duration: 0.7s;
    z-index: 1;
    margin-left: 0;
    position: absolute;
    left: 470px;
    top: 0;
}

.post_am {
    opacity: 0;
    margin-left: 100px!important;
}

#pajx-post {
    min-height: 100%
}

#post {
    position: relative;
    width: 765px;
    height: 100%;
    -webkit-transition-property: box-shadow;
    -webkit-transition-duration: 1s;
    transition-property: box-shadow;
    transition-duration: 1s;
    font-size: 22px;
    color: #000;
    z-index: 0;
    overflow: hidden;
    background: var(--base-backgrundcolor);
    padding:0 30px;
    box-shadow:0px 0px 4px  #00000028;
}

#post>h2,
#post>#the_title {
    font-size: 40px;
    margin-top: 50px
}

.title-author a {
    color: #009999;
    font-weight: bold;
}

.title-author {
    position: absolute;
    width: 765px;
    padding: 20px 00px;
    padding-left: 30px;
    z-index: 5;
    -webkit-transition-property: box-shadow, border-bottom;
    -webkit-transition-duration: 1s;
    transition-property: box-shadow, border-bottom;
    transition-duration: 1s;
    margin-left: -30px;
    background: var(--base-backgrundcolor);
    /* 阅读进度条：从 0% 开始填充，由 JS 设置 --read-progress 变量 */
    --read-progress: 0%;
}

/* 标题背景进度条：半透明色块从左到右填充，宽度跟随阅读进度 */
.title-author::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--read-progress, 0%);
    background: rgba(0, 153, 153, 0.15);
    pointer-events: none;
    z-index: -1;
    transition: width 0.2s ease-out;
}

/* 标题最右端的竖线：标记进度条终点（滚动条结束处） */
.title-author::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 153, 153, 0.4);
    pointer-events: none;
}

.title-author-fixed {
    position: fixed;
    top: 0;
    border-bottom: 1px #222 dashed;
    box-shadow:0px 2px 4px  #0000005b;
}

.title-time {
    float: right;
    font-size: 16px;
    font-weight: normal;
    line-height: 52px;
    color: #666;
}
.title-read-line{
    position: absolute;
    top:20px;
    right: 180px;
}

/* WordPress block quote 兼容 + Hexo markdown blockquote */
.wp-block-quote,
.entry blockquote {
    border-left: 4px solid #666;
    color: #333;
    font-weight: normal;
    padding-left: 20px;
    margin: 42px 0;
    font-family: "楷体"!important;
    font-size: 22px!important;
    font-style: italic;
}

.wp-block-quote p,
.entry blockquote p {
    line-height: 42px;
    margin-left: -10px;
    padding-left: 10px
}

.wp-block-quote cite,
.entry blockquote cite {
    font-size: 18px;
    text-align: right;
    font-style: italic;
    color: #666;
    display: block;
    line-height: 42px;
    margin-left: -10px;
    padding-left: 10px
}
.wp-block-file{
    /* line-height: 42px; */
    /* margin-top: 21px; */
    margin-bottom: 0!important;
}
.wp-block-file__button{
    padding: 10px;
    font-size: 14px;
}
.wp-block-file{
    margin-bottom: 42px!important;
    margin-top: 42px;
    text-align: center;
}
.entry {
    margin-top: 68px;
    padding-top: 42px;
    padding-left: 15px;
    padding-right: 10px;
    line-height: 42px;
    position: relative;
}

.entry>p {
    line-height: 42px!important;
    text-indent: 2em;
    letter-spacing: 0.05em;
    margin-bottom: 42px
}

.entry h2, .entry h3, .entry h4, .entry h5, .entry h6, .entry h7 {
    margin-bottom: 42px;
    margin-top: 42px;
    line-height: 42px;
}
.entry_line{
    position: absolute;
    display: inline-block;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-image: url(../img/line.png);
}
#read_line {
    background: #333;
    width: 8px;
    height: 250px;
    position: fixed;
    top: calc(50% - 125px);
    margin-left: -110px;
    border-radius: 4px;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, .4)
}

.read_line_box {
    background-color: green;
    height: 8px;
    min-height: 8px!important;
    border-radius: 4px;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, .4);
    transition: 0.1s
}

.post_end {
    text-align: center;
    font-size: 30px;
    padding: 30px 0px
}

.previous_next {
    width: 100%;
    height: 50px
}

.previous_next>span {
    width: 50%;
    text-align: center
}
#comment{
    height: 90px;
}

.comments_box .fn {
    padding-right: 10px
}

.comment-author {
    display: flex
}

#comments,
.comments-heading {
    line-height: 50px;
    font-size: 16px
}

.comment-body {
    position: relative
}

.comment-body p {
    padding: 0 20px;
    line-height: 42px
}

.comment-meta {
    font-weight: normal;
    font-size: 12px;
    position: absolute;
    right: 0;
    top: 0
}

.comment-meta a {
    color: #666
}

.commentlist, .commentlist li {
    list-style-type: none;
    font-size: 16px;
    line-height: 16px;
}

.commentlist li {
    margin-bottom: 20px;
    padding: 5px;
    border: 1px dashed rgba(255, 0, 0, 0.445)
}

.commentlist .fn {
    font-weight: bold;
    font-style: normal
}

.comment-notes {
    font-size: 12px
}

.comment-form {
    display: block
}

.comment-form-comment>textarea, .comment-form-author>input, .comment-form-email>input, .comment-form-url>input {
    background: #c4d4cf;
    border: 1px dashed rgba(255, 0, 0, 0.445);
    margin-top: 10px;
    width: 100%;
    font-size: 16px;
    padding: 10px;
    font-family: "LXGW WenKai";
}

.comment-form-comment>label {
    display: none
}

.comment-form input {
    max-width: 100%;
    padding: 10px;
    margin-top: 5px
}

textarea {
    resize: vertical
}

.comment-form-author, .comment-form-email, .comment-form-url {
    width: calc(33.3333333% - 10px);
    float: left;
    margin-top: 5px;
    font-size: 14px
}

.comment-form-author, .comment-form-email {
    margin-right: 15px
}

.comment-form-cookies-consent {
    clear: both;
    font-size: 14px;
    padding: 10px 0
}

.form-submit input {
    width: 100%;
    cursor: pointer;
    background-color: rgba(144, 173, 173, 0.404);
    border:0;
    outline:none;
}

.comment-respond {
    overflow: hidden;
    margin: 50px 0;
    clear: both;
    transition: all 1s
}

#reply-title {
    cursor: pointer
}

.comment_focus {
    color: #000000!important;
    background: #ffffff!important
}

#login {
    position: fixed;
    z-index: 101;
    right: 0px;
    top: 0;
    font-size: 14px;
    color: rgba(102, 102, 102, 0.8);
    padding: 5px 10px
}

#login a {
    color: #666
}

#footer {
    position: fixed;
    z-index: 101;
    bottom: 0;
    font-size: 14px;
    color: rgba(102, 102, 102, 0.8);
    padding: 5px 10px;
    writing-mode:vertical-lr;
    right: 0;
}
#footer span{
    margin-bottom: 10px;
}
#footer a {
    color: rgba(102, 102, 102, 0.904)
}

.footer_wp {
    margin-right: 20px
}
#footer_m{
    display: none;
}
/* 文章返回按钮：默认隐藏，仅手机端文章页显示 */
#back_fab {
    display: none;
}
#wechatbox {
    cursor: pointer
}

#wechat {
    display: none;
    position: absolute;
    top: -54px;
    margin-left: -138px
}

#wechat img {
    width: 128px;
    height: 128px
}

.icp {
    color: #fff!important;
    margin-left: 20px
}

.wp-block-image {
    text-align: center
}
.wp-block-image .img_box{
     max-width: 600px;
}
/* 图片宽度不超出 .img_box 容器（与 #img_top_box img 一致） */
.img_box img {
    max-width: 100%;
    height: auto;
}
/* Hexo markdown 把图片放进 <p>，此处居中并去除段落首行缩进 */
.entry>p.entry-img-p {
    text-align: center;
    text-indent: 0;
}

#nprogress .spinner {
    left: 810px;
    top: calc(50% - 25px)
}

#nprogress .spinner-icon {
    width: 50px;
    height: 50px
}

#setup {
    position: fixed;
    top: 20px;
    /* 贴在文章栏右侧，避免与右侧竖向页脚重叠 */
    left: 1240px;
    right: auto;
    z-index: 98;
    font-size: 20px;
    transition: 0.5s;
}

#setup-set {
    color: var(--base-backgrundcolor);
    font-size: 24px;
    font-family: 'font1680';
    border-radius: 2px;
    font-weight: bold;
    background-color: rgba(144, 173, 173, 0.404);
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 1px;
    cursor: pointer
}

/* 明暗模式切换按钮（放在"字"按钮下方） */
#theme-toggle {
    color: var(--base-backgrundcolor);
    font-size: 20px;
    border-radius: 2px;
    background-color: rgba(144, 173, 173, 0.404);
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 1px;
    cursor: pointer;
    margin-top: 10px;
    user-select: none;
}
/* auto 模式（无 data-theme）：跟随系统显示图标 */
#theme-toggle::after {
    content: "月";
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) #theme-toggle::after {
        content: "日";
    }
}

#setup-box {
    position: absolute;
    top: 0;
    left: 50px;
    right: auto;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 1s
}

.setup-box {
    opacity: 1!important;
    pointer-events: auto!important;
}

.setup-font {
    margin-top: 10px;
    display: flex
}
/* 弹出面板内第一个 .setup-font 顶部对齐按钮，不留 margin */
#setup-box > .setup-font:first-child {
    margin-top: 0;
}
#setup-fontfamily-yahei{
    font-family: '微软雅黑';
}
#setup-fontfamily-song {
    font-family: '宋体';
    line-height: 26px
}

#setup-fontfamily-fangsong {
    font-family: 'LXGW WenKai';
    line-height: 27px;
}

.setup-font-box {
    position: relative;
    display: inline-block;
    padding: 10px;
    width: 50px;
    text-align: center;
    cursor: pointer;
    background-color: rgba(146, 132, 132, 0.377);
    margin-right: 5px;
    justify-content: space-around;
    border-radius: 2px;
}

.setup-font-box-sel {
    background-color: green;
    color: ivory;
}

/* 系统暗色：手动选明亮时不套用（html[data-theme=light]） */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) body {
        background: var(--base-backgrundcolor-desk-dark);
        color: #616161;
    }

    html:not([data-theme="light"]) a {
        text-decoration: none;
        color: #234646
    }

    html:not([data-theme="light"]) a:hover {
        text-decoration: none;
        color: #234646
    }
    html:not([data-theme="light"]) #catlog>ul>li>a {
        color: #6b6b6b;
    }
    html:not([data-theme="light"]) #catlog>ul>li>.select,
    html:not([data-theme="light"]) #catlog>ul>li>a:hover {
        color: #6d6d6d;
    }
    html:not([data-theme="light"]) #post{
        color: #6b6b6b;
        background-color: var(--base-backgrundcolor-dark);
    }
    html:not([data-theme="light"]) #catlog .al_mon_list_bg {
        background-color: #1f3022;
    }
    html:not([data-theme="light"]) .title-author{
        background-color: var(--base-backgrundcolor-dark);
    }
    html:not([data-theme="light"]) .title-author::before {
        background: rgba(180, 180, 180, 0.12);
    }
    html:not([data-theme="light"]) .title-author::after {
        background: rgba(0, 153, 153, 0.5);
    }
    html:not([data-theme="light"]) .title-author a {
        color: #3a7a7a;
    }
    html:not([data-theme="light"]) .comment-form-comment>textarea,
    html:not([data-theme="light"]) .comment-form-author>input,
    html:not([data-theme="light"]) .comment-form-email>input,
    html:not([data-theme="light"]) .comment-form-url>input {
        background: #262928;
        border: 1px dashed rgba(66, 0, 0, 0.445);
    }
    html:not([data-theme="light"]) .form-submit input {
        background-color: rgba(41, 49, 49, 0.404);
        color: #616161;
    }
    html:not([data-theme="light"]) #wp-comment-cookies-consent{
        background: red;
    }
    html:not([data-theme="light"]) #setup-set,
    html:not([data-theme="light"]) #theme-toggle {
        color: var(--base-backgrundcolor-desk-dark);
        background-color: rgba(66, 80, 80, 0.404);
    }
    html:not([data-theme="light"]) .setup-font-box-sel {
        background-color: rgb(0, 53, 0);
        color: #616161;
    }
    html:not([data-theme="light"]) .entry_line{
        background-image: url(../img/line_dark.png);
    }
    html:not([data-theme="light"]) .m_navb {
        background: rgb(45, 52, 59);
    }

    html:not([data-theme="light"]) .m_nav_sel>.m_navb {
        background: rgb(85, 76, 57)
    }
    html:not([data-theme="light"]) #catlog::-webkit-scrollbar-thumb {
        background: #283a3aa6;
    }
    html:not([data-theme="light"]) .wp-block-quote,
    html:not([data-theme="light"]) .entry blockquote{
        color: #6b6b6b;
    }

}
/* 手机端主页目录：系统暗色下的背景（手动明亮时不套用） */
@media screen and (max-width:768px) and (prefers-color-scheme: dark){
    html:not([data-theme="light"]) #catlog_bg {
        background: var(--base-backgrundcolor-desk-dark)!important;
    }
    html:not([data-theme="light"]) #catlog>ul>li {
        background: var(--base-backgrundcolor-dark)!important;
    }
    html:not([data-theme="light"]) .title-author-fixed{
        background-color: var(--base-backgrundcolor-desk-dark)!important;
    }
    html:not([data-theme="light"]) #header {
        background-color: var(--base-backgrundcolor-desk-dark)!important;
    }
    html:not([data-theme="light"]) #back_fab {
        background-color: var(--base-backgrundcolor-dark)!important;
        color: #6b9e9e;
    }
}

/* ===== 手动明暗模式（覆盖系统偏好） ===== */

/* 手动暗色：复制 @media(prefers-color-scheme:dark) 的规则 */
html[data-theme="dark"] body {
    background: var(--base-backgrundcolor-desk-dark);
    color: #616161;
}
html[data-theme="dark"] a,
html[data-theme="dark"] a:hover {
    color: #234646;
}
html[data-theme="dark"] #back_fab {
    background-color: var(--base-backgrundcolor-dark);
    color: #6b9e9e;
}
html[data-theme="dark"] #catlog>ul>li>a {
    color: #6b6b6b;
}
html[data-theme="dark"] #catlog>ul>li>.select,
html[data-theme="dark"] #catlog>ul>li>a:hover {
    color: #6d6d6d;
}
html[data-theme="dark"] #post {
    color: #6b6b6b;
    background-color: var(--base-backgrundcolor-dark);
}
html[data-theme="dark"] #catlog .al_mon_list_bg {
    background-color: #1f3022;
}
html[data-theme="dark"] .title-author {
    background-color: var(--base-backgrundcolor-dark);
}
html[data-theme="dark"] .title-author a {
    color: #3a7a7a;
}
/* 暗色模式下进度条填充用偏灰的浅色，与青绿色链接拉开对比，避免链接字看不清 */
html[data-theme="dark"] .title-author::before {
    background: rgba(180, 180, 180, 0.12);
}
html[data-theme="dark"] .title-author::after {
    background: rgba(0, 153, 153, 0.5);
}
html[data-theme="dark"] .comment-form-comment>textarea,
html[data-theme="dark"] .comment-form-author>input,
html[data-theme="dark"] .comment-form-email>input,
html[data-theme="dark"] .comment-form-url>input {
    background: #262928;
    border: 1px dashed rgba(66, 0, 0, 0.445);
}
html[data-theme="dark"] .form-submit input {
    background-color: rgba(41, 49, 49, 0.404);
    color: #616161;
}
html[data-theme="dark"] #wp-comment-cookies-consent {
    background: red;
}
html[data-theme="dark"] #setup-set,
html[data-theme="dark"] #theme-toggle {
    color: var(--base-backgrundcolor-desk-dark);
    background-color: rgba(66, 80, 80, 0.404);
}
html[data-theme="dark"] .setup-font-box-sel {
    background-color: rgb(0, 53, 0);
    color: #616161;
}
html[data-theme="dark"] .entry_line {
    background-image: url(../img/line_dark.png);
}
html[data-theme="dark"] .m_navb {
    background: rgb(45, 52, 59);
}
html[data-theme="dark"] .m_nav_sel>.m_navb {
    background: rgb(85, 76, 57);
}
html[data-theme="dark"] #catlog::-webkit-scrollbar-thumb {
    background: #283a3aa6;
}
html[data-theme="dark"] .wp-block-quote,
html[data-theme="dark"] .entry blockquote {
    color: #6b6b6b;
}
html[data-theme="dark"] #theme-toggle::after {
    content: "日";
}
/* 手动暗色：手机端主页目录背景 */
@media screen and (max-width:768px) {
    html[data-theme="dark"] #catlog_bg {
        background: var(--base-backgrundcolor-desk-dark) !important;
    }
    html[data-theme="dark"] #catlog>ul>li {
        background: var(--base-backgrundcolor-dark) !important;
    }
    html[data-theme="dark"] .title-author-fixed {
        background-color: var(--base-backgrundcolor-desk-dark) !important;
    }
    html[data-theme="dark"] #back_fab {
        background-color: var(--base-backgrundcolor-dark) !important;
        color: #6b9e9e;
    }
}

/* 手动亮色：在系统暗色时强制亮色（覆盖 @media 规则） */
html[data-theme="light"] body {
    background: var(--base-backgrundcolor-desk);
    color: #000;
}
html[data-theme="light"] a,
html[data-theme="light"] a:hover {
    color: #009999;
}
html[data-theme="light"] #catlog>ul>li>a {
    color: #000;
}
html[data-theme="light"] #catlog>ul>li>.select,
html[data-theme="light"] #catlog>ul>li>a:hover {
    color: #000000;
}
html[data-theme="light"] #post {
    color: #000;
    background-color: var(--base-backgrundcolor);
}
html[data-theme="light"] #catlog .al_mon_list_bg {
    background-color: #80ce8f;
}
html[data-theme="light"] .title-author {
    background-color: var(--base-backgrundcolor);
}
html[data-theme="light"] .title-author a {
    color: #009999;
}
html[data-theme="light"] .entry_line {
    background-image: url(../img/line.png);
}
html[data-theme="light"] .m_navb {
    background: rgb(97, 113, 128);
}
html[data-theme="light"] .m_nav_sel>.m_navb {
    background: rgb(168, 151, 113);
}
html[data-theme="light"] #catlog::-webkit-scrollbar-thumb {
    background: #618f8fa6;
}
html[data-theme="light"] #setup-set,
html[data-theme="light"] #theme-toggle {
    color: var(--base-backgrundcolor);
    background-color: rgba(144, 173, 173, 0.404);
}
html[data-theme="light"] .setup-font-box-sel {
    background-color: green;
    color: ivory;
}
html[data-theme="light"] #theme-toggle::after {
    content: "月";
}
/* 手动亮色：手机端主页目录（压过系统暗色 !important） */
@media screen and (max-width:768px) {
    html[data-theme="light"] #catlog_bg {
        background: var(--base-backgrundcolor-desk) !important;
    }
    html[data-theme="light"] #catlog>ul>li {
        background: var(--base-backgrundcolor) !important;
    }
    html[data-theme="light"] .title-author-fixed {
        background-color: var(--base-backgrundcolor-desk) !important;
    }
    html[data-theme="light"] #back_fab {
        background-color: var(--base-backgrundcolor) !important;
        color: #009999;
    }
}

@media screen and (max-width:768px) {
    /* ===== 手机端：极简布局，无动画，无 PJAX ===== */
    /* 首页：全屏目录列表；文章页：全屏文章，无侧栏 */

    * {
        -webkit-transition: none !important;
        transition: none !important;
    }

    body {
        overflow-x: hidden;
        background-attachment: fixed;
    }

    /* loading 遮罩：手机端隐藏（无 PJAX，直接跳转） */
    #loading { display: none !important; }

    /* 侧栏：首页显示（全屏目录），文章页彻底隐藏 */
    #catlog_bg {
        position: static !important;
        width: 100%;
        left: 0;
        opacity: 1;
        height: auto;
        transform: none;
        background: var(--base-backgrundcolor-desk);
    }
    /* 文章页：彻底隐藏侧栏，不占空间 */
    body.layout-post #catlog_bg,
    body.layout-page #catlog_bg {
        display: none !important;
    }

    /* 侧栏内目录：等宽留白、列表铺满居中 */
    #catlog {
        position: relative;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 16px 12px 24px;
        font-size: 18px;
        overflow: visible;
        box-sizing: border-box;
    }
    #catlog ul.al_mon_list {
        padding: 0;
        margin: 0;
        list-style: none;
        width: 100%;
    }
    #catlog > ul > li {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 56px;
        background-color: var(--base-backgrundcolor);
        box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
        margin: 0 0 8px 0 !important; /* 覆盖桌面 margin-left:22px，避免左右不对称 */
        display: flex;
        align-items: center;
        padding: 0 12px;
        border-radius: 5px;
        box-sizing: border-box;
    }
    #catlog > ul > li > a {
        width: 100%;
        padding: 5px 0;
    }
    #catlog > ul > li > a > span {
        width: auto;
        max-width: calc(100% - 64px); /* 给右侧日期留空 */
    }
    #catlog > ul > li > time {
        right: 12px;
    }
    .al_year {
        margin-bottom: 16px;
        text-align: center;
        font-size: 24px;
    }

    /* 关闭按钮、m_nav、旧底栏：手机端隐藏 */
    #catlog_close,
    #m_nav,
    #footer_m {
        display: none !important;
    }

    /* 文章区：全屏，从顶部开始 */
    #am-post {
        position: relative;
        width: 100%;
        left: 0;
        top: 0;
    }
    /* 首页：隐藏空文章区，去掉底部大片空白（原 min-height:100%） */
    body.layout-index #am-post {
        display: none !important;
    }
    .post_am {
        opacity: 1;
        margin-left: 0;
    }
    #pajx-post {
        min-height: 0;
    }
    body.layout-post #pajx-post,
    body.layout-page #pajx-post {
        min-height: 100%;
    }

    /* 文章卡片 */
    #post {
        position: relative;
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
        left: 0;
        overflow-x: hidden;
    }
    #post > #the_title {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
        font-size: 26px;
    }

    /* 作者信息栏 */
    .title-author {
        position: relative;
        width: 100%;
        margin-left: 0;
        padding: 10px 15px;
        font-size: 16px;
        line-height: 20px;
        box-sizing: border-box;
    }
    .title-author-fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 100;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
        border-bottom: 1px dashed rgba(0, 153, 153, 0.3);
        background-color: var(--base-backgrundcolor-desk);
        padding-left: 15px;
        /* 右侧留给滚动百分比，避免与下方设置按钮抢位 */
        padding-right: 56px;
    }

    /* 站点标题栏：隐藏 */
    #header {
        display: none;
    }
    .header_sel {
        display: none;
    }

    /* 首页大标语：隐藏，只显示目录 */
    #home {
        display: none;
    }

    /* 桌面页脚：隐藏 */
    #footer {
        display: none;
    }

    /* 文章页右下角返回按钮 */
    #back_fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: max(16px, env(safe-area-inset-right));
        bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
        z-index: 290;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--base-backgrundcolor);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        color: #009999;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    #back_fab svg {
        width: 20px;
        height: 20px;
        display: block;
    }

    /* 字号 / 明暗：下移避开吸顶标题与滚动百分比，并抬高层级 */
    #setup {
        display: block;
        position: fixed;
        top: max(56px, calc(48px + env(safe-area-inset-top)));
        right: max(12px, env(safe-area-inset-right));
        left: auto;
        z-index: 400;
        opacity: 1;
    }
    #setup-set,
    #theme-toggle {
        position: relative;
        z-index: 401;
    }
    #setup-box {
        right: 50px;
        left: auto;
        z-index: 402;
    }
    /* 首页只显示明暗切换，字号面板在无文章时意义不大 */
    body.layout-index #setup-set,
    body.layout-index #setup-box {
        display: none;
    }

    /* 唱片机：隐藏 */
    #music_x09 {
        display: none;
    }

    /* 发布时间：隐藏 */
    .title-time {
        display: none;
    }

    /* 阅读进度百分比位置 */
    .title-read-line {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    /* 正文 */
    .entry {
        margin-top: 30px;
    }
    .wp-block-quote,
    .entry blockquote {
        width: 100%;
    }
}

/* ===== Hexo 归档/分页页面附加样式 ===== */
.page-title {
    font-size: 30px;
    margin: 40px 30px 20px;
    color: #000;
}
.taxonomy-description {
    margin: 0 30px 20px;
    color: #555;
    font-size: 18px;
}
.archive-item {
    margin: 15px 30px;
    font-size: 20px;
    line-height: 30px;
}
.archive-item a {
    color: #009999;
}
.archive-date {
    color: #888;
    font-size: 14px;
    margin-left: 10px;
}
.pagination {
    text-align: center;
    margin: 40px 0;
    font-size: 16px;
}
.pagination a, .pagination .page-number {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    color: #009999;
    border: 1px dashed rgba(0,153,153,0.4);
    border-radius: 3px;
}
.pagination a:hover {
    background-color: rgba(0,153,153,0.1);
}

/* Hexo highlight.js 代码块样式微调，适配一本书主题 */
.entry figure,
.entry pre {
    text-indent: 0;
    margin: 21px 0;
    background: #f6f6f6;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 16px;
    line-height: 1.5;
}
.entry code {
    text-indent: 0;
    font-family: Consolas, Monaco, "Courier New", monospace;
}
.entry table {
    text-indent: 0;
    border-collapse: collapse;
    margin: 21px 0;
    width: 100%;
}
.entry table th, .entry table td {
    border: 1px solid #bbb;
    padding: 8px 12px;
}

/* ===== 404 页面 ===== */
#am-post #404 {
    font-size: 120px;
    font-weight: bold;
    text-align: center;
    color: #009999;
    margin: 80px 30px 20px;
    line-height: 1.2;
}
#am-post .error-404-text {
    text-align: center;
    color: #666;
    font-size: 20px;
    margin: 0 30px 30px;
}
#am-post .error-404-text a {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 24px;
    border: 1px dashed #009999;
    border-radius: 3px;
}

/* ===== 尊重减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 静态评论：书本批注风格 ===== */
.comments_box .annotation-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.annotation-item {
    position: relative;
    margin-bottom: 42px;
    padding-left: 28px;
    line-height: 42px;
    /* 左侧虚线引导线，模拟书页边距的批注 */
    border-left: 1px dashed rgba(0, 153, 153, 0.35);
}

.annotation-item.annotation-reply {
    margin-left: 32px;
    border-left-color: rgba(0, 153, 153, 0.25);
}

.annotation-meta {
    font-size: 14px;
    line-height: 28px;
    color: #666;
    margin-bottom: 4px;
}

.annotation-author {
    font-weight: bold;
    color: #009999;
    margin-right: 12px;
}

.annotation-author[target="_blank"] {
    text-decoration: underline dotted;
}

.annotation-date {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    color: #999;
    margin-right: 12px;
}

.annotation-reply-to {
    font-size: 13px;
    color: #999;
}

.annotation-reply-to::before {
    content: "↳ ";
    color: #bbb;
}

.annotation-content {
    text-indent: 0;
    letter-spacing: 0.03em;
    word-break: break-word;
}

/* 暗色模式：系统偏好 */
@media (prefers-color-scheme: dark) {
    .annotation-item {
        border-left-color: rgba(0, 153, 153, 0.3);
    }
    .annotation-meta {
        color: #999;
    }
    .annotation-date,
    .annotation-reply-to {
        color: #777;
    }
    .annotation-reply-to::before {
        color: #555;
    }
}

/* 暗色模式：手动切换 */
html[data-theme="dark"] .annotation-item {
    border-left-color: rgba(0, 153, 153, 0.3);
}
html[data-theme="dark"] .annotation-meta {
    color: #999;
}
html[data-theme="dark"] .annotation-date,
html[data-theme="dark"] .annotation-reply-to {
    color: #777;
}
html[data-theme="dark"] .annotation-reply-to::before {
    color: #555;
}

/* 移动端：回复缩进收窄 */
@media screen and (max-width: 768px) {
    .annotation-item {
        padding-left: 16px;
        margin-bottom: 28px;
    }
    .annotation-item.annotation-reply {
        margin-left: 16px;
    }
    .annotation-meta {
        font-size: 13px;
    }
}

/* ===== 极简自托管评论表单 ===== */
.comment-form {
    max-width: 100%;
    margin-top: 1em;
}
.comment-form input[type=text],
.comment-form input[type=url],
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: var(--base-backgrundcolor);
    border: 1px dashed #009999;
    border-radius: 3px;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}
.comment-form textarea {
    resize: vertical;
    min-height: 80px;
}
.comment-form button {
    padding: 8px 24px;
    background: rgba(0, 153, 153, 0.4);
    color: #fff;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}
.comment-form button:hover {
    background: rgba(0, 153, 153, 0.6);
}
.comment-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.comment-msg {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    min-height: 1em;
}
/* 暗色模式：手动切换 */
html[data-theme="dark"] .comment-form input[type=text],
html[data-theme="dark"] .comment-form input[type=url],
html[data-theme="dark"] .comment-form textarea {
    background: #333;
    color: #eee;
    border-color: #2a5a5a;
}
html[data-theme="dark"] .comment-msg {
    color: #999;
}
/* 暗色模式：系统偏好 */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .comment-form input[type=text],
    html:not([data-theme="light"]) .comment-form input[type=url],
    html:not([data-theme="light"]) .comment-form textarea {
        background: #333;
        color: #eee;
        border-color: #2a5a5a;
    }
    html:not([data-theme="light"]) .comment-msg {
        color: #999;
    }
}

