.updates-list {
    margin-top: 50px;
}

.reply-box p {
    margin-top: 0;
}

/* =========================
   评论模块通用样式
   ========================= */
.post-updates-title h3 {
    font-size: 28px;
}

.post-updates-title h4 {
    font-size: 22px;
}

.latest-updates {
    margin-top: 20px;
}

.latest-updates li:first-child .updates-box {
    border-top: 0;
    padding-top: 0;
}

.latest-updates li.children {
    margin-left: 85px;
}

@media (max-width: 768px) {
    .latest-updates li.children {
        margin-left: 0;
    }
}

/* =========================
   头像、角色标签
   ========================= */
.updates-avatar {
    position: relative;
    float: left;
    margin-right: 20px;
}

.updates-avatar img {
    border-radius: 50%;
    width: 60px;
}

@media (max-width: 575px) {
    .updates-avatar img {
        width: 48px;
    }
}

/* 角色标签颜色 */
.badge-role {
    position: absolute;
    right: -6px;
    bottom: -1px;
    padding: 2px 5px 2px 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 0 0 2px #fff;
}

@media (max-width: 768px) {
    .badge-role {
        font-size: 9px;
    }
}


.role-admin {
    background: #f60d32;
}

.role-mod {
    background: #3f51b5;
}

.role-super {
    background: #f9bd25;
}

.role-user {
    background: #3ab519;
}

.role-owner {
    background: #732ff5;
}

.role-anon {
    background: #616161;
}

/* =========================
   评论内容/文本
   ========================= */
.updates-text {
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-top: 20px;
}

.updates-text p {
    margin-top: 10px !important;
    font-size: 18px;
    color: #444;
}

/* =========================
    回复框
   ========================= */
.reply-text {
    overflow: hidden;
    border-bottom: 1px solid #f1f0f7;
    padding-bottom: 20px;
    margin-top: 20px;
}

.reply-text p {
    margin-bottom: 12px !important;
    font-size: 15px;
    color: #444;
}

/* =========================
   评论输入框（主/回复）
   ========================= */
.updates-input,
.reply-input {
    margin-top: 4px;
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 14px;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 15px 20px;
    border-radius: 12px;
    line-height: 20px;
    box-sizing: border-box;
    font-weight: 400;
    background: var(--hljs-background);
    color: var(--text-color);
    word-wrap: break-word !important;
    white-space: pre-line !important;
    overflow-wrap: break-word !important;
}

.updates-input {
    min-height: 50px;
    height: 130px;
}

.reply-input {
    height: 50px;
    margin-top: 10px;
}

.updates-input::placeholder,
.reply-input::placeholder {
    color: var(--text-color);
}

@media (max-width: 575px) {
    .updates-input,
    .reply-input {
        font-size: 12px;
    }

    .updates-input::placeholder,
    .reply-input::placeholder {
        font-size: 12px;
        line-height: 16px;
    }
}

.hidden {
    display: none
}

/* 图片网格 */
.updates-images-grid {
    --tile: 110px;
    --gap: 12px;
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(var(--tile), 1fr));
    gap: var(--gap);
    margin-top: 4px;
    margin-bottom: 12px;
    border: 1px dashed #d0d7de;
    border-radius: 12px;
    padding: 12px;
    transition: border-color .2s, background-color .2s;
}

.updates-images-grid.dragover {
    border-color: #4636ff;
    background: rgba(90, 103, 255, .06);
}

/* 单张卡片 */
.img-tile {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f7fa;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.img-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 删除按钮 */
.img-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    opacity: .9;
    transition: opacity .2s;
}

.img-remove:hover {
    opacity: 1
}

/* 添加卡片（永久存在） */
.add-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #cbd5e1;
    background: linear-gradient(135deg, #fafafa, #f7f7f7);
}

.add-tile i {
    font-size: 28px;
    margin-bottom: 6px;
    color: #4636ff
}

.add-tile span {
    font-size: 12px;
    color: #888
}

.add-tile:hover {
    box-shadow: inset 0 0 0 1px #4636ff
}

/* 提示 */
.img-hint {
    font-family: Menlo, "JetBrains Mono", monospace;
    color: #333;
    font-size: 13px;
    margin-top: 6px
}

/* 关闭按钮样式修正（避免白底） */
.gallery-overlay button {
    font: inherit;
    border: none;
    outline: none;
    background: transparent;
    appearance: none
}

.gallery-close {
    position: absolute;
    top: 22px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .08s;
    box-shadow: none
}

.gallery-close:hover {
    background: rgba(255, 255, 255, .18)
}

.gallery-close i {
    font-size: 28px;
    line-height: 1;
    color: #fff;
    background: none;
    pointer-events: none
}

/* =========================
   评论按钮
   ========================= */
.reply-button {
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 14px;
    width: auto;
    min-width: 72px;
    height: 50px;
    border: 0;
    outline: 0;
    padding: 0 20px;
    line-height: 50px;
    border-radius: 15px;
    box-sizing: border-box;
    font-weight: 500;
    background: #4636ff;
    color: #fff;
    margin-top: 10px;
    margin-right: 2px;
}

.reply-button:hover {
    background: #ffffff;
    color: #4636ff;
    outline: 2px solid #4636ff;
}

.close-button,
.expand-button {
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 15px;
    width: auto;
    min-width: 34px;
    height: 28px;
    border: 0;
    outline: 0;
    margin-top: 2px;
    padding: 5px;
    border-radius: 15px;
    box-sizing: border-box;
    font-weight: 500;
    margin-left: 5px;
    background: orangered;
    color: #fff;
    margin-right: 2px;
}

.expand-button {
    background: #e6e6e6;
    color: #333;
}


.close-button:hover {
    background: #fff;
    color: orangered;
    outline: 2px solid orangered;
}

.expand-button:hover {
    background: #333;
    color: #fff;
    transform: scale(1.05);
}

.z-btn-updates {
    display: inline-block;
    height: 54px;
    line-height: 48px;
    border: 2px solid #4636ff;
    background: #4636ff;
    color: #ffffff;
    padding: 0 30px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 72px;
    text-align: center;
}

.z-btn-updates:hover {
    background: #ffffff;
    color: #4636ff;
}


/* =========================
   评论元信息（名称、时间、签名）
   ========================= */
.avatar-name {
    overflow: hidden;
    position: relative;
}

.avatar-name h5 {
    font-size: 21px;
    margin-bottom: 1px;
    margin-top: 2px;
    color: var(--text-color);
}

.time-meta {
    font-size: 16px;
    font-weight: 600;
    color: #889;
}

.place-meta {
    display: block; /* 让位置换到下一行 */
    margin-top: 4px;
    font-size: 13px; /* 比时间略小 */
    color: #888; /* 次要信息用浅灰 */
}

@media (max-width: 768px) {
    .time-meta {
        font-size: 14px;
    }
    .place-meta {
        font-size: 12px;
    }
}

.signature-meta {
    padding-bottom: 4px;
    font-size: 15px;
    font-weight: 450;
    color: var(--text-color);
}

.post-meta {
    margin-top: 24px;
    margin-bottom: 18px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.avatar-name .post-meta {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

@media (max-width: 575px) {
    .post-meta {
        font-size: 14px;
    }

    .avatar-name .post-meta {
        font-size: 13px;
        font-weight: 500;
    }
}

/* =========================
   评论操作
   ========================= */
.updates-reply {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 15px;
}

.updates-right {
    float: right;
    margin-top: 2px;
    margin-left: 15px;
    margin-right: 0 !important;
}

@media (max-width: 575px) {
    .updates-reply {
        font-size: 13px;
        margin-right: 10px;
    }

    .updates-right {
        margin-left: 15px;
    }
}

.updates-reply i {
    padding-right: 4px;
}

.updates-reply:hover {
    color: #4636ff;
}

.updates-copied,
.fa-check {
    color: #28a745;
}

.updates-likes i {
    color: orangered;
}

.updates-stars i {
    color: #f9bd25;
}

.updates-blue {
    color: #4636ff;
}

.act-like:hover i {
    color: orangered;
}

.act-star:hover i {
    color: #f9bd25;
}

/* =========================
   评论标签
   ========================= */
.updates-tag {
    font-family: -apple-system, "Inter", "PingFang SC", "LXGW Neo XiHei", sans-serif;
    display: inline-block;
    min-width: 40px;
    padding: 1px 5px;
    font-weight: 550;
    color: #555;
    text-align: center;
    position: relative;
    cursor: default;
    transition: transform .3s ease;
    background: #eee;
    border-radius: 5px;
    margin-right: 5px;
}

/* =========================
   发表新评论输入框（表单）
   ========================= */
.post-input input,
.post-input textarea {
    width: 100%;
    height: 50px;
    max-height: 300px;
    line-height: 50px;
    padding: 0 30px;
    border-radius: 10px;
    border: 2px solid #f9f9f9;
    background: #f9f9f9;
    margin-bottom: 20px;
}

.post-input input::placeholder,
.post-input textarea::placeholder {
    font-weight: 500;
    color: #686777;
}

.post-input input:focus,
.post-input textarea:focus {
    border-color: #4636ff;
    outline: none;
    background: #ffffff;
}

.post-input input:focus::placeholder,
.post-input textarea:focus::placeholder {
    opacity: 0;
}

.post-input textarea {
    height: 180px;
    line-height: 26px;
    resize: none;
    padding: 30px;
    padding-top: 20px;
}

textarea.auto-resize.expanded {
    height: 300px; /* 要比普通 max-height 大 */
}

.post-input textarea.auto-resize.expanded {
    height: 400px;
}


.post-check input {
    margin-right: 5px;
}

.post-updates-form {
    /*margin-top: 90px;*/
    /*padding-top: 50px;*/
}

.post-updates-form h4 {
    font-size: 22px;
    margin-bottom: 0;
}

.post-updates-form > span {
    display: inline-block;
    margin-bottom: 45px;
}

.updates-pager a {
    font-size: 16px;
    font-weight: 450;
    color: #333;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 3px 10px;
!important;
    text-align: center;
    margin-right: 14px;
    display: inline-block;
    cursor: pointer;
}

.updates-pager a.active {
    background: #4636ff;
    color: #fff;
    transform: scale(.95);
}

.updates-pager a.active:hover {
    background: #4636ff;
    color: #fff;
    transform: scale(1);
}

.updates-pager a:hover {
    opacity: 2;
    transform: scale(1.05);
}

.load-more a {
    color: #4636ff
}

/*
 ======================
 评论 Markdown
 ======================
 */

.updates-main {
    margin-bottom: 12px;
}

.sub {
    margin-bottom: 10px;
    font-size: 16px;
}

.updates-main h1 {
    font-size: 45px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid #eeeeee;
    color: var(--text-color);
}

@media (max-width: 575px) {
    .updates-main h1 {
        font-size: 35px;
    }
}

.updates-main h2 {
    font-size: 31px;
    margin-bottom: 16px;
    margin-top: 25px;
    color: var(--text-color);
}

.updates-main h3 {
    font-size: 25px;
    margin-top: 14px;
    margin-bottom: 11px;
    color: var(--text-color);
}

.updates-main h4 {
    font-size: 22px;
    margin-top: 14px;
    color: var(--text-color);
}

.updates-main p {
    font-size: 16px;
    font-weight: normal;
    color: var(--text-color);
    line-height: 24px;
    letter-spacing: .3px;
}

.updates-main h5 {
    font-size: 19px;
    margin-top: 12px;
    font-weight: 530;
    color: var(--text-color);
}

.updates-main .table-wrapper {
    overflow: hidden;
    /*border-radius: 16px;*/
    margin-top: 16px;
    margin-bottom: 16px;
}


.updates-main pre code {
    margin-top: 12px;
}

.updates-main button.button-code {
    margin-top: 12px;
}

.updates-main table.modern-table th,
.updates-main table.modern-table td {
    padding: 8px 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.updates-main table.modern-table th {
    font-weight: 550;
    color: var(--text-color);
    font-size: 17px;
    border-bottom: 2px solid #bbb;
}

/*.updates-main .number__list ol li {*/
/*    margin-left: 3ch;*/
/*}*/
/*.updates-main .item__list ol li {*/
/*    margin-left: 6ch;*/
/*}*/

/*@media (max-width: 768px) {*/
/*    .updates-main .number__list ol li {*/
/*        margin-left: 2ch;*/
/*    }*/

/*    .updates-main .item__list ol li {*/
/*        margin-left: 4ch;*/
/*    }*/
/*}*/

/*@media (max-width: 575px) {*/
/*    .updates-main .number__list ol li {*/
/*        margin-left: 1ch;*/
/*    }*/

/*    .updates-main .item__list ol li {*/
/*        margin-left: 2ch;*/
/*    }*/
/*}*/

.updates-main .markdown__indent1 {
    margin-left: 6ch;
}

.updates-main .markdown__indent2 {
    margin-left: 6ch;
}

.updates-main .markdown__indent3 {
    margin-left: 6ch;
}

@media (max-width: 768px) {

    .updates-main .markdown__indent1 {
        margin-left: 4ch;
    }

    .updates-main .markdown__indent2 {
        margin-left: 5ch;
    }

    .updates-main .markdown__indent3 {
        margin-left: 5ch;
    }

}

@media (max-width: 575px) {

    .updates-main .markdown__indent1 {
        margin-left: 3ch;
    }

    .updates-main .markdown__indent2 {
        margin-left: 4ch;
    }

    .updates-main .markdown__indent3 {
        margin-left: 4ch;
    }

}

.updates-main .strong {
    color: orangered; /* 代码颜色 */
    border-radius: 4px; /* 圆角 */
    font-size: 16px; /* 字体大小 */
    white-space: pre-wrap; /* 允许自动换行 */
    word-wrap: break-word; /* 处理长行 */
}

.updates-main .italic {
    font-style: italic;
}

.updates-main .strikeout {
    text-decoration: line-through;
}

.updates-main .border-line {
    border-bottom: 1px solid var(--border-color);
}

/*
 ======================
 抽屉
 ======================
 */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;
}

.drawer-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.latest-updates > li:not(.children) {
    opacity: 1;
}

.drawer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 80%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 14px 12px;
}

.drawer-header {
    padding: 14px 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header button {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.drawer-overlay.show .drawer {
    transform: translateY(0);
}


@media (max-width: 768px) {
    #drawerList li.children {
        margin: 10px 0 0;
    }
}

/*
 ======================
 窄屏幕优化
 ======================
 */

@media (max-width: 768px) {
    .sub,
    .updates-main {
        margin-bottom: 0;
    }
    .updates-main p {
        margin-bottom: 8px;
    }

    .updates-text,
    .reply-text {
        border-bottom: none;
        padding-bottom: 0;
    }

    .latest-updates li .updates-box,
    .latest-updates li .reply-box {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #f1f0f7;
    }

}

/*
=================
options-container
=================
 */

.options-container {
    display: block;
}

.option-item {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
}

.updates-options-button h3 {
    display: inline-block;
    font-size: 20px;
    margin-right: 25px;
}

.updates-options-button button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 16px;
    background-color: #f7f7f7;
    /*border: 2px solid #ccc;*/
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    -webkit-transition: background-color 0.3s ease, -webkit-transform 0.3s ease;
    margin-right: 15px;
}

/*
 place-setting
 */

.place-setting {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    /*margin-top: 10px;*/
    margin-bottom: 30px;
}

.place-setting label {
    font-weight: 600;
    color: #444;
    margin-right: 6px;
}

.place-setting select {
    appearance: none;
    background: #f7f7f7;
    border: none;
    border-radius: 8px;
    padding: 6px 30px 6px 12px;
    font-size: 14px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.place-setting select:disabled {
    opacity: .5;
    pointer-events: none;
}

.ps-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

#ps-locate {
    padding: 6px 14px;
    border-radius: 10px;
    color: #4636ff;
    cursor: pointer;
    font-size: 14px;
    background: var(--code-bg-color);
}

#ps-status {
    font-size: 12px;
    color: var(--text-color);
}

@media (max-width: 640px) {
    .place-setting {
        gap: 6px;
    }

    .place-setting select {
        padding: 6px 34px 6px 10px;
    }
}

.updates-title {
    color: var(--text-color);
    margin-bottom: 24px;
}
