/* =========================================================
   手机 / 平板样式（由主题设置里的「手机/平板断点」控制）
   header.php 通过 <link media="(max-width: 断点)"> 加载本文件
   本文件里的规则只在手机/平板生效，电脑版走 style.css
   ========================================================= */

body {
    width: 100%;
    background: #000;
    overflow-x: hidden;
}

.entry-content,
.entry-content p,
.entry-content div,
.entry-content pre,
.entry-content code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.entry-content pre {
    white-space: pre-wrap;
}

#head {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0 0 4px;
    background: #000;
}

#sitename {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    padding: 18px 15px 0;
    font-size: 22px;
    line-height: 1.4;
    text-align: center;
}

#sitedesc {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    width: auto;
    max-width: none;
    padding: 2px 15px 0;
    text-align: center;
}

/* 桌面导航在手机端隐藏，改用白卡里的 .nav-mobile */
#nav {
    display: none;
}

/* 手机导航：白卡顶部，占白卡外框 80%（左右各退 10%），一行排布 */
.nav-mobile {
    display: block;
    margin: 0 calc(-1 * var(--card-pad, 22px)) 18px;
}

.nav-mobile ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.nav-mobile li {
    margin: 0;
}

.nav-mobile li a,
.nav-mobile li .nav-text {
    display: block;
    padding: 3px 0;
    font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
    color: #777;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
}

.nav-mobile li a:hover,
.nav-mobile li.active a,
.nav-mobile li.active .nav-text {
    color: #3f3f3f;
    border-bottom-color: #999;
}

.nav-mobile li .nav-text {
    cursor: default;
}

.pageurl {
    display: none;
}

#contain {
    float: none;
    width: 100%;
    background: #000;
}

#containbg {
    float: none;
    width: 100%;
    background: #000;
    padding: 14px 0 26px;
}

#maincontent {
    --card-pad: 22px;
    display: block;
    float: none;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 0 auto;
    padding: 26px var(--card-pad);
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 16px;
    box-shadow: 0 0 0 4px #494949;
}

/* 手机端 #maincontent 不再是浮动元素，需要自己收住内部浮动（评论表单等） */
#maincontent::after {
    content: "";
    display: block;
    clear: both;
}

.entrypost,
.pagebox {
    float: none;
    width: 100%;
}

.listbox-table {
    float: none;
    width: 100%;
}

.listbox-table table {
    width: 100%;
}

.listbox-entry {
    font-size: 12px;
}

.listbox-table td:nth-child(2) {
    display: none;
}

.listbox-table td:nth-child(3) {
    width: 70px;
    font-size: 11px;
}

#copyright {
    float: none;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 26px 15px 36px;
    background: #000;
}

#copyright p {
    margin: 0;
    color: #8fa7b5;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}

#copyright p a {
    color: #b8d0df;
}

blockquote.ann {
    float: none;
    width: auto;
}

.messagebox {
    width: 100%;
    box-sizing: border-box;
}

.textarea1,
textarea {
    width: 100%;
    box-sizing: border-box;
}

input.text {
    width: 100%;
    box-sizing: border-box;
}

#comment-form table,
#comment-form tbody,
#comment-form tr,
#comment-form td {
    display: block;
    width: auto;
}

#comment-form .formbox-comment-rowheader {
    width: auto;
    min-width: 0;
    padding-right: 0;
    padding-bottom: 0;
    text-align: left;
}

#comment-form .formbox-comment-content {
    padding-top: 0;
}

#comment-form .formbox-comment-content input.text {
    margin-bottom: 8px;
}

.commentbox,
.trackbackbox {
    margin: 8px 0;
}

.commentbox-child {
    margin-left: 10px;
}

#commentForm {
    width: 100%;
}

.article-top {
    margin-bottom: 20px;
}

.prev-article,
.next-article {
    float: none;
    display: block;
    width: 100%;
}

.next-article {
    margin-top: 4px;
    text-align: right;
}
