/* ============================================================
   茶室 - 帖子详情 / 编辑 / 回复 / 弹窗样式
   ------------------------------------------------------------
   包含：
     · 帖子详情页（post-page）
     · 帖子编辑器（editor-page）
     · 回复区（reply-*）
     · 移动帖子弹窗（move-modal）
     · 处罚弹窗（punish-modal）
     · 封面图上传（cover-*）
     · Lightbox
   ============================================================ */


/* ============================================================
   Part 1 - 帖子详情页
   ============================================================ */
.post-page {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ------------------------------------------------------------
   1.1 帖子头部
   ------------------------------------------------------------ */
.post-header {
    padding: 12px 0 18px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.post-breadcrumb a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.post-breadcrumb a:hover {
    color: var(--accent-bright);
}

.post-breadcrumb .sep {
    opacity: 0.5;
}

.post-header-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.post-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.3px;
    margin-bottom: 14px;
    word-break: break-word;
}

.post-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}

.post-header-meta .item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-header-meta .item i {
    font-size: 11px;
    opacity: 0.75;
}

.post-header-meta .user-chip {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.post-header-actions {
    margin-left: auto;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* ------------------------------------------------------------
   1.2 帖子封面展示区
   ------------------------------------------------------------
   注：详情页当前不显示封面（避免占位过大）。
       如需恢复，post_detail.html 里取消相应注释即可。
   ------------------------------------------------------------ */
.post-cover {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0b0f14;
    border: 1px solid var(--border-light);
}

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

/* ------------------------------------------------------------
   1.3 已解决横幅
   ------------------------------------------------------------ */
.solve-banner {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(85, 216, 139, 0.06);
    border: 1px solid rgba(85, 216, 139, 0.2);
    border-left: 3px solid var(--success);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.solve-banner i {
    color: var(--success);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ------------------------------------------------------------
   1.4 帖子正文
   ------------------------------------------------------------ */
.post-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-secondary);
    word-wrap: break-word;
    margin-bottom: 20px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.4;
    margin: 24px 0 12px;
}

.post-content h1 { font-size: 22px; }
.post-content h2 { font-size: 19px; }
.post-content h3 { font-size: 17px; }
.post-content h4 { font-size: 15.5px; }

.post-content p {
    margin: 0 0 14px;
}

.post-content a {
    color: var(--accent-bright);
    text-decoration: underline;
    text-decoration-color: rgba(245, 184, 85, 0.4);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.post-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ★ 正文图片：约束宽高（缩小：max-height 400px） */
.post-content img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 14px auto;
    display: block;
    cursor: zoom-in;
}

.post-content ul,
.post-content ol {
    margin: 0 0 14px;
    padding-left: 24px;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
    margin-bottom: 5px;
}

.post-content blockquote {
    margin: 14px 0;
    padding: 10px 18px;
    background: rgba(232, 164, 55, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    background: rgba(232, 164, 55, 0.10);
    color: var(--accent-bright);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
    margin: 14px 0;
}

.post-content pre code {
    background: none;
    color: var(--text-primary);
    padding: 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13.5px;
}

.post-content table th,
.post-content table td {
    border: 1px solid var(--border-light);
    padding: 9px 12px;
    text-align: center;
}

.post-content table th {
    background: rgba(232, 164, 55, 0.08);
    color: var(--text-primary);
    font-weight: 600;
}

/* ------------------------------------------------------------
   1.5 卡片区
   ------------------------------------------------------------
   · 图片卡片 — grid 一格，含内边距，视觉等同其他卡片
   · 链接 / 数据卡片 — 占整行
   · 所有卡片宽度与正文对齐（无 max-width 限制）
   ============================================================ */
.post-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin: 20px 0;
    align-items: start;
}

/* 图片卡片：外框 + 内边距，视觉等同其他卡片 */
.card-image {
    aspect-ratio: 16 / 9;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    transition: var(--transition);
}

.card-image:hover {
    border-color: rgba(232, 164, 55, 0.35);
    background: var(--bg-card-hover);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius) - 2px);
}

/* 链接卡片（占满整行） */
.card-link {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.card-link:hover {
    background: var(--bg-card-hover);
    border-color: rgba(232, 164, 55, 0.35);
}

.card-link-thumb {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    background: #0b0f14;
    flex-shrink: 0;
}

.card-link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
}

.card-link-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.card-link-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link-domain {
    font-size: 11.5px;
    color: var(--accent);
    opacity: 0.75;
}

/* 数据卡片（占满整行） */
.card-data {
    grid-column: 1 / -1;
    padding: 18px 22px;
    background: linear-gradient(135deg,
        rgba(232, 164, 55, 0.06) 0%,
        rgba(139, 111, 71, 0.03) 100%);
    border: 1px solid rgba(232, 164, 55, 0.25);
    border-radius: var(--radius);
}

.card-data-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.card-data-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 6px 0;
    font-size: 13.5px;
    align-items: baseline;
}

.card-data-label {
    color: var(--text-muted);
    font-size: 12.5px;
}

.card-data-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.card-data-band {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: color-mix(in srgb, var(--band-color) 18%, transparent);
    color: var(--band-color);
}

.card-data-advice {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(232, 164, 55, 0.25);
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.card-data-advice strong {
    display: block;
    color: var(--accent);
    margin-bottom: 4px;
    font-size: 12px;
}

.card-data-advice ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-data-advice li {
    position: relative;
    padding-left: 14px;
}

.card-data-advice li::before {
    content: '·';
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ------------------------------------------------------------
   1.6 帖子底部操作栏
   ------------------------------------------------------------ */
.post-footer {
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.post-action-btn:hover {
    background: rgba(232, 164, 55, 0.08);
    border-color: rgba(232, 164, 55, 0.35);
    color: var(--accent-bright);
}

.post-action-btn.active {
    background: rgba(232, 164, 55, 0.12);
    border-color: var(--accent);
    color: var(--accent-bright);
}

.post-action-btn.danger:hover {
    background: rgba(224, 82, 82, 0.10);
    border-color: rgba(224, 82, 82, 0.35);
    color: var(--danger);
}

.post-action-btn i {
    font-size: 13px;
}

.post-action-btn .count {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   1.7 管理菜单
   ------------------------------------------------------------ */
.manage-dropdown {
    position: relative;
    display: inline-block;
}

.manage-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.manage-trigger:hover {
    background: rgba(232, 164, 55, 0.10);
    border-color: rgba(232, 164, 55, 0.35);
    color: var(--accent-bright);
}

.manage-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    backdrop-filter: blur(12px);
}

.manage-dropdown.open .manage-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.manage-menu a,
.manage-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    white-space: nowrap;
}

.manage-menu a:hover,
.manage-menu button:hover {
    background: rgba(232, 164, 55, 0.08);
    color: var(--accent-bright);
}

.manage-menu button.danger:hover {
    background: rgba(224, 82, 82, 0.10);
    color: var(--danger);
}

.manage-menu i {
    font-size: 12px;
    width: 14px;
    text-align: center;
    opacity: 0.75;
}

.manage-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 5px 12px;
}

/* ------------------------------------------------------------
   1.8 回复区
   ------------------------------------------------------------ */
.post-replies-section {
    margin-top: 8px;
}

.post-replies-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}

.post-replies-header .count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}

.post-locked-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(139, 148, 158, 0.08);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 16px;
}

.post-locked-tip i {
    color: var(--text-muted);
    font-size: 14px;
}

/* 回复列表 */
.reply-list {
    margin-top: 4px;
}

.reply-list .reply-item:last-child {
    border-bottom: none;
}

.reply-time {
    font-size: 12px;
    color: var(--text-muted);
}

.reply-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.reply-empty i {
    font-size: 32px;
    opacity: 0.25;
    color: var(--accent);
}

.reply-empty-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.reply-empty-desc {
    font-size: 12.5px;
    color: var(--text-muted);
}

.reply-empty.hidden {
    display: none !important;
}

/* 回复操作按钮 */
.reply-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.reply-actions .reply-like-btn,
.reply-actions .reply-quote-btn,
.reply-actions .reply-delete-btn,
.reply-actions .reply-punish-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.reply-actions .reply-like-btn:hover,
.reply-actions .reply-quote-btn:hover {
    background: rgba(232, 164, 55, 0.08);
    color: var(--accent-bright);
}

.reply-actions .reply-like-btn.active {
    color: var(--accent-bright);
}

.reply-actions .reply-like-btn.active i {
    color: var(--accent);
}

.reply-actions .reply-delete-btn.danger:hover,
.reply-actions .reply-punish-btn.danger:hover {
    background: rgba(224, 82, 82, 0.10);
    color: var(--danger);
}

.reply-actions .reply-like-btn .count {
    font-variant-numeric: tabular-nums;
    min-width: 8px;
    text-align: left;
}

/* 回复框 */
.reply-editor {
    margin-top: 24px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.reply-editor-guest {
    text-align: center;
    padding: 24px;
}

.reply-editor-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.reply-editor-title i {
    color: var(--accent);
    font-size: 12px;
}

.reply-to-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 3px 8px 3px 12px;
    background: rgba(232, 164, 55, 0.10);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.reply-to-hint.hidden {
    display: none !important;
}

.reply-to-hint strong {
    color: var(--accent-bright);
    font-weight: 600;
}

.reply-to-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition);
}

.reply-to-cancel:hover {
    background: var(--danger);
    color: #fff;
}

.reply-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    min-height: 96px;
    outline: none;
    transition: var(--transition);
}

.reply-textarea:focus {
    border-color: var(--accent);
    background: rgba(11, 15, 20, 0.85);
    box-shadow: 0 0 0 3px rgba(232, 164, 55, 0.15);
}

.reply-textarea::placeholder {
    color: var(--text-muted);
}

.reply-editor-foot {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reply-editor-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.reply-editor-foot .btn {
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 600;
}


/* ============================================================
   Part 2 - Lightbox
   ============================================================ */
.mcres-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mcres-lightbox.show {
    opacity: 1;
}

.mcres-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.mcres-lightbox-body {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.mcres-lightbox-body img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.mcres-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mcres-lightbox-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    transform: rotate(90deg);
}


/* ============================================================
   Part 3 - 移动帖子弹窗
   ------------------------------------------------------------
   overflow: visible（避免内部话题选择器面板被裁）
   ============================================================ */
.move-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: moveModalFadeIn 0.2s ease;
}

.move-modal-backdrop[hidden] {
    display: none !important;
}

@keyframes moveModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.move-modal {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: visible;
    max-height: 90vh;
    animation: moveModalSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes moveModalSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.move-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

.move-modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.move-modal-header h3 i {
    color: var(--accent);
    font-size: 13px;
}

.move-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.move-modal-close:hover {
    background: rgba(224, 82, 82, 0.15);
    color: var(--danger);
    transform: rotate(90deg);
}

.move-modal-body {
    padding: 20px 20px 8px;
    overflow-y: auto;
    flex: 1;
}

.move-modal-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.move-modal-body .topic-selector {
    position: relative;
}

.move-modal-body .topic-selector-panel {
    position: absolute;
    max-height: 240px;
    z-index: 200;
}

.move-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.10);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-shrink: 0;
}

.move-modal-footer .btn {
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 600;
}


/* ============================================================
   Part 4 - 处罚弹窗
   ============================================================ */
.punish-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: punishFadeIn 0.2s ease;
}

.punish-modal-backdrop[hidden] {
    display: none !important;
}

@keyframes punishFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.punish-modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: visible;
    max-height: 90vh;
    animation: punishSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes punishSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.punish-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(224, 82, 82, 0.05);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

.punish-modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.punish-modal-header h3 i {
    color: var(--danger);
    font-size: 13px;
}

.punish-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.punish-modal-close:hover {
    background: rgba(224, 82, 82, 0.15);
    color: var(--danger);
    transform: rotate(90deg);
}

.punish-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.punish-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: rgba(232, 164, 55, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
}

.punish-hint strong {
    color: var(--accent-bright);
    font-weight: 600;
}

.punish-modal-body .editor-field {
    margin-bottom: 16px;
}

.punish-modal-body .editor-field:last-child {
    margin-bottom: 0;
}

.punish-modal-body .editor-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.punish-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.punish-type-option {
    cursor: pointer;
    display: block;
}

.punish-type-option input[type="radio"] {
    display: none;
}

.punish-type-card {
    padding: 14px 16px;
    background: rgba(11, 15, 20, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.punish-type-card > i {
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.punish-type-option:hover .punish-type-card {
    background: rgba(224, 82, 82, 0.05);
    border-color: rgba(224, 82, 82, 0.3);
}

.punish-type-option input:checked + .punish-type-card {
    background: rgba(224, 82, 82, 0.10);
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.punish-type-option input:checked + .punish-type-card > i {
    color: var(--danger);
}

.punish-type-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.punish-type-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.punish-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.10);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-shrink: 0;
}

.punish-modal-footer .btn {
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 600;
}


/* ============================================================
   Part 5 - 帖子编辑器
   ============================================================ */
.editor-page {
    max-width: 1080px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.editor-header {
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 22px;
}

.editor-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 12px;
}

.editor-header .back-link:hover {
    color: var(--accent-bright);
}

.editor-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.editor-header .desc {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: "main aside";
    gap: 24px;
    align-items: start;
}

.editor-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.editor-aside {
    grid-area: aside;
    position: sticky;
    top: calc(var(--navbar-height) + 16px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.editor-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}

.editor-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--border-light);
}

.editor-section-title i {
    color: var(--accent);
    font-size: 13px;
}

.editor-section-title .required {
    color: var(--danger);
    font-size: 12px;
}

.editor-section-title .optional {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    padding: 1px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.editor-field {
    margin-bottom: 18px;
}

.editor-field:last-child {
    margin-bottom: 0;
}

.editor-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.editor-field-label .required {
    color: var(--danger);
    margin-left: 3px;
}

.editor-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.editor-hint i {
    color: var(--accent);
    opacity: 0.7;
    font-size: 11px;
    margin-top: 3px;
    flex-shrink: 0;
}

.editor-title-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.editor-title-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.editor-title-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 164, 55, 0.15);
}

/* 类型选择 */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: rgba(11, 15, 20, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
    color: var(--text-secondary);
}

.type-option:hover {
    background: rgba(232, 164, 55, 0.06);
    border-color: rgba(232, 164, 55, 0.3);
}

.type-option.active {
    background: linear-gradient(135deg,
        rgba(232, 164, 55, 0.15),
        rgba(200, 137, 42, 0.08));
    border-color: var(--accent);
    color: var(--accent-bright);
    box-shadow: 0 0 0 3px rgba(232, 164, 55, 0.08);
}

.type-option-name {
    font-size: 13px;
    font-weight: 600;
}

.type-option-desc {
    font-size: 10.5px;
    color: var(--text-muted);
    opacity: 0.85;
}

/* ------------------------------------------------------------
   注：editor.css 的 :root 已改为琥珀色，
       .editor-wrapper 无需在这里再覆盖 --editor-primary。
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   5.1 图片卡片上传
   ------------------------------------------------------------ */
.image-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-card-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: #0b0f14;
    animation: fadeIn 0.2s ease;
}

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

.image-card-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.image-card-remove:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.image-card-add {
    width: 110px;
    height: 110px;
    border: 2px dashed var(--border-strong);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    transition: var(--transition);
    background: rgba(11, 15, 20, 0.3);
}

.image-card-add:hover {
    border-color: var(--accent);
    color: var(--accent-bright);
    background: rgba(232, 164, 55, 0.06);
}

.image-card-add i {
    font-size: 18px;
}

.image-card-add.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.image-card-loading {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: rgba(11, 15, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 16px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   5.2 封面图上传（含 [hidden] 强制隐藏）
   ------------------------------------------------------------ */
.cover-uploader {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    transition: var(--transition);
    background: rgba(11, 15, 20, 0.3);
}

/* ★ hidden 必须真的隐藏 */
.cover-placeholder[hidden] {
    display: none !important;
}

.cover-placeholder:hover {
    border-color: var(--accent);
    color: var(--accent-bright);
    background: rgba(232, 164, 55, 0.06);
}

.cover-placeholder.uploading {
    pointer-events: none;
    opacity: 0.6;
}

.cover-placeholder i {
    font-size: 24px;
}

.cover-hint {
    font-size: 11px;
    opacity: 0.7;
}

.cover-preview {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    background: #0b0f14;
}

.cover-preview[hidden] {
    display: none !important;
}

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

.cover-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.cover-remove:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* ------------------------------------------------------------
   5.3 链接卡片输入
   ------------------------------------------------------------ */
.link-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-input-row input {
    flex: 1;
    padding: 9px 14px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.link-input-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 164, 55, 0.15);
}

.link-input-remove {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(224, 82, 82, 0.08);
    border: 1px solid rgba(224, 82, 82, 0.2);
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.link-input-remove:hover {
    background: rgba(224, 82, 82, 0.2);
    color: #fff;
}

.link-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(232, 164, 55, 0.08);
    border: 1px dashed rgba(232, 164, 55, 0.4);
    border-radius: var(--radius);
    color: var(--accent-bright);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    align-self: flex-start;
}

.link-add-btn:hover {
    background: rgba(232, 164, 55, 0.15);
    border-color: var(--accent);
}

/* ------------------------------------------------------------
   5.4 数据卡片配置
   ------------------------------------------------------------ */
.data-card-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(232, 164, 55, 0.05);
    border: 1px solid rgba(232, 164, 55, 0.18);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.data-card-toggle:hover {
    background: rgba(232, 164, 55, 0.08);
}

.data-card-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

.data-card-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: var(--accent);
}

.data-card-toggle input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #1a1a1a;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.data-card-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-card-toggle-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.data-card-toggle-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.data-card-config {
    margin-top: 12px;
    padding: 16px 18px;
    background: rgba(11, 15, 20, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    display: none;
}

.data-card-config.open {
    display: block;
}

.data-card-config .editor-field {
    margin-bottom: 14px;
}

.data-card-config .editor-field:last-child {
    margin-bottom: 0;
}

.data-card-config select,
.data-card-config input[type="text"] {
    width: 100%;
    padding: 9px 14px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.data-card-config select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8a437' stroke-width='3'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.data-card-config select:focus,
.data-card-config input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 164, 55, 0.15);
}

.data-card-config select option {
    background: #11161c;
    color: var(--text-primary);
}

/* 资源选择器 */
.resource-picker {
    position: relative;
}

.resource-picker-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    z-index: 50;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    display: none;
}

.resource-picker-results.open {
    display: block;
}

.resource-picker-item {
    padding: 9px 14px;
    font-size: 13.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-picker-item:last-child {
    border-bottom: none;
}

.resource-picker-item:hover {
    background: rgba(232, 164, 55, 0.08);
    color: var(--accent-bright);
}

.resource-picker-item .id {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    font-family: ui-monospace, Consolas, monospace;
}

.resource-picker-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.hide-raw-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.hide-raw-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}

.hide-raw-toggle input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.hide-raw-toggle input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #1a1a1a;
    font-size: 9px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ------------------------------------------------------------
   5.5 侧栏
   ------------------------------------------------------------ */
.editor-side-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.editor-side-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border-light);
}

.editor-side-title i {
    color: var(--accent);
    font-size: 12px;
}

.editor-side-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.editor-side-list li {
    position: relative;
    padding-left: 14px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.editor-side-list li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.editor-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
}

/* 提示横幅 */
.editor-hint-banner {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.6;
}

.editor-hint-banner.info {
    background: rgba(232, 164, 55, 0.06);
    border: 1px solid rgba(232, 164, 55, 0.20);
    border-left: 3px solid var(--accent);
    color: var(--text-secondary);
}

.editor-hint-banner.warning {
    background: rgba(230, 126, 34, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.20);
    border-left: 3px solid var(--warning);
    color: var(--text-secondary);
}

.editor-hint-banner i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.editor-hint-banner.info i {
    color: var(--accent);
}

.editor-hint-banner.warning i {
    color: var(--warning);
}


/* ============================================================
   Part 6 - 响应式
   ------------------------------------------------------------
   注：.post-flag-global 已在 components.css 定义，此处不再重复。
   ============================================================ */
@media (max-width: 1000px) {
    .editor-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "aside"
            "main";
    }
    .editor-aside {
        position: static;
    }
    .editor-actions {
        flex-direction: row;
    }
}

@media (max-width: 900px) {
    .post-title {
        font-size: 20px;
    }
    .post-content {
        font-size: 14.5px;
    }
    .post-header-meta {
        gap: 12px;
        font-size: 12.5px;
    }
    .post-header-actions {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
        justify-content: flex-end;
    }
    .editor-header h1 {
        font-size: 20px;
    }
    .editor-section {
        padding: 16px 18px;
    }
    /* 封面在中等屏幕上缩小 */
    .post-cover {
        max-width: 100%;
    }
    /* 卡片区：平板下 2 列 */
    .post-cards {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .post-content img {
        max-height: 320px;
    }
}

@media (max-width: 640px) {
    .post-title {
        font-size: 18px;
    }
    .post-content {
        font-size: 14px;
    }
    .card-link {
        padding: 10px 12px;
    }
    .card-link-thumb {
        width: 72px;
        height: 72px;
    }
    .post-footer {
        gap: 8px;
    }
    .post-action-btn {
        padding: 6px 12px;
        font-size: 12.5px;
    }
    .reply-editor {
        padding: 14px 16px;
    }
    .reply-editor-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .reply-editor-foot .btn {
        width: 100%;
        justify-content: center;
    }
    .reply-to-hint {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .move-modal {
        max-width: none;
    }
    .move-modal-header,
    .move-modal-body,
    .move-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .punish-type-grid {
        grid-template-columns: 1fr;
    }
    .punish-modal-footer,
    .move-modal-footer {
        flex-direction: column-reverse;
    }
    .punish-modal-footer .btn,
    .move-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    .editor-header h1 {
        font-size: 18px;
    }
    .editor-title-input {
        font-size: 15px;
        padding: 12px 14px;
    }
    .type-grid {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    }
    .image-card-item,
    .image-card-add,
    .image-card-loading {
        width: 90px;
        height: 90px;
    }
    .editor-actions {
        flex-direction: column;
    }
    .mcres-lightbox-close {
        top: 12px;
        right: 12px;
        position: fixed;
    }
    /* 封面在手机端进一步缩小 */
    .post-cover {
        margin-bottom: 16px;
    }
    /* 卡片区：手机下单列 */
    .post-cards {
        grid-template-columns: 1fr;
    }
    .post-content img {
        max-height: 260px;
    }
}
/* ============================================================
   修复：管理菜单被下方内容遮挡
   ------------------------------------------------------------
   原理：
     · .post-header 之前是 static 定位，z-index 对它无效
     · 一旦下面的 .post-content / .post-cards / .reply-item
       被渲染到菜单之上，菜单就"穿到下面去"了
   方案：
     · 把 .post-header 变成 relative + 高层级
     · 里层的 .manage-dropdown / .manage-menu 再各提一级
     · 保险起见给菜单一个更高的 z-index
   ============================================================ */
.post-header {
    position: relative;
    z-index: 50;
}

.post-header-meta {
    position: relative;
    z-index: 51;
}

.manage-dropdown {
    position: relative;
    z-index: 52;
}

.manage-menu {
    z-index: 9999;
}
/* ============================================================
   楼中楼（子回复区）
   ============================================================ */
.reply-children {
    margin-top: 12px;
    margin-left: 22px;
    padding-left: 14px;
    border-left: 2px solid rgba(232, 164, 55, 0.18);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 子回复条目：比根回复紧凑 */
.reply-item-child {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.012);
    border-bottom: 1px solid var(--border-light);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.reply-item-child:last-child {
    border-bottom: none;
}

.reply-item-child:hover {
    background: rgba(255, 255, 255, 0.03);
}

.reply-item-child .reply-head {
    margin-bottom: 6px;
}

.reply-item-child .reply-body {
    font-size: 13.5px;
    line-height: 1.65;
}

.reply-item-child .reply-actions {
    margin-top: 6px;
    gap: 6px 10px;
    font-size: 11.5px;
}

/* 折叠的子回复容器 */
.reply-children-hidden {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reply-children-hidden[hidden] {
    display: none !important;
}

/* 展开按钮 */
.reply-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 12px;
    background: transparent;
    border: 1px dashed rgba(232, 164, 55, 0.35);
    border-radius: 14px;
    color: var(--accent-bright);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.reply-expand-btn:hover {
    background: rgba(232, 164, 55, 0.08);
    border-style: solid;
    border-color: rgba(232, 164, 55, 0.55);
}

.reply-expand-btn i {
    font-size: 10px;
    opacity: 0.85;
    transition: transform 0.2s;
}

/* 「加载更多回复」按钮区 */
.reply-load-more {
    display: flex;
    justify-content: center;
    padding: 16px 0 4px 0;
}

.reply-load-more .btn {
    padding: 8px 24px;
    font-size: 13.5px;
}

/* 移动端：缩小缩进 */
@media (max-width: 640px) {
    .reply-children {
        margin-left: 10px;
        padding-left: 10px;
        border-left-width: 1.5px;
    }
    .reply-item-child {
        padding: 8px 10px;
    }
    .reply-item-child .reply-body {
        font-size: 13px;
    }
    .reply-expand-btn {
        font-size: 12px;
        padding: 3px 10px;
    }
}
/* ============================================================
   楼中楼（子回复区 + 折叠）
   ============================================================ */

/* 子回复容器 */
.reply-children {
    margin-top: 12px;
    margin-left: 22px;
    padding-left: 14px;
    border-left: 2px solid rgba(232, 164, 55, 0.18);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 折叠状态：隐藏整个 body */
.reply-children.is-collapsed .reply-children-body {
    display: none;
}

/* 折叠状态：hover 时给个淡色提示 */
.reply-children.is-collapsed {
    padding-top: 0;
    padding-bottom: 0;
    border-left-color: rgba(232, 164, 55, 0.08);
}

/* 子回复条目 */
.reply-item-child {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.012);
    border-bottom: 1px solid var(--border-light);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.reply-item-child:last-child {
    border-bottom: none;
}

.reply-item-child:hover {
    background: rgba(255, 255, 255, 0.03);
}

.reply-item-child .reply-head {
    margin-bottom: 6px;
}

.reply-item-child .reply-body {
    font-size: 13.5px;
    line-height: 1.65;
}

.reply-item-child .reply-actions {
    margin-top: 6px;
    gap: 6px 10px;
    font-size: 11.5px;
}

/* 折叠按钮（位于根回复 head 右侧） */
.reply-children-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    background: transparent;
    border: 1px solid rgba(232, 164, 55, 0.25);
    border-radius: 12px;
    color: var(--accent-bright);
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1.5;
    white-space: nowrap;
}

.reply-children-toggle:hover {
    background: rgba(232, 164, 55, 0.10);
    border-color: rgba(232, 164, 55, 0.45);
}

.reply-children-toggle i {
    font-size: 9px;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

/* 展开更多按钮区 */
.reply-children-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.reply-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: transparent;
    border: 1px dashed rgba(232, 164, 55, 0.35);
    border-radius: 14px;
    color: var(--accent-bright);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.reply-more-btn:hover {
    background: rgba(232, 164, 55, 0.08);
    border-style: solid;
    border-color: rgba(232, 164, 55, 0.55);
}

.reply-more-btn i {
    font-size: 10px;
    opacity: 0.85;
}

/* 「加载更多回复」按钮区 */
.reply-load-more {
    display: flex;
    justify-content: center;
    padding: 16px 0 4px 0;
}

.reply-load-more .btn {
    padding: 8px 24px;
    font-size: 13.5px;
}

/* 移动端：缩小缩进 */
@media (max-width: 640px) {
    .reply-children {
        margin-left: 10px;
        padding-left: 10px;
        border-left-width: 1.5px;
    }
    .reply-item-child {
        padding: 8px 10px;
    }
    .reply-item-child .reply-body {
        font-size: 13px;
    }
    .reply-more-btn {
        font-size: 12px;
        padding: 3px 10px;
    }
    .reply-children-toggle {
        font-size: 11px;
        padding: 1px 8px;
    }
}
/* ============================================================
   IP 属地（低调文字版）
   ============================================================ */

.post-ip,
.reply-ip {
    display: inline;
    margin-left: 6px;
    padding: 0;
    font-size: 12px;
    line-height: inherit;
    color: rgba(255, 255, 255, 0.28);
    background: none;
    border: none;
    border-radius: 0;
    white-space: nowrap;
    user-select: none;
    vertical-align: baseline;
}

/* 帖子头部：图标已经在模板里了，不加文字前缀 */
.post-ip {
    /* 帖子头部自带 <i class="fas fa-location-dot"> 图标，不再加前缀 */
}

/* 回复：加一个淡淡的 "IP属地 " 前缀 */
.reply-ip::before {
    content: "IP属地 ";
    opacity: 0.75;
}

/* 子回复里同色，不做特殊处理 */
.reply-item-child .reply-ip {
    color: rgba(255, 255, 255, 0.25);
}

/* 不再有 hover 提亮 */
.reply-item:hover .reply-ip,
.post-header-meta:hover .post-ip {
    color: rgba(255, 255, 255, 0.28);
}

/* 移动端再小一档 */
@media (max-width: 640px) {
    .post-ip,
    .reply-ip {
        font-size: 11px;
    }
}