/**
 * 说说页增强样式 v2
 * 依赖 css/aerocore-shuoshuo.css 里的 CSS 变量
 * 包含：公告 / 置顶 / 评论 / 分页 / 年份索引 / 对比度修正
 */

/* ==========================================================
   0. 对比度修正
   原样式次要灰 #6b7c93(4.26:1) / #95a5b8(2.51:1)、
   月份色 #6b7c93、链接蓝 #4a90d9(3.34:1) 不达 WCAG AA 4.5:1。
   ========================================================== */
:root {
    --shuoshuo-text-secondary: #55687d;
    --shuoshuo-text-muted: #5a6b7d;
    --shuoshuo-month-color: #55687d;
    --shuoshuo-accent-text: #2f6bab;
}

/* ==========================================================
   1. 公告条
   ========================================================== */
.announce-wrap {
    max-width: 1100px;
    margin: 0 auto 18px;
}

.announce-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 14px;
    background: var(--shuoshuo-accent-light);
    border: 1px solid rgba(74, 144, 217, 0.16);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.announce-icon {
    display: inline-flex;
    color: var(--shuoshuo-accent);
    flex-shrink: 0;
}

.announce-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--shuoshuo-text-secondary);
    line-height: 1.55;
}

.announce-text strong {
    color: var(--shuoshuo-accent-text);
    font-weight: 600;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

.announce-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--shuoshuo-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.announce-close:hover {
    background: rgba(74, 144, 217, 0.12);
    color: var(--shuoshuo-accent-text);
}

/* ==========================================================
   2. 置顶
   ========================================================== */
.pinned-group {
    margin-bottom: 30px;
}

.pinned-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-left: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--shuoshuo-accent-text);
}

/* 置顶卡片不带时间线圆点，左侧留白归零 */
.pinned-group .timeline-item {
    padding-left: 0;
}

.pinned-group .timeline-item-dot {
    display: none;
}

.timeline-item-card.is-pinned {
    border-left: 3px solid var(--shuoshuo-accent);
    background:
        linear-gradient(180deg, rgba(74, 144, 217, 0.045), rgba(74, 144, 217, 0) 70%),
        var(--shuoshuo-card-bg);
}

/* ==========================================================
   3. 卡片底部操作条
   ========================================================== */
.card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.meta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--shuoshuo-text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.18s ease;
}

.meta-btn:hover {
    color: var(--shuoshuo-accent-text);
    background: var(--shuoshuo-accent-light);
}

.meta-btn.is-open {
    color: var(--shuoshuo-accent-text);
    background: var(--shuoshuo-accent-light);
}

.meta-btn.is-static {
    cursor: default;
}

.meta-btn.is-static:hover {
    background: transparent;
    color: var(--shuoshuo-text-muted);
}

.meta-count {
    font-variant-numeric: tabular-nums;
}

.meta-btn.is-copied .meta-text::after {
    content: " ✓";
}

.card-meta + .comments {
    margin-top: 4px;
}

/* ==========================================================
   4. 评论区
   ========================================================== */
.comments {
    padding-top: 14px;
    border-top: 1px dashed var(--shuoshuo-border);
}

.comments-head {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--shuoshuo-text-secondary);
}

.comment-list {
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
}

.comment {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--shuoshuo-border);
}

.comment:last-child {
    border-bottom: 0;
}

.comment-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: block;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--shuoshuo-text);
}

.comment-time {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
}

.comment-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--shuoshuo-text-secondary);
    overflow-wrap: break-word;
}

.comment-text p {
    margin: 0 0 6px;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-reply {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--shuoshuo-text-muted);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.18s ease;
}

.comment-reply:hover {
    color: var(--shuoshuo-accent-text);
}

/* 表单 */
.comment-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--shuoshuo-border);
}

.comment-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-form-row input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--shuoshuo-border);
    border-radius: 8px;
    background: var(--shuoshuo-bg);
    color: var(--shuoshuo-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.comment-form textarea {
    display: block;
    width: 100%;
    min-height: 84px;
    padding: 10px 12px;
    border: 1px solid var(--shuoshuo-border);
    border-radius: 8px;
    background: var(--shuoshuo-bg);
    color: var(--shuoshuo-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.comment-form-row input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--shuoshuo-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.comment-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.comment-hint {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
}

.comment-submit {
    flex-shrink: 0;
    padding: 7px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--shuoshuo-accent-text);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.12s ease;
}

.comment-submit:hover {
    opacity: 0.9;
}

.comment-submit:active {
    transform: scale(0.98);
}

.comment-submit[disabled] {
    opacity: 0.6;
    cursor: default;
}

/* 蜜罐：正常用户看不见，也不占位（不往左推，避免横向溢出） */
.shuoshuo-hp {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.shuoshuo-hp input {
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
}


/* ==========================================================
   4.5 拼图验证码
   ========================================================== */
.captcha-box {
    margin-top: 12px;
}

.captcha-loading {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
}

.captcha-slider {
    max-width: 320px;
    user-select: none;
    -webkit-user-select: none;
}

.captcha-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 320 / 150;
    border-radius: 8px;
    overflow: hidden;
    background: var(--shuoshuo-bg);
    border: 1px solid var(--shuoshuo-border);
}

.captcha-stage .captcha-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-piece {
    position: absolute;
    left: 0;
    width: 17.5%;
    height: auto;
    cursor: grab;
    will-change: transform;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.captcha-box.is-dragging .captcha-piece {
    cursor: grabbing;
}

.captcha-track {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    margin-top: 8px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--shuoshuo-bg);
    border: 1px solid var(--shuoshuo-border);
    overflow: hidden;
}

.captcha-track-text {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    pointer-events: none;
}

.captcha-knob {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--shuoshuo-accent-text);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: grab;
    touch-action: none;
    will-change: transform;
}

.captcha-box.is-dragging .captcha-knob {
    cursor: grabbing;
}

.captcha-box[data-state="answered"] .captcha-track {
    border-color: var(--shuoshuo-accent-text);
    background: var(--shuoshuo-accent-light);
}

.captcha-box[data-state="answered"] .captcha-track-text,
.captcha-box.is-dragging .captcha-track-text {
    opacity: 0;
}

.captcha-image-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-image-wrap .captcha-bg {
    display: block;
    height: 40px;
    width: auto;
    border-radius: 6px;
    border: 1px solid var(--shuoshuo-border);
}

.captcha-input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--shuoshuo-border);
    border-radius: 8px;
    background: var(--shuoshuo-bg);
    color: var(--shuoshuo-text);
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 2px;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--shuoshuo-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.comment-status {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--shuoshuo-text-muted);
}

.comment-status.is-error {
    color: #b3261e;
}

.comment-status.is-ok {
    color: #1a7f45;
}

/* ==========================================================
   5. 分页
   ========================================================== */
.shuoshuo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--shuoshuo-border);
}

.shuoshuo-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--shuoshuo-border);
    border-radius: 8px;
    background: var(--shuoshuo-card-bg);
    color: var(--shuoshuo-text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.18s ease;
}

.shuoshuo-pagination .page-numbers:hover {
    color: var(--shuoshuo-accent-text);
    border-color: var(--shuoshuo-accent);
}

.shuoshuo-pagination .page-numbers.current {
    background: var(--shuoshuo-accent-text);
    color: #ffffff;
    border-color: var(--shuoshuo-accent-text);
}

.shuoshuo-pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

.pagination-info {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
}

/* ==========================================================
   6. 年份索引
   ========================================================== */
.year-index {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.year-index a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--shuoshuo-bg);
    color: var(--shuoshuo-text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.18s ease;
}

.year-index a:hover,
.year-index a.is-active {
    background: var(--shuoshuo-accent-light);
    color: var(--shuoshuo-accent-text);
}

.year-count {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    transition: color 0.18s ease;
}

.year-index a:hover .year-count,
.year-index a.is-active .year-count {
    color: var(--shuoshuo-accent-text);
}

.year-index a.is-reset {
    border: 1px dashed var(--shuoshuo-border);
    background: transparent;
}

/* ==========================================================
   7. 桌面端侧栏：四张卡要能在 800 高的窗口里放下
   ========================================================== */
@media (min-width: 901px) {
    .shuoshuo-sidebar {
        gap: 16px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .sidebar-card {
        padding: 20px;
    }

    .year-card,
    .tags-card {
        padding: 18px 20px;
    }
}

/* ==========================================================
   8. 深色模式
   ========================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --shuoshuo-accent-text: #79b8ff;
    }

    .announce-bar {
        border-color: rgba(88, 166, 255, 0.18);
    }

    .announce-close:hover {
        background: rgba(88, 166, 255, 0.14);
    }

    .timeline-item-card.is-pinned {
        background:
            linear-gradient(180deg, rgba(88, 166, 255, 0.07), rgba(88, 166, 255, 0) 70%),
            var(--shuoshuo-card-bg);
    }

    .comment-submit {
        color: #0d1117;
    }

    .comment-status.is-error {
        color: #ff9c94;
    }

    .comment-status.is-ok {
        color: #7ee2a8;
    }

    .captcha-knob {
        color: #0d1117;
    }

    .shuoshuo-pagination .page-numbers.current {
        color: #0d1117;
    }
}

/* ==========================================================
   8.5 页脚链接
   ========================================================== */
.shuoshuo-footer a {
    color: var(--shuoshuo-accent-text);
}

.shuoshuo-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================
   9. 单列布局（≤900）：公告 → 作者 → 时间线 → 统计 → 年份 → 标签
   侧栏拆成独立卡片，直接参与容器排序
   ========================================================== */
@media (max-width: 900px) {
    .shuoshuo-container {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .shuoshuo-container .shuoshuo-sidebar {
        display: contents !important;
        position: static;
        max-height: none;
        overflow: visible;
    }

    .shuoshuo-timeline {
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .author-card {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    .stats-card {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .year-card {
        order: 4;
        width: 100%;
        max-width: 100%;
    }

    .tags-card {
        order: 5;
        width: 100%;
        max-width: 100%;
    }

    .archive-card {
        order: 6;
        width: 100%;
        max-width: 100%;
    }

    /* 作者卡改成左图右文，避免签名把名字挤成两行 */
    .author-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "avatar name"
            "avatar desc";
        align-items: center;
        column-gap: 14px;
        row-gap: 2px;
        text-align: left;
        padding: 16px 20px;
    }

    .author-avatar {
        grid-area: avatar;
        margin: 0;
    }

    .author-avatar img {
        width: 56px;
        height: 56px;
    }

    .author-name {
        grid-area: name;
        margin: 0;
        white-space: nowrap;
    }

    .author-desc {
        grid-area: desc;
    }
}

/* ==========================================================
   10. 小屏
   ========================================================== */
@media (max-width: 640px) {
    .announce-wrap {
        margin-bottom: 14px;
    }

    .announce-bar {
        padding: 8px 10px;
        font-size: 13px;
        align-items: flex-start;
    }

    .announce-icon {
        margin-top: 1px;
    }

    .comment-avatar {
        width: 28px;
        height: 28px;
    }

    .comment-text {
        font-size: 13px;
    }

    .comment-form-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .comment-submit {
        width: 100%;
        padding: 10px 18px;
    }

    .shuoshuo-pagination .page-numbers.next,
    .shuoshuo-pagination .page-numbers.prev {
        padding: 0 12px;
    }
}

/* ---------- 每条说说的年月戳（跨年滚动时也知道是哪一年） ---------- */
.card-date {
    min-width: 62px;
}

.date-year {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--shuoshuo-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.timeline-item-card {
    align-items: flex-start;
}

/* ==========================================================================
 * 碎碎念 v3 追加：吸顶分组 / 配图 / 标签 / 同感 / 单条页 / 归档 / 往年今日
 * ========================================================================== */

/* ---------- 11. 分组标题吸顶（滚到哪都知道在哪个年哪个月） ---------- */
.timeline-year-label {
    position: sticky;
    top: 56px;
    z-index: 5;
    background: var(--shuoshuo-bg);
    padding: 6px 0 4px;
    margin: 0 0 2px;
}

.timeline-month-label {
    position: sticky;
    top: 96px;
    z-index: 4;
    background: var(--shuoshuo-bg);
    padding: 4px 0 6px;
}

@media (max-width: 640px) {
    .timeline-year-label {
        top: 51px;
    }

    .timeline-month-label {
        top: 88px;
    }
}

/* ---------- 12. 日期可点 ---------- */
a.date-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    margin: -2px -3px;
    padding: 2px 3px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--shuoshuo-accent);
    transition: color 0.15s ease, background 0.15s ease;
}

a.date-day:hover {
    background: var(--shuoshuo-accent-light);
}

a.date-day:hover {
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

/* ---------- 13. 配图 ---------- */
.card-figure {
    margin: 12px 0 4px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--shuoshuo-bg);
    line-height: 0;
}

.card-figure .card-img,
.card-figure img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.card-figure .card-img:hover,
.card-figure img:hover {
    transform: scale(1.01);
}

/* 图片查看器 */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 20, 26, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox.is-open {
    opacity: 1;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* ---------- 14. 标签 ---------- */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 2px;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    font-size: 12px;
    line-height: 1;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--shuoshuo-accent-light);
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
    transition: background 0.15s ease;
}

.card-tag:hover {
    background: var(--shuoshuo-accent);
    color: #fff;
    text-decoration: none;
}

/* 筛选提示条 */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--shuoshuo-text-secondary);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--shuoshuo-accent-light);
    color: var(--shuoshuo-accent-text);
    font-weight: 500;
}

.filter-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
}

.filter-remove:hover {
    background: var(--shuoshuo-accent);
    color: #fff;
}

.tag-empty {
    font-size: 13px;
    color: var(--shuoshuo-text-muted);
    margin: 0;
}

.tags-cloud .tag-item.is-active {
    background: var(--shuoshuo-accent);
    color: #fff;
}

.tags-cloud .tag-count {
    font-size: 12px;
}

.tags-cloud .tag-item.is-active .tag-count {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

/* ---------- 15. 同感 ---------- */
.meta-btn.js-like svg {
    transition: transform 0.15s ease;
}

.meta-btn.js-like:hover svg {
    transform: scale(1.12);
}

.meta-btn.js-like.is-liked {
    color: #d6455d;
}

.meta-btn.js-like.is-liked .meta-count {
    color: #d6455d;
}

.meta-btn.js-like.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- 16. 回到顶部 ---------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--shuoshuo-border);
    border-radius: 50%;
    background: var(--shuoshuo-card);
    color: var(--shuoshuo-text-secondary);
    box-shadow: 0 6px 20px rgba(20, 35, 55, 0.14);
    cursor: pointer;
    z-index: 90;
    transition: transform 0.15s ease, color 0.15s ease;
}

.to-top:hover {
    color: var(--shuoshuo-accent-text);
    transform: translateY(-2px);
}

/* ---------- 17. 往年今日 ---------- */
.onyear {
    max-width: 1100px;
    margin: 28px auto 0;
    padding: 20px 22px;
    background: var(--shuoshuo-card);
    border: 1px solid var(--shuoshuo-border);
    border-radius: 14px;
}

.onyear-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--shuoshuo-text);
    margin: 0 0 12px;
}

.onyear-list {
    display: grid;
    gap: 10px;
}

.onyear-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--shuoshuo-bg);
    text-decoration: none;
    transition: background 0.15s ease;
}

.onyear-item:hover {
    background: var(--shuoshuo-accent-light);
    text-decoration: none;
}

.onyear-year {
    font-size: 13px;
    font-weight: 600;
    color: var(--shuoshuo-accent-text);
    font-variant-numeric: tabular-nums;
}

.onyear-year em {
    display: block;
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: var(--shuoshuo-text-muted);
    margin-top: 2px;
}

.onyear-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--shuoshuo-text-secondary);
}

@media (max-width: 640px) {
    .onyear-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .onyear-year em {
        display: inline;
        margin-left: 6px;
    }
}

/* ---------- 18. 单条页 ---------- */
.single-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 0;
}

.single-card {
    padding: 26px 30px 24px;
    background: var(--shuoshuo-card);
    border: 1px solid var(--shuoshuo-border);
    border-radius: 14px;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    margin-bottom: 14px;
}

.single-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 2px;
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

.single-meta b {
    font-weight: 600;
}

.single-meta-sep {
    color: var(--shuoshuo-text-muted);
}

.single-title {
    font-size: 22px;
    line-height: 1.45;
    color: var(--shuoshuo-text);
    margin: 0 0 12px;
}

.single-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--shuoshuo-text);
}

.single-content p {
    margin: 0 0 14px;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.single-card .card-meta {
    margin-top: 18px;
}

.comments.is-open {
    display: block;
}

.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.single-nav-item {
    display: block;
    padding: 14px 16px;
    background: var(--shuoshuo-card);
    border: 1px solid var(--shuoshuo-border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.single-nav-item:hover {
    border-color: var(--shuoshuo-accent);
    background: var(--shuoshuo-accent-light);
    text-decoration: none;
}

.single-nav-item.is-next {
    text-align: right;
}

.single-nav-label {
    display: block;
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    margin-bottom: 6px;
}

.single-nav-text {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    color: var(--shuoshuo-text);
}

.single-back {
    text-align: center;
    margin: 22px 0 0;
    font-size: 13px;
}

.single-back a {
    display: inline-block;
    padding: 6px 2px;
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

@media (max-width: 640px) {
    .single-card {
        padding: 20px 18px;
    }

    .single-nav {
        grid-template-columns: 1fr;
    }

    .single-nav-item.is-next {
        text-align: left;
    }
}

/* ---------- 19. 归档页 ---------- */
.archive-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.archive-hint {
    font-size: 13px;
    color: var(--shuoshuo-text-muted);
    margin: 0 0 18px;
}

.archive-year {
    margin-bottom: 26px;
}

.archive-year-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--shuoshuo-text);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--shuoshuo-border);
}

.archive-month {
    margin: 0 0 14px;
}

.archive-month-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--shuoshuo-text-secondary);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--shuoshuo-text-muted);
    background: var(--shuoshuo-bg);
    border-radius: 999px;
    padding: 1px 7px;
}

.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-list li a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: baseline;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.archive-list li a:hover {
    background: var(--shuoshuo-accent-light);
    text-decoration: none;
}

.archive-day {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    font-variant-numeric: tabular-nums;
}

.archive-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--shuoshuo-text);
}

.archive-meta {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .archive-list li a {
        grid-template-columns: 30px 1fr;
    }

    .archive-meta {
        display: none;
    }
}

/* ---------- 20. 侧栏归档卡 ---------- */
.archive-card-text {
    font-size: 13px;
    color: var(--shuoshuo-text-muted);
    margin: 0 0 10px;
}

.archive-card-link {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

.archive-card-link:hover {
    text-decoration: underline;
}

/* ---------- 21. 深色模式补充 ---------- */
@media (prefers-color-scheme: dark) {
    .to-top {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    }

    .card-tag:hover,
    .filter-remove:hover,
    .tags-cloud .tag-item.is-active {
        color: #0f141a;
    }

    .meta-btn.js-like.is-liked,
    .meta-btn.js-like.is-liked .meta-count {
        color: #ff8b9e;
    }
}

/* ==========================================================================
 * 碎碎念 v4：视觉重做
 * 目标：去掉老式时间线竖轴和巨大日期数字，改成干净平铺的卡片流
 * 覆盖顺序：本文件最后加载，选择器与原样 1:1 同名即可覆盖
 * ========================================================================== */

:root {
    --shuoshuo-bg: #f6f7f9;
    --shuoshuo-card-bg: #ffffff;
    --shuoshuo-border: #e8ecf2;
    --shuoshuo-text: #1d2531;
    --shuoshuo-text-secondary: #55637a;
    --shuoshuo-text-muted: #5f6b7c;
    --shuoshuo-accent: #3b6fd4;
    --shuoshuo-accent-text: #2f5fb8;
    --shuoshuo-accent-light: #eef3fd;
    --shuoshuo-month-color: #55637a;
    --shuoshuo-radius: 14px;
    --shuoshuo-radius-sm: 10px;
    --shuoshuo-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 34px -26px rgba(15, 23, 42, 0.32);
    --shuoshuo-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 40px -26px rgba(15, 23, 42, 0.4);
}

/* ---------- 顶栏 ---------- */
.shuoshuo-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--shuoshuo-border);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.shuoshuo-header-inner {
    max-width: 1040px;
    height: 60px;
    padding: 0 28px;
}

.shuoshuo-back-btn {
    font-size: 13px;
    color: var(--shuoshuo-text-secondary);
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 8px;
}

.shuoshuo-back-btn:hover {
    background: var(--shuoshuo-accent-light);
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

.shuoshuo-page-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--shuoshuo-text);
}

/* ---------- 主体 ---------- */
.shuoshuo-main {
    padding: 34px 24px 56px;
}

.shuoshuo-container {
    max-width: 1040px;
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 28px;
}

/* ---------- 分组标题（去掉竖轴与圆点） ---------- */
.timeline-year-label {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 16px 0 6px;
    margin: 0;
    background: none;
}

.timeline-year-label .year-dot {
    display: none;
}

.year-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--shuoshuo-text-muted);
    text-transform: uppercase;
}

.timeline-year-group:first-child .timeline-year-label {
    padding-top: 4px;
}

.timeline-month-label {
    top: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    margin: 0 0 12px;
    background: var(--shuoshuo-bg);
    background: color-mix(in srgb, var(--shuoshuo-bg) 86%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.month-line {
    display: none;
}

.month-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--shuoshuo-text);
    letter-spacing: 0;
}

.timeline-month-group {
    padding-left: 0;
    margin-bottom: 26px;
}

.timeline-month-group::before {
    display: none;
}

.timeline-item {
    padding-left: 0;
}

.timeline-item-dot {
    display: none;
}

.timeline-items {
    gap: 14px;
}

/* ---------- 卡片 ---------- */
.timeline-item-card {
    display: block;
    padding: 18px 22px 14px;
    border-radius: var(--shuoshuo-radius);
    border: 1px solid var(--shuoshuo-border);
    background: var(--shuoshuo-card-bg);
    box-shadow: var(--shuoshuo-shadow);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.timeline-item-card:hover {
    border-color: #dbe3ee;
    box-shadow: var(--shuoshuo-shadow-hover);
    transform: translateY(-1px);
}

.timeline-item-card.is-pinned {
    border-color: #cfdff7;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 62%);
}

/* 日期：从左侧大数字改成顶部一行小字 */
.card-date {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 0 0 8px;
    border-right: 0;
    font-variant-numeric: tabular-nums;
}

.date-year {
    font-size: 12px;
    font-weight: 500;
    color: var(--shuoshuo-text-muted);
    letter-spacing: 0.02em;
}

a.date-day,
.date-day {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--shuoshuo-text-secondary);
    line-height: 1.3;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    margin: -4px -2px;
    border-radius: 4px;
    background: none;
}

a.date-day:hover {
    background: rgba(59, 111, 212, 0.08);
    text-decoration: none;
}

.date-time {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    font-weight: 400;
}

.date-time::before {
    content: '';
    width: 1px;
    height: 10px;
    margin-right: 8px;
    background: #d5dbe4;
    align-self: center;
}

.card-body {
    min-width: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--shuoshuo-text);
    margin: 0 0 8px;
}

.card-content {
    max-width: 45em;
    font-size: 15px;
    line-height: 1.85;
    color: #2a3442;
}

.card-content p {
    margin: 0 0 12px;
}

.card-content p:last-child {
    margin-bottom: 0;
}

/* 操作条 */
.card-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f3f7;
}

.meta-btn {
    font-size: 13px;
    color: var(--shuoshuo-text-muted);
    gap: 6px;
}

.meta-btn:hover {
    color: var(--shuoshuo-accent-text);
}

.meta-count {
    font-variant-numeric: tabular-nums;
}

/* ---------- 公告条 ---------- */
.announce-bar {
    border: 1px solid #d9e6fb;
    background: linear-gradient(180deg, #f2f7ff 0%, #f8fbff 100%);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: none;
}

.announce-text {
    font-size: 13.5px;
    line-height: 1.7;
    color: #34506f;
}

/* ---------- 分页 ---------- */
.shuoshuo-pagination {
    gap: 6px;
    margin-top: 30px;
    padding-top: 0;
    border-top: 0;
}

.shuoshuo-pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    background: var(--shuoshuo-card-bg);
    border: 1px solid var(--shuoshuo-border);
    color: var(--shuoshuo-text-secondary);
}

.shuoshuo-pagination .page-numbers:hover {
    border-color: #c9d6ea;
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

.shuoshuo-pagination .page-numbers.current {
    background: var(--shuoshuo-text);
    border-color: var(--shuoshuo-text);
    color: #fff;
}

.pagination-info {
    font-size: 12.5px;
    color: var(--shuoshuo-text-muted);
    text-align: center;
    margin-top: 12px;
}

/* ---------- 侧栏 ---------- */
.shuoshuo-sidebar {
    top: 84px;
    gap: 16px;
}

.sidebar-card {
    padding: 20px;
    border-radius: var(--shuoshuo-radius);
    border: 1px solid var(--shuoshuo-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.sidebar-card-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--shuoshuo-text-secondary);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f3f7;
}

.author-name {
    font-size: 16px;
    font-weight: 600;
}

.author-desc {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--shuoshuo-text-muted);
}

.author-avatar img {
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #eef3fd;
}

.stats-grid {
    gap: 8px;
}

.stat-item {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 12px 10px;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--shuoshuo-text);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 12px;
    color: var(--shuoshuo-text-muted);
    margin-top: 2px;
}

.year-index a {
    font-size: 12.5px;
    border: 1px solid var(--shuoshuo-border);
    background: #fff;
}

.year-index a:hover {
    border-color: #c9d6ea;
    background: var(--shuoshuo-accent-light);
    text-decoration: none;
}

.year-index a.is-active {
    background: var(--shuoshuo-text);
    border-color: var(--shuoshuo-text);
    color: #fff;
}

.year-index a.is-active .year-count {
    color: rgba(255, 255, 255, 0.72);
}

.tag-item {
    font-size: 12.5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    color: var(--shuoshuo-text-secondary);
}

.tag-item:hover {
    background: var(--shuoshuo-accent-light);
    border-color: #d9e6fb;
    color: var(--shuoshuo-accent-text);
    text-decoration: none;
}

/* ---------- 卡片里的标签 / 同感 ---------- */
.card-tag {
    background: #f4f6fa;
    color: #48566b;
    font-size: 12px;
}

.card-tag:hover {
    background: var(--shuoshuo-accent-light);
    color: var(--shuoshuo-accent-text);
}

/* ---------- 页脚 ---------- */
.shuoshuo-footer {
    padding: 26px 24px 34px;
    color: var(--shuoshuo-text-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--shuoshuo-border);
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
    .shuoshuo-main {
        padding: 20px 14px 44px;
    }

    .timeline-item-card {
        padding: 16px 16px 12px;
    }

    .card-content {
        font-size: 14.5px;
        line-height: 1.8;
    }
}

@media (max-width: 640px) {
    .timeline-year-label {
        padding: 12px 0 4px;
    }

    .timeline-month-label {
        top: 56px;
        padding: 6px 0;
        margin-bottom: 10px;
    }

    .card-meta {
        gap: 14px;
    }
}

/* ---------- 深色 ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --shuoshuo-bg: #14171c;
        --shuoshuo-card-bg: #1b1f26;
        --shuoshuo-border: #2a3038;
        --shuoshuo-text: #e6eaf0;
        --shuoshuo-text-secondary: #a9b4c2;
        --shuoshuo-text-muted: #8d99a8;
        --shuoshuo-accent: #6ea8fe;
        --shuoshuo-accent-text: #8ec5ff;
        --shuoshuo-accent-light: rgba(110, 168, 254, 0.14);
    }

    .shuoshuo-header {
        background: rgba(20, 23, 28, 0.88);
    }

    .card-content {
        color: #d5dce6;
    }

    .card-meta {
        border-top-color: #262c34;
    }

    .sidebar-card-title {
        border-bottom-color: #262c34;
    }

    .stat-item,
    .tag-item {
        background: #1f242c;
        border-color: #2a3038;
    }

    .author-avatar img {
        box-shadow: 0 0 0 3px #1b1f26, 0 0 0 4px #2c3543;
    }

    .date-time::before {
        background: #3a434f;
    }

    .announce-bar {
        background: linear-gradient(180deg, #1b2532 0%, #1b1f26 100%);
        border-color: #2c3a4d;
    }

    .announce-text {
        color: #b9c6d6;
    }

    .card-tag {
        background: #222932;
        color: #b6c1cf;
    }

    .date-day::before,
    .date-time::before {
        color: #4a5361;
    }

    .shuoshuo-pagination .page-numbers.current {
        background: #e6eaf0;
        border-color: #e6eaf0;
        color: #14171c;
    }

    .timeline-item-card.is-pinned {
        border-color: #2f4a6b;
        background: linear-gradient(180deg, #1d2530 0%, #1b1f26 62%);
    }
}
