@charset "utf-8";

/* WarmSun — 轻盈卡片流 Typecho 主题 */
:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --card-soft: #f8f9fb;
    --text: #34495e;
    --text-strong: #223246;
    --muted: #99a5b5;
    --line: #edf0f4;
    --theme: #f0a35e;
    --theme-deep: #d9883e;
    --theme-soft: #fff3e6;
    --theme-fade: rgba(240, 163, 94, .12);
    --shadow: 0 6px 26px rgba(52, 73, 94, .055);
    --shadow-hover: 0 14px 38px rgba(52, 73, 94, .11);
    --radius: 16px;
    --radius-sm: 10px;
    --max: 1160px;
    /* 翻页时钟：日间白底黑字，夜间由 html.dark 覆盖 */
    --flip-face: #ffffff;
    --flip-face-alt: #f6f8fa;
    --flip-ink: #223246;
    --flip-seam: rgba(34, 50, 70, .16);
    --flip-seam-hi: rgba(255, 255, 255, .9);
    --flip-border: rgba(34, 50, 70, .08);
    --flip-shadow: 0 2px 6px rgba(52, 73, 94, .14);
    --flip-ink-shadow: none;
    --flip-colon: #34495e;
    /* 猫猫气泡：日间白底黑字 */
    --kuro-bubble-bg: rgba(255, 255, 255, .55);
    --kuro-bubble-ink: #223246;
    --kuro-bubble-border: rgba(34, 50, 70, .06);
    --kuro-bubble-shadow: none;
    --kuro-bubble-arrow: rgba(255, 255, 255, .88);
    /* 吸顶导航高度预留：滚动定位时避免内容被导航盖住 */
    --nav-offset: 80px;
}

body.theme-sea { --theme: #6aa3d8; --theme-deep: #4886bd; --theme-soft: #eaf4ff; --theme-fade: rgba(106, 163, 216, .12); }
body.theme-mint { --theme: #63bfa2; --theme-deep: #3fa187; --theme-soft: #e8f8f2; --theme-fade: rgba(99, 191, 162, .12); }
body.theme-violet { --theme: #9b8bdc; --theme-deep: #7766c2; --theme-soft: #f0edff; --theme-fade: rgba(155, 139, 220, .12); }

html.dark {
    --bg: #161b23;
    --card: #202733;
    --card-soft: #283140;
    --text: #c8d3e0;
    --text-strong: #eef3f9;
    --muted: #7d8b9e;
    --line: #303a4a;
    --shadow: 0 8px 30px rgba(0, 0, 0, .22);
    --shadow-hover: 0 16px 42px rgba(0, 0, 0, .35);
    --flip-face: #263443;
    --flip-face-alt: #22303e;
    --flip-ink: #ffffff;
    --flip-seam: rgba(4, 12, 22, .55);
    --flip-seam-hi: rgba(255, 255, 255, .06);
    --flip-border: rgba(255, 255, 255, .04);
    --flip-shadow: 0 2px 5px rgba(15, 28, 45, .28);
    --flip-ink-shadow: 0 1px 0 rgba(0, 0, 0, .12);
    --flip-colon: #ffffff;
    /* 猫猫气泡：夜间黑底白字 */
    --kuro-bubble-bg: rgba(14, 16, 22, .55);
    --kuro-bubble-ink: #f7f7fb;
    --kuro-bubble-border: rgba(212, 240, 68, .14);
    --kuro-bubble-shadow: none;
    --kuro-bubble-arrow: rgba(14, 16, 22, .9);
}
html.dark body.theme-sea { --theme: #74addf; --theme-soft: #233649; }
html.dark body.theme-mint { --theme: #71c9ac; --theme-soft: #223c37; }
html.dark body.theme-violet { --theme: #ab9ce8; --theme-soft: #322d4b; }
html.dark body.theme-sun { --theme-soft: #3b3028; }

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-offset); }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
::selection { background: var(--theme-fade); color: var(--text-strong); }

.page-wrap { max-width: var(--max); margin: 0 auto; padding: 24px 16px 48px; }
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow .25s, transform .25s, background .3s;
}
.card:hover { box-shadow: var(--shadow-hover); }

/* ---------- 顶部横幅 ---------- */
.hero {
    position: relative;
    height: 360px;
    border-radius: 18px;
    background-size: cover;
    background-position: center 55%;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(30, 44, 67, .16);
}
.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(24, 34, 58, .42) 0%, rgba(24, 34, 58, .08) 42%, rgba(20, 30, 52, .48) 100%);
}
.hero-links {
    position: absolute;
    top: 18px;
    left: 22px;
    display: flex;
    gap: 18px;
    z-index: 2;
}
.hero-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    transition: opacity .2s, transform .2s;
}
.hero-links a:hover { opacity: .75; transform: translateY(-1px); }
.hero-links svg { width: 16px; height: 16px; }
.hero-center {
    position: absolute;
    left: 0;
    right: 0;
    top: 47%;
    transform: translateY(-40%);
    text-align: center;
    z-index: 2;
}
.hero-avatar {
    display: inline-block;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .92);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    overflow: hidden;
    margin-bottom: 14px;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .42);
}
.hero-subtitle {
    margin-top: 6px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    letter-spacing: .5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}
/* 副标题：彩色打印机效果，页面载入播放一次 */
.hero-subtitle .ws-printer-text { position: relative; display: inline-block; }
@keyframes ws-printer-type {
    from { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0);     -webkit-clip-path: inset(0 0 0 0); }
}
@keyframes ws-printer-rainbow {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}
@keyframes ws-printer-caret {
    0%   { left: 0; opacity: 1; }
    92%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) and ((clip-path: inset(0)) or (-webkit-clip-path: inset(0))) {
    .hero-subtitle .ws-printer-text {
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
    .hero-subtitle .ws-printer-text::before {
        content: attr(data-text);
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, #ff9ec4, #ffd76e, #9ef0c8, #8fd0ff, #c9a7ff, #ff9ec4);
        background-size: 200% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(0 1px 5px rgba(0, 0, 0, .45));
        clip-path: inset(0 100% 0 0);
        -webkit-clip-path: inset(0 100% 0 0);
        animation:
            ws-printer-type 2.2s steps(24, end) forwards,
            ws-printer-rainbow 2.2s linear 1 forwards;
        pointer-events: none;
    }
    .hero-subtitle .ws-printer-text::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 2px;
        height: 1.15em;
        border-radius: 2px;
        background: #fff;
        box-shadow: 0 0 8px #fff, 0 0 16px #ff9ec4;
        transform: translateY(-50%);
        animation: ws-printer-caret 2.2s steps(24, end) forwards;
        pointer-events: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hero-subtitle .ws-printer-text::before { animation: none; clip-path: none; -webkit-clip-path: none; }
    .hero-subtitle .ws-printer-text::after { display: none; }
}

/* ---------- 导航 ---------- */
.nav {
    margin-top: 18px;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 滚动时固定在顶部：父容器 .page-wrap 无 overflow/transform，sticky 生效；
       z-index 20 低于搜索/弹窗/灯箱，不会盖住浮层 */
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--card);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    border: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

/* 滚动到评论区/文章卡片时，为吸顶导航留出空间，不再重叠 */
#comments,
.card-comments,
[id^="respond-post-"],
.post-card,
.post-detail,
.comment-list li[id^="comment-"],
#quickPublishCard { scroll-margin-top: var(--nav-offset); }
.nav-main, .nav-tools { display: flex; align-items: center; gap: 6px; }
.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: color .2s, background .2s;
}
.nav-item:hover, .nav-item.active { color: var(--theme-deep); background: var(--theme-fade); }
.caret { margin-left: 3px; font-size: 10px; opacity: .6; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 170px;
    padding: 8px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .2s;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown-menu a {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12px;
}
.nav-dropdown-menu a:hover { background: var(--theme-fade); color: var(--theme-deep); }
.nav-dropdown-menu span { color: var(--muted); }
.nav-empty, .tag-empty { font-size: 12px; color: var(--muted); }
.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--muted);
    transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--theme-fade); color: var(--theme-deep); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }
.nav-menu-btn { display: none; }

.search-panel {
    margin-top: 12px;
    padding: 12px 16px;
    display: none;
}
.search-panel.open { display: block; animation: fadeDown .25s ease; }
.search-panel form { display: flex; align-items: center; gap: 8px; }
.search-panel input {
    flex: 1;
    border: 0;
    background: var(--card-soft);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
}
.search-panel button { color: var(--theme-deep); padding: 6px; }
.search-panel button svg { width: 20px; height: 20px; }

@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 主体布局 ---------- */
.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
    margin-top: 18px;
}
.main-column { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
/* 文章卡片之间保留更舒适的间距 */
#postList { display: flex; flex-direction: column; gap: 22px; }
.main_sidebar { display: flex; flex-direction: column; gap: 14px; }
/* 侧栏底部卡片组滚动吸顶（仅双栏布局）：侧栏撑满主栏高度，sticky 才有滚动空间 */
@media (min-width: 1061px) {
    .main-grid { align-items: stretch; }
    .main_sidebar { align-self: stretch; }
    .sticky-side { position: sticky; top: var(--nav-offset); display: flex; flex-direction: column; gap: 14px; }
}

.card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 14px;
}
.card-title .dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--theme);
    box-shadow: 0 0 0 4px var(--theme-fade);
    flex-shrink: 0;
    animation: dotGlow 2.2s ease-in-out infinite;
}
/* 发光扩展圈 */
.card-title .dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--theme);
    opacity: 0;
    animation: dotPulse 2.2s ease-out infinite;
    pointer-events: none;
}
@keyframes dotGlow {
    0%, 100% { box-shadow: 0 0 0 4px var(--theme-fade), 0 0 4px 1px var(--theme); opacity: .9; }
    50%      { box-shadow: 0 0 0 5px var(--theme-fade), 0 0 12px 3px var(--theme); opacity: 1; }
}
@keyframes dotPulse {
    0%   { transform: scale(.8); opacity: .6; }
    80%  { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .card-title .dot, .card-title .dot::after { animation: none; }
}

/* 公告 */
.notice-card { padding: 18px 22px; }
.notice-card .card-title { margin-bottom: 10px; }
.notice-body {
    background: var(--card-soft);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.notice-icon { font-size: 13px; }

.feed-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 0; }
.feed-head-title { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.feed-head-count { font-size: 11px; color: var(--muted); }

/* ---------- 文章卡片 ---------- */
.post-card { padding: 22px 24px 18px; }
.post-author { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--card-soft);
    flex-shrink: 0;
}
/* 头像容器与博主角标 */
.avatar-box { position: relative; display: inline-flex; flex-shrink: 0; line-height: 0; }
.avatar-box > .avatar { display: block; }
.author-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    padding: 0 4px;
    border-radius: 6px;
    background: var(--theme);
    color: #fff;
    font-size: 8px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    pointer-events: none;
}
.post-author-text { display: flex; flex-direction: column; line-height: 1.4; }
.post-author-name { font-size: 12px; font-weight: 600; color: var(--text-strong); }
.post-author-name:hover { color: var(--theme-deep); }
.post-author-text time { font-size: 10px; color: var(--muted); margin-top: 3px; }
.post-author-badge {
    margin-left: auto;
    font-size: 10px;
    color: var(--theme-deep);
    background: var(--theme-soft);
    padding: 3px 9px;
    border-radius: 20px;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.post-author-badge a + a::before { content: '·'; margin: 0 3px; }
.post-title {
    margin: 16px 0 8px;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--text-strong);
}
.post-title a:hover { color: var(--theme-deep); }
.post-excerpt {
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-thumbs {
    margin-top: 16px;
    display: grid;
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
    height: 240px;
}
.post-thumb {
    display: block;
    background-size: cover;
    background-position: center;
    background-color: var(--card-soft);
    border-radius: 10px;
    transition: transform .35s, filter .35s;
}
.post-thumb:hover { transform: scale(1.015); filter: saturate(1.1); }
button.post-thumb { width: 100%; height: 100%; border: 0; padding: 0; cursor: zoom-in; font: inherit; }
.thumbs-1 { grid-template-columns: 1fr; }
.thumbs-2 { grid-template-columns: 1fr 1fr; }
.thumbs-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.thumbs-3 .post-thumb:first-child { grid-row: span 2; }

.post-meta {
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--card-soft);
    color: var(--muted);
    transition: transform .2s, background .2s;
}
a.meta-chip:hover, button.meta-chip:hover { transform: translateY(-2px); }
.chip-random { background: var(--theme-soft); color: var(--theme-deep); }
.chip-type { font-weight: 600; }
.chip-type-status { background: #e8f6ee; color: #2f9e6b; }
html.dark .chip-type-status { background: #264437; color: #6fd3a5; }
.chip-type-post { background: var(--theme-soft); color: var(--theme-deep); }
.chip-custom-tag { background: #fff2e8; color: #d9803f; }
html.dark .chip-custom-tag { background: #4a382b; color: #f0a86a; }
.chip-edit { background: #eef7f5; color: #3a8f85; }
html.dark .chip-edit { background: #25423f; color: #79d4c8; }
.chip-delete { background: #fdeeee; color: #c96060; }
html.dark .chip-delete { background: #4a2d2d; color: #ef9a9a; }
.chip-view { background: #f2f5ff; color: #8b9bc2; }
html.dark .chip-view { background: #2a3549; }
.chip-comment { background: #f7f1ff; color: #a591c3; }
html.dark .chip-comment { background: #352e44; }
.chip-like.on { background: #fff0f1; color: #e8707f; }
html.dark .chip-like.on { background: #493039; }
.post-tags { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags a { font-size: 11px; color: var(--muted); }
.post-tags a:hover, .post-tags a::before { color: var(--theme-deep); }
.post-tags a::before { content: '#'; margin-right: 1px; }

/* 简洁列表模式 */
body.mode-list .post-card { padding: 18px 22px; }
body.mode-list .post-card .post-thumbs { display: none; }
body.mode-list .post-excerpt { -webkit-line-clamp: 2; }
body.mode-list .post-title { margin: 10px 0 4px; font-size: 16px; }

.empty-card { padding: 70px 20px; text-align: center; }
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-card p { color: var(--muted); margin-bottom: 14px; }
.empty-card a { color: var(--theme-deep); font-weight: 600; }
.error-code { font-size: 68px; font-weight: 800; color: var(--theme-soft); line-height: 1; margin-bottom: 8px; }

/* 滚动加载 */
.feed-sentinel { height: 1px; }
.feed-load-status { padding: 18px 0 6px; text-align: center; font-size: 13px; color: var(--muted, #8a8f98); }
.feed-load-status[hidden] { display: none; }
.feed-load-status:not([hidden]) { cursor: pointer; }

/* 分页 */
.pagination-wrap { padding: 10px 0 4px; display: flex; justify-content: center; }
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination > * {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 12px;
    color: var(--text);
}
.pagination a:hover, .pagination .current { background: var(--theme); color: #fff; }

/* ---------- 侧栏组件 ---------- */
.widget { padding: 18px 20px; }
.sidebar-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.clock-card { min-height: 132px; display: flex; align-items: center; justify-content: center; padding: 12px 9px; overflow: hidden; }
.digital-clock { width: 100%; max-width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; }
.flip-time { display: flex; align-items: center; justify-content: center; gap: 1px; width: max-content; max-width: 100%; height: 32px; margin: 0 auto; }
.flip-digit { position: relative; width: 19px; height: 32px; flex: 0 0 19px; border-radius: 5px; background: var(--flip-face); box-shadow: var(--flip-shadow), inset 0 0 0 1px var(--flip-border); overflow: hidden; perspective: 260px; transform-style: preserve-3d; }
.flip-digit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: var(--flip-seam); box-shadow: 0 1px 0 var(--flip-seam-hi); z-index: 5; pointer-events: none; }
.flip-half, .flip-leaf { position: absolute; left: 0; width: 100%; height: 50%; overflow: hidden; backface-visibility: hidden; }
.flip-half.top, .flip-leaf.top { top: 0; border-radius: 5px 5px 0 0; background: var(--flip-face); }
.flip-half.bottom, .flip-leaf.bottom { bottom: 0; border-radius: 0 0 5px 5px; background: var(--flip-face-alt); }
.flip-half span, .flip-leaf span { position: absolute; left: 0; width: 100%; height: 32px; line-height: 32px; text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 25px; font-weight: 300; color: var(--flip-ink); font-variant-numeric: tabular-nums; text-shadow: var(--flip-ink-shadow); }
.flip-half.top span, .flip-leaf.top span { top: 0; }
.flip-half.bottom span, .flip-leaf.bottom span { bottom: 0; }
.flip-leaf.top { z-index: 3; transform-origin: center bottom; animation: flipTop .22s ease-in forwards; }
.flip-leaf.bottom { z-index: 4; transform-origin: center top; transform: rotateX(90deg); animation: flipBottom .22s .22s ease-out forwards; }
.flip-colon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 6px; height: 32px; flex: 0 0 6px; }
.flip-colon i { display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--flip-colon); }
@keyframes flipTop { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes flipBottom { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
.dc-date { order: -1; margin-top: 0; margin-bottom: 7px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 11px; font-style: italic; color: var(--text); }
.dc-week { color: var(--theme-deep); font-weight: 600; font-style: normal; }
.dc-lunar { margin-top: 6px; font-size: 10px; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .flip-leaf.top, .flip-leaf.bottom { animation-duration: .01ms; animation-delay: 0s; } }
.weather-card { min-height: 156px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 12px; }
.weather-greeting { font-size: 12px; font-weight: 600; color: var(--text-strong); line-height: 1.5; }
.weather-main { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; }
.weather-icon { font-size: 26px; line-height: 1; }
.weather-temp { font-size: 26px; font-weight: 700; color: var(--theme-deep); font-variant-numeric: tabular-nums; }
.weather-text { font-size: 12px; color: var(--text); }
.weather-extra { font-size: 9px; color: var(--muted); line-height: 1.5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }

.sidebar-search { display: flex; align-items: center; background: var(--card-soft); border-radius: var(--radius-sm); padding: 2px 10px 2px 14px; }
.sidebar-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font-size: 12px; }
.sidebar-search button { font-size: 19px; color: var(--theme-deep); padding: 0 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag-cloud a {
    font-size: 11px;
    background: var(--card-soft);
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 7px;
    transition: .2s;
}
.tag-cloud a:hover { background: var(--theme-soft); color: var(--theme-deep); }
.tag-cloud a::after { content: attr(data-count); margin-left: 3px; font-size: 10px; }

.widget-html-body { font-size: 12px; line-height: 1.9; color: var(--muted); }
.widget-html-body a { color: var(--theme-deep); }
.widget-html-body img { border-radius: 8px; margin-top: 8px; }
.category-list { display: flex; flex-direction: column; }
.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 12px;
    transition: background .2s;
}
.category-list a:hover { background: var(--card-soft); color: var(--theme-deep); }
.category-list a span:last-child { color: var(--muted); font-size: 11px; }

.toc-list { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; }
.toc-list a {
    display: block;
    padding: 5px 8px;
    border-left: 2px solid var(--line);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-list a:hover, .toc-list a.active { border-color: var(--theme); color: var(--theme-deep); background: var(--theme-fade); }
.toc-list .toc-2 { padding-left: 18px; }
.toc-list .toc-3 { padding-left: 30px; }

.recent-comments { display: flex; flex-direction: column; gap: 12px; }
.recent-comment { display: flex; gap: 9px; }
.recent-comment .avatar-box { width: 32px; height: 32px; }
.recent-comment .avatar { width: 32px; height: 32px; }
.recent-comment .author-badge { font-size: 8px; right: -5px; bottom: -4px; padding: 0 4px; }
.recent-comment-body { min-width: 0; flex: 1; }
.recent-comment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.recent-comment-head strong { font-size: 11px; color: var(--text-strong); }
.recent-comment-author { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.recent-comment-author strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-comment-head time { font-size: 10px; color: var(--muted); white-space: nowrap; }
.recent-comment-body a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--card-soft);
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6;
}
.recent-comment-body a:hover { color: var(--theme-deep); }
.widget-empty { font-size: 12px; color: var(--muted); }
.about-text { font-size: 12px; color: var(--muted); line-height: 1.9; }
.about-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.about-links a { font-size: 11px; padding: 4px 10px; border-radius: 6px; background: var(--card-soft); color: var(--muted); }
.about-links a:hover { background: var(--theme-soft); color: var(--theme-deep); }

/* 站点信息卡片 */
.siteinfo-body { display: flex; flex-direction: column; gap: 6px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.siteinfo-body p { margin: 0; }
.siteinfo-body a { color: var(--muted); }
.siteinfo-body a:hover { color: var(--theme-deep); }
.siteinfo-icp { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.siteinfo-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.siteinfo-stats span { white-space: nowrap; }
.siteinfo-upyun { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px !important; }
.siteinfo-upyun a { display: inline-flex; align-items: center; gap: 4px; color: #1591f5; font-weight: 600; }
.siteinfo-upyun img.upyun-logo { width: 66px; height: auto; display: block; }

/* ---------- 文章详情 ---------- */
.post-detail { padding: 28px 32px 24px; }
.post-detail-title { margin: 20px 0 10px; font-size: 26px; line-height: 1.45; color: var(--text-strong); }
.post-detail-meta { display: flex; gap: 16px; font-size: 11px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.post-content { padding: 22px 0 8px; font-size: 14px; line-height: 2; word-wrap: break-word; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
    color: var(--text-strong);
    margin: 28px 0 12px;
    line-height: 1.5;
    font-weight: 700;
}
.post-content h1 { font-size: 24px; }
.post-content h2 { font-size: 20px; padding-left: 12px; border-left: 4px solid var(--theme); }
.post-content h3 { font-size: 17px; }
.post-content p { margin: 14px 0; }
.post-content a { color: var(--theme-deep); border-bottom: 1px dashed var(--theme); }
.post-content img { border-radius: 10px; margin: 16px auto; cursor: zoom-in; }
.post-content blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    border-left: 4px solid var(--theme);
    background: var(--theme-soft);
    border-radius: 0 10px 10px 0;
    color: var(--muted);
}
.post-content pre {
    background: #222a38;
    color: #dce6f2;
    border-radius: 10px;
    padding: 16px 18px;
    overflow: auto;
    line-height: 1.7;
    font-size: 12px;
}
.post-content :not(pre) > code { background: var(--card-soft); color: var(--theme-deep); padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.post-content ul, .post-content ol { padding-left: 24px; margin: 14px 0; }
.post-content li { margin: 6px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-content th { background: var(--card-soft); }
.post-tags-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.post-tags-line a { font-size: 11px; background: var(--card-soft); color: var(--muted); padding: 4px 10px; border-radius: 6px; }
.post-tags-line a:hover { background: var(--theme-soft); color: var(--theme-deep); }
.tag-label { font-size: 14px; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; }
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    background: var(--card-soft);
    color: var(--muted);
    font-size: 12px;
    transition: .2s;
}
.action-btn:hover { background: var(--theme-soft); color: var(--theme-deep); transform: translateY(-2px); }
.action-static { cursor: default; }
.action-static:hover { transform: none; background: var(--card-soft); color: var(--muted); }
.action-count { color: var(--theme-deep); font-weight: 600; }
.action-btn.liked { background: #fff0f1; color: #e8707f; }

/* AI 摘要 */
.ai-summary {
    margin-bottom: 22px;
    padding: 18px 22px;
    background: linear-gradient(120deg, var(--theme-fade), var(--card) 62%);
}
.ai-summary .card-title { margin-bottom: 8px; }
.ai-summary-body p { font-size: 13px; line-height: 1.95; color: var(--text); }
.ai-summary-loading { font-size: 12px; color: var(--muted); }
.ai-summary-loading::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--theme);
    animation: aiPulse 1s ease-in-out infinite alternate;
}
@keyframes aiPulse { from { opacity: .25; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.ai-summary-line { font-size: 13px; line-height: 1.95; color: var(--text); }
.ai-summary-tag {
    display: inline-block;
    margin-right: 7px;
    padding: 0 9px;
    border-radius: 6px;
    background: var(--theme-soft);
    color: var(--theme-deep);
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    vertical-align: 1px;
}
.ai-summary-typed { white-space: pre-wrap; }
.typed-cursor {
    color: var(--theme);
    font-weight: 700;
    margin-left: 1px;
    animation: typedBlink 1s steps(1) infinite;
}
@keyframes typedBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.ai-summary-error { color: #e8707f; }
.ai-retry {
    font-size: 11px;
    color: var(--theme-deep);
    background: var(--theme-soft);
    padding: 5px 12px;
    border-radius: 7px;
}
.ai-retry:hover { background: var(--theme); color: #fff; }

/* ---------- 评论 ---------- */
.comments { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 22px; }
.comments-head { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: 16px; }
.comments-head span { font-size: 11px; color: var(--muted); font-weight: 400; }
.respond { padding: 18px 20px; margin-bottom: 22px; scroll-margin-top: var(--nav-offset); }
.respond.comment-focused { box-shadow: 0 0 0 2px var(--theme), var(--shadow-hover); }
.respond-login { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.respond-login a { color: var(--theme-deep); }
.respond-logout { margin-left: 12px; }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.comment-fields input, .respond textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card-soft);
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 12px;
    transition: border-color .2s;
}
.comment-fields input:focus, .respond textarea:focus { border-color: var(--theme); }
.respond textarea { resize: vertical; min-height: 100px; margin-bottom: 10px; }
/* 评论表情选择器：面板放在发布按钮行之后，避免顶掉发布按钮 */
.respond .respond-foot + .ws-emoji-panel { margin: 0 0 10px; }
.respond textarea + .ws-emoji-panel { margin: -4px 0 12px; }
.ws-emoji-panel {
    border: 1px solid var(--line);
    background: var(--card-soft);
    border-radius: 9px;
    padding: 6px;
}
.ws-emoji-tabs { display: flex; gap: 5px; margin-bottom: 6px; }
.ws-emoji-tab {
    flex: 1;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    border-radius: 6px;
    padding: 4px 0;
    font-size: 11px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.ws-emoji-tab.is-active { background: var(--theme-fade); color: var(--theme-deep); border-color: var(--theme); }
.ws-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 3px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.ws-emoji-grid::-webkit-scrollbar { width: 5px; }
.ws-emoji-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.ws-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background .15s, transform .12s;
}
.ws-emoji-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.ws-emoji-item:hover { background: var(--theme-fade); transform: scale(1.14); }
/* 评论内容里渲染出的表情 */
.ws-comment-emoji {
    display: inline-block;
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 5px;
    vertical-align: -9px;
    margin: 0 1px;
}
/* 悬浮表情时的大图预览浮层（fixed，append 到 body，不受面板 overflow 裁剪） */
.ws-emoji-hover {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 99999;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card-soft, #fff);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
}
.ws-emoji-hover.is-visible { opacity: 1; }
.ws-emoji-hover-img {
    display: block;
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
}
.respond-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.respond-tip { font-size: 11px; color: var(--muted); }

/* 评论弹窗 */
body.modal-open { overflow: hidden; }
.comment-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 18px; }
.comment-modal[hidden] { display: none; }
.comment-modal-mask { position: absolute; inset: 0; background: rgba(18, 22, 33, .52); backdrop-filter: blur(3px); }
.comment-modal-box { position: relative; width: 100%; max-width: 640px; max-height: 96vh; overflow: hidden; padding: 18px 20px 14px; box-shadow: var(--shadow-hover); display: flex; flex-direction: column; }
.comment-modal-close { position: absolute; top: 12px; right: 14px; font-size: 22px; line-height: 1; color: var(--muted); z-index: 2; }
.comment-modal-close:hover { color: var(--theme-deep); }
.comment-modal-frame { flex: none; width: 100%; min-height: 160px; max-height: 90vh; border: 0; border-radius: 10px; background: var(--card); margin-top: 6px; }
.comment-modal textarea { width: 100%; border: 1px solid var(--line); background: var(--card-soft); border-radius: 9px; padding: 10px 12px; font-size: 12px; resize: vertical; min-height: 110px; margin-bottom: 10px; }
.comment-modal textarea:focus { border-color: var(--theme); outline: none; }
.comment-submit { background: var(--theme); color: #fff; padding: 9px 22px; border-radius: 9px; font-size: 12px; font-weight: 600; }
.comment-submit:hover { background: var(--theme-deep); }
.comment-closed { font-size: 12px; color: var(--muted); }
.comment-list { list-style: none; }
.comment-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-list .comment-body { margin-left: 52px; }
.comment-list .comment-author { display: flex; align-items: center; gap: 10px; }
.comment-list .comment-author .avatar-box { float: none; margin-right: 0; }
.comment-list .comment-author img { width: 40px; height: 40px; border-radius: 50%; float: none; margin-right: 0; }
.comment-list .comment-author cite { font-style: normal; font-weight: 600; font-size: 13px; color: var(--text-strong); }
.comment-list .comment-meta { font-size: 11px; color: var(--muted); margin-left: 8px; }
.comment-list .comment-content { margin-top: 8px; font-size: 13px; line-height: 1.9; }
.comment-list .comment-reply { font-size: 11px; color: var(--theme-deep); }
.comment-list .comment-children { margin-left: 30px; border-left: 2px solid var(--line); padding-left: 16px; }
.comment-list .comment-children li { border: 0; }
.comment-pagination { margin-top: 16px; }

/* ---------- 悬浮元素 ---------- */
.float-tools { position: fixed; right: 22px; bottom: 28px; z-index: 60; }
.float-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow-hover);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s;
}
.float-btn.show { opacity: 1; visibility: visible; transform: none; }
.float-btn:hover { color: var(--theme-deep); }
.float-btn svg { width: 22px; height: 22px; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 900;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    background: rgba(16, 22, 34, .94);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .2s;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox button { position: absolute; top: 22px; right: 28px; z-index: 2; color: #fff; font-size: 34px; line-height: 1; }
.lightbox-media { width: min(1100px, 94vw); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.lightbox-media[hidden] { display: none; }
.lightbox-media iframe, .lightbox-media video { display: block; width: 100%; height: 100%; border: 0; background: #000; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 16px);
    background: rgba(34, 50, 70, .92);
    color: #fff;
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 12px;
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transition: .25s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.site-footer { margin-top: 34px; padding: 22px 16px 8px; border-top: 1px solid var(--line); text-align: center; }
.footer-inner { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); }
.footer-inner a { color: var(--theme-deep); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; }
.footer-meta:empty { display: none; }

/* ---------- 短代码样式 ---------- */
.ws-tips { --ws-tip: var(--theme); }
.post-content .ws-tips {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 16px 0;
    padding: 13px 15px;
    border: 1px solid var(--ws-tip);
    border-left: 4px solid var(--ws-tip);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    line-height: 1.85;
}
.ws-tips-success { --ws-tip: #3aa675; }
.ws-tips-info { --ws-tip: #4b8bd1; }
.ws-tips-warning { --ws-tip: #e6a23c; }
.ws-tips-error { --ws-tip: #e05c68; }
.ws-tips-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--ws-tip);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.ws-tips-text > :first-child { margin-top: 0; }
.ws-tips-text > :last-child { margin-bottom: 0; }

.ws-progress { margin: 16px 0; }
.ws-progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-size: 12px; color: var(--text); }
.ws-progress-head b { color: var(--theme-deep); }
.ws-progress-track { height: 9px; border-radius: 99px; background: var(--theme-soft); overflow: hidden; }
.ws-progress-bar { position: relative; display: block; height: 100%; border-radius: 99px; background: var(--theme); transition: width 1s cubic-bezier(.22,1,.36,1); overflow: hidden; }
/* 动态效果：流光扫过 + 斜纹流动 */
.ws-progress-bar::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
    transform: translateX(-100%);
    animation: ws-progress-shine 2.4s ease-in-out infinite;
}
.ws-progress-bar::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .16;
    background: repeating-linear-gradient(45deg, #fff 0 6px, transparent 6px 12px);
    background-size: 24px 24px;
    animation: ws-progress-stripes 1s linear infinite;
}
@keyframes ws-progress-shine { 0%,60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes ws-progress-stripes { to { background-position: 24px 0; } }
@media (prefers-reduced-motion: reduce) {
    .ws-progress-bar::before, .ws-progress-bar::after { animation: none; }
    .ws-progress-bar { transition: none; }
}

.ws-hide { margin: 16px 0; border: 1px dashed var(--line); border-radius: 12px; overflow: hidden; }
.ws-hide-btn {
    width: 100%;
    padding: 13px 16px;
    border: 0;
    background: var(--theme-soft);
    color: var(--theme-deep);
    font-size: 13px;
    cursor: pointer;
}
.ws-hide-btn span { margin-right: 6px; }
.ws-hide.open .ws-hide-btn { border-bottom: 1px dashed var(--line); }
.ws-hide-body { display: none; padding: 14px 16px; font-size: 13px; line-height: 1.9; }
.ws-hide.open .ws-hide-body { display: block; }

.ws-download { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.ws-download-info { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ws-download-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--theme-soft); color: var(--theme-deep); }
.ws-download-icon svg { width: 20px; height: 20px; }
.ws-download-info strong { font-size: 14px; color: var(--text); }
.ws-download-code { margin-left: 8px; padding: 2px 7px; border-radius: 5px; background: var(--theme-soft); color: var(--theme-deep); font-size: 11px; cursor: pointer; }
.ws-download-desc { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ws-download-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--theme); color: #fff; font-size: 18px; text-decoration: none; }

/* 朋友卡片：整卡可点击、悬停动效与提示气泡 */
.ws-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
    padding: 16px 44px 16px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(120deg, var(--theme-soft), var(--card) 65%);
    color: var(--text);
    text-decoration: none;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, border-color .28s ease;
}
.ws-card-link { cursor: pointer; }
.ws-card:hover, .ws-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--theme);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12), 0 0 0 1px var(--theme-soft);
    outline: none;
}
.ws-card:active { transform: translateY(-1px) scale(.985); transition-duration: .08s; }
.ws-card-avatar { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; overflow: hidden; background: var(--theme); color: #fff; font-size: 20px; font-weight: 700; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease; }
.ws-card:hover .ws-card-avatar, .ws-card:focus-visible .ws-card-avatar { transform: scale(1.08) rotate(-5deg); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ws-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ws-card-body { min-width: 0; font-size: 13px; }
.ws-card-body strong { color: var(--theme-deep); }
.ws-card-body a { color: var(--theme-deep); text-decoration: none; }
.ws-card-body p { margin: 4px 0 0; color: var(--muted); }
.ws-card-quote { display: block; margin-top: 4px; color: var(--muted); }
.ws-card a { border-bottom: none; }
/* 网站信息行 */
.ws-card-site { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 7px; font-size: 11px; line-height: 1.5; }
.ws-card-site b { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; background: var(--theme-soft); color: var(--theme-deep); font-weight: 600; }
.ws-card-site b::before { content: '🌐'; font-size: 10px; }
.ws-card-site span { color: var(--muted); }
/* 跳转箭头 */
.ws-card-arrow { position: absolute; top: 18px; right: 18px; color: var(--theme); font-size: 15px; line-height: 1; opacity: .55; transform: translate(-3px, 3px); transition: opacity .28s ease, transform .28s ease; }
.ws-card:hover .ws-card-arrow, .ws-card:focus-visible .ws-card-arrow { opacity: 1; transform: translate(0, 0); }
/* 悬停提示气泡 */
.ws-card[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    top: -12px;
    left: 20px;
    max-width: calc(100% - 40px);
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(18, 22, 30, .92);
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 5;
}
.ws-card[data-tip]::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 30px;
    border: 5px solid transparent;
    border-top-color: rgba(18, 22, 30, .92);
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 5;
}
.ws-card:hover[data-tip]::after, .ws-card:focus-visible[data-tip]::after { opacity: 1; transform: translateY(0); }
.ws-card:hover[data-tip]::before, .ws-card:focus-visible[data-tip]::before { opacity: 1; }
.ws-card-extra { margin-top: 6px; color: var(--text); }
@media (prefers-reduced-motion: reduce) {
    .ws-card, .ws-card-avatar, .ws-card-arrow, .ws-card[data-tip]::after, .ws-card[data-tip]::before { transition: none !important; }
    .ws-card:hover, .ws-card:focus-visible, .ws-card:active, .ws-card:hover .ws-card-avatar, .ws-card:focus-visible .ws-card-avatar { transform: none; }
}

.ws-mark { padding: 1px 3px; border-radius: 3px; }
.ws-mark-yellow { background: #fff3a3; color: #4a3b00; }
.ws-mark-green { background: #b9f7c7; color: #0f4d24; }
.ws-mark-pink { background: #ffd1e3; color: #6b1f3c; }
.ws-mark-black { background: var(--text); color: var(--text); transition: color .2s; }
.ws-mark-black:hover { color: var(--card); }

.ws-copy { position: relative; border-bottom: 1px dashed var(--theme); color: var(--text); cursor: pointer; }
.ws-copy small { margin-left: 4px; color: var(--theme-deep); font-size: 10px; }
.ws-tooltip { position: relative; border-bottom: 1px dotted var(--theme); cursor: help; }
.ws-tooltip::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: max-content;
    max-width: 260px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(34, 50, 70, .94);
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    z-index: 20;
}
.ws-tooltip:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.ws-check { display: flex; align-items: center; gap: 8px; margin: 7px 0; color: var(--text); }
.ws-check input { accent-color: var(--theme); }

/* 多媒体短代码 */
.ws-music {
    --audio-color: rgba(137, 196, 255, .55);
    --music-cover: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 360px;
    max-width: 100%;
    height: 100px;
    margin: 16px 0;
    padding: 0 14px 0 0;
    border-radius: 12px;
    background-color: #33405a;
    background-image: linear-gradient(to right, rgba(24, 30, 42, .78), var(--audio-color));
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
/* 封面右侧覆一层浅色，背景图更接近参考图的透亮效果 */
.ws-music::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--music-cover);
    background: linear-gradient(to right, rgba(255,255,255,.12), rgba(255,255,255,.34));
    pointer-events: none;
}
.ws-music > * { position: relative; z-index: 1; }
.ws-music:hover { transform: translateY(-2px); }
.ws-music-left { display: flex; align-items: center; gap: 0; min-width: 0; }
.ws-music-cover { display: block; width: var(--music-cover); height: 100px; flex: 0 0 var(--music-cover); border-radius: 0; overflow: hidden; box-shadow: none; }
.ws-music-cover img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 0; }
.ws-music-cover-empty { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); font-size: 28px; }
.ws-music-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-left: 12px; }
.ws-music-meta b { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.18); }
.ws-music-meta i { overflow: hidden; color: rgba(255,255,255,.9); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.18); }
.ws-music-play { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 0; background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; text-shadow: 0 2px 10px rgba(0,0,0,.28); }
.ws-music-play svg { width: 24px; height: 24px; display: block; }
.ws-music.playing .ws-music-play { color: #fff; }

.ws-video { position: relative; z-index: 1; width: min(100%, 480px); max-width: 100%; margin: 16px 0; border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); isolation: isolate; }
/* 层级：卡片内是静音自动播放预览（对标 mmbkz），正文位于导航(20)/灯箱(900)/播放列表(2000)之下 */
.post-card, .post-detail, .post-content, .post-status-content { position: relative; z-index: 0; }
.ws-video, .ws-music { isolation: isolate; }
.ws-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; pointer-events: none; }
.ws-video video { display: block; width: 100%; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none; }
.ws-video-overlay { display: none; }
/* 静音预览卡片：点击进全屏灯箱播放 */
.ws-video-poster { cursor: pointer; aspect-ratio: 16 / 9; }
.ws-video-preview { position: absolute; inset: 0; width: 100%; height: 100%; }
.ws-video-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.42); color: #fff; transition: transform .2s ease, background .2s ease; }
.ws-video-play svg { width: 30px; height: 30px; }
.ws-video-poster:hover .ws-video-play { transform: scale(1.1); background: rgba(0,0,0,.6); }
.ws-video-poster:focus-visible { outline: 2px solid var(--theme, #ff9260); outline-offset: 2px; }

.ws-gallery { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 18px 0; }
.ws-gallery img { width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 10px; }
.ws-gallery-2 { grid-template-columns: repeat(2, 1fr); }
.ws-gallery-3 { grid-template-columns: repeat(3, 1fr); }
.ws-gallery img { aspect-ratio: 1; }
.ws-gallery br { display: none; }

.ws-code { position: relative; margin: 16px 0; padding: 18px 16px; border-radius: 12px; background: #202733; color: #e7edf5; font-size: 12.5px; line-height: 1.75; overflow: auto; }
.ws-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 7px; right: 12px; color: #8fa0b5; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ws-code code { font-family: Consolas, Monaco, Menlo, monospace; white-space: pre; }

/* ---------- 响应式 ---------- */
@media (max-width: 1060px) {
    .main-grid { grid-template-columns: 1fr; }
    .main_sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .sidebar-row { grid-column: span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    :root { --nav-offset: 68px; }
    .page-wrap { padding: 10px 10px 30px; }
    .hero { height: 280px; border-radius: 14px; }
    .hero-avatar { width: 68px; height: 68px; margin-bottom: 10px; }
    .hero-title { font-size: 21px; }
    .hero-subtitle { font-size: 11px; }
    .nav { padding: 0 12px; height: 54px; }
    .nav-menu-btn { display: inline-flex; }
    .nav-main {
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-12px) scale(.985);
        transform-origin: top center;
        background: var(--card);
        border-radius: 14px;
        box-shadow: var(--shadow-hover);
        z-index: 30;
        transition: max-height .3s ease, opacity .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1), padding .25s ease, visibility .25s;
    }
    .nav-main.open {
        max-height: 420px;
        padding: 10px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }
    .nav-item { justify-content: flex-start; }
    .nav-dropdown-menu {
        position: static;
        display: block;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 12px;
        background: transparent;
        transform: none;
        visibility: visible;
        transition: max-height .28s ease, opacity .22s ease, padding .28s ease;
    }
    .nav-dropdown.open .nav-dropdown-menu { max-height: 240px; opacity: 1; padding: 0 0 6px 12px; }
    .main_sidebar { grid-template-columns: 1fr; }
    .sidebar-row { grid-column: span 1; }
    .post-card { padding: 18px 18px 14px; }
    .post-detail { padding: 20px 18px; }
    .post-detail-title { font-size: 21px; }
    .post-thumbs { height: 190px; }
    .comment-fields { grid-template-columns: 1fr; }
    .post-tags { margin-left: 0; width: 100%; }
    .float-tools { right: 14px; bottom: 18px; }
    .ws-download { flex-wrap: wrap; }
    .ws-download-code { display: inline-block; margin: 4px 0 0; }
    .ws-card { padding: 13px 40px 13px 13px; }
    .ws-card-avatar { width: 44px; height: 44px; flex-basis: 44px; }
    .lightbox { padding: 16px; }
    .lightbox-media { width: 100%; }
    .ws-music { --music-cover: 90px; width: 100%; height: 90px; }
    .ws-music-cover { height: 90px; }
    .ws-gallery-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 全站浮动音乐控件（playing 时常驻，点击停止后隐藏） ===== */
.warm-music-widget {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    max-width: calc(100vw - 32px);
    padding: 9px 12px 9px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: linear-gradient(135deg, #33405a, #1f293c);
    box-shadow: 0 12px 34px rgba(20, 28, 42, .38);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.94);
    transition: opacity .32s ease, transform .32s ease, visibility .32s;
}
.warm-music-widget.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.warm-music-widget:hover { box-shadow: 0 16px 44px rgba(20, 28, 42, .5); }

/* 旋转唱片封面 */
.wmw-disc {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    animation: wmw-spin 7s linear infinite;
}
.wmw-disc .wmw-cover {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background-color: #55627d;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, .85);
    overflow: hidden;
}
.wmw-disc .wmw-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(240, 163, 94, .85);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .05);
}
.warm-music-widget:not(.show) .wmw-disc { animation-play-state: paused; }
@keyframes wmw-spin { to { transform: rotate(360deg); } }

.wmw-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; line-height: 1.2; }
.wmw-name { font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 128px; }
.wmw-author { font-size: 10px; color: rgba(255, 255, 255, .68); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 128px; font-style: normal; }

/* 跳动的均衡器 */
.wmw-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; margin-top: 2px; }
.wmw-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--theme); animation: wmw-eq 1s ease-in-out infinite alternate; }
.wmw-eq i:nth-child(2) { animation-delay: .18s; }
.wmw-eq i:nth-child(3) { animation-delay: .36s; }
.wmw-eq i:nth-child(4) { animation-delay: .54s; }
@keyframes wmw-eq { from { height: 3px; } to { height: 11px; } }
.warm-music-widget:not(.show) .wmw-eq i { animation-play-state: paused; }

.wmw-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.wmw-stop:hover { background: rgba(255, 255, 255, .3); transform: scale(1.08); }

@media (max-width: 720px) {
    .warm-music-widget { left: 12px; bottom: 14px; min-width: 180px; padding: 8px 10px 8px 8px; gap: 9px; }
    .wmw-disc { width: 40px; height: 40px; flex-basis: 40px; }
    .wmw-name, .wmw-author { max-width: 96px; }
}

/* ===================================================================
 * 文章列表卡片：按优先级展示的特色内容（摘要 / 视频 / 音乐 / 图片）
 * =================================================================== */
.post-feature-media { margin-top: 14px; }
.post-feature-media .ws-music { margin: 0; border-radius: 12px; }
.post-feature-media .ws-video { margin: 0; border-radius: 12px; box-shadow: none; }
.post-feature-media .ws-video iframe { aspect-ratio: 16 / 9; max-height: none; }
.post-feature-media .ws-video video { max-height: none; }
.post-feature-images .post-thumbs { margin-top: 0; height: 200px; }

/* ===================================================================
 * 右侧音乐播放列表面板
 * 由播放器动态注入；封面背景在顶部淡化显示，含进度条与播放控制。
 * =================================================================== */
body.playlist-open { overflow: hidden; }

.music-playlist {
    position: fixed; inset: 0; z-index: 2000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility 0s linear .6s;
}
.music-playlist.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transition: opacity .6s ease, visibility 0s linear 0s;
}
.mpl-mask {
    position: absolute; inset: 0;
    background: rgba(18, 24, 36, .42);
}

.mpl-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    width: 380px;
    max-width: 92vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    color: var(--text);
    box-shadow: -16px 0 48px rgba(20, 28, 42, .22);
}

/* 顶部淡化封面背景（叠加暗色遮罩，保证白色文字可读） */
.mpl-cover-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 220px;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.2);
    opacity: .42;
    transform: scale(1.18);
    transform-origin: top center;
    pointer-events: none;
}
.mpl-cover-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .2), var(--card));
}
/* 独立暗色遮罩层：不随封面 opacity / blur 被冲淡 */
.mpl-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 250px;
    z-index: 1;
    background: linear-gradient(to bottom,
        rgba(8, 12, 20, .62) 0%,
        rgba(8, 12, 20, .42) 52%,
        rgba(8, 12, 20, 0) 100%);
    pointer-events: none;
}

.mpl-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 10px;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .72);
}
.mpl-head-title { display: flex; flex-direction: column; min-width: 0; }
.mpl-title-text { font-size: 16px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mpl-count { font-size: 11px; opacity: .85; font-weight: 400; }
.mpl-hide {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: 0 0 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 20px; line-height: 1;
    transition: background .2s, transform .15s;
}
.mpl-hide:hover { background: rgba(255, 255, 255, .34); transform: rotate(90deg); }

/* 歌单切换栏：显示当前歌单，点击展开歌单列表 */
.mpl-collection-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 18px 4px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--card-soft);
    border: 1px solid var(--line);
}
.mpl-collection-label {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--muted);
}
.mpl-collection-current {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    padding: 3px 4px;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
    transition: background .2s;
}
.mpl-collection-current:hover { background: var(--theme-fade); }
.mpl-collection-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mpl-collection-arrow {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--muted);
    transition: transform .25s ease;
}
.mpl-collection-current[aria-expanded="true"] .mpl-collection-arrow { transform: rotate(180deg); }
.mpl-collection-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(20, 28, 42, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.mpl-collection-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s;
}
.mpl-collection-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    text-align: left;
}
.mpl-collection-option:hover { background: var(--card-soft); }
.mpl-collection-option.active { background: var(--theme-fade); }
.mpl-collection-option b {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mpl-collection-option small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.mpl-collection-check { flex: 0 0 auto; color: var(--theme-deep); font-size: 12px; }
.mpl-collection-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12px; }

.mpl-now {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px 14px;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .72);
}
.mpl-now-cover {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; flex: 0 0 54px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, .18);
    background-size: cover; background-position: center;
    border: 2px solid rgba(255, 255, 255, .5);
    font-size: 24px;
    overflow: hidden;
}
.mpl-now-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.4; }
.mpl-now-source {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    opacity: .82;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mpl-now-name { font-size: 15px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mpl-now-author { font-size: 12px; opacity: .85; font-style: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mpl-now-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.mpl-now-eq i { width: 3px; height: 4px; border-radius: 2px; background: #fff; animation: wmw-eq 1s ease-in-out infinite alternate; }
.mpl-now-eq i:nth-child(2) { animation-delay: .18s; }
.mpl-now-eq i:nth-child(3) { animation-delay: .36s; }
.mpl-now-eq i:nth-child(4) { animation-delay: .54s; }

/* 进度条 */
.mpl-progress-wrap { position: relative; z-index: 1; padding: 6px 18px 4px; color: var(--text); }
.mpl-progress {
    position: relative;
    height: 5px;
    border-radius: 99px;
    background: rgba(150, 160, 175, .38);
    cursor: pointer;
}
.mpl-progress-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 0;
    border-radius: 99px;
    background: var(--theme);
}
.mpl-times { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: var(--muted); }

/* 控制按钮 */
.mpl-controls {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    padding: 8px 14px 16px;
}
.mpl-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 0; padding: 0;
    border-radius: 50%;
    background: var(--card-soft);
    color: var(--text);
    transition: background .2s, transform .15s, color .2s;
}
.mpl-btn svg { width: 20px; height: 20px; display: block; }
.mpl-btn:hover { background: var(--theme-fade); color: var(--theme-deep); transform: scale(1.06); }
.mpl-playtoggle {
    width: 52px; height: 52px;
    background: var(--theme);
    color: #fff;
    box-shadow: 0 6px 18px rgba(240, 163, 94, .4);
}
.mpl-playtoggle svg { width: 24px; height: 24px; }
.mpl-playtoggle:hover { background: var(--theme-deep); color: #fff; }
.mpl-mode {
    width: 34px; height: 34px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--theme-deep);
}
.mpl-mode svg { width: 18px; height: 18px; }
.mpl-mode:hover { background: var(--theme-fade); }
.mpl-mode[data-mode="random"] { color: #e0703a; }
.mpl-mode[data-mode="single"] { color: #3a9e7a; }

.mpl-list-head {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px 8px;
    font-size: 12px; font-weight: 700;
    color: var(--text-strong);
    border-top: 1px solid var(--line);
}
.mpl-list-hint { font-weight: 400; color: var(--muted); font-size: 11px; }
.mpl-list {
    position: relative; z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px 22px;
    scrollbar-width: thin;
}
.mpl-list::-webkit-scrollbar { width: 5px; }
.mpl-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.mpl-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s;
}
.mpl-item:hover { background: var(--card-soft); }
.mpl-item.active { background: var(--theme-fade); }
.mpl-item-cover {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 8px;
    background-color: var(--card-soft);
    background-size: cover; background-position: center;
    color: var(--muted);
    font-size: 16px;
    overflow: hidden;
}
.mpl-item-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.mpl-item-meta b { font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mpl-item-meta i { font-size: 11px; color: var(--muted); font-style: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mpl-item.active .mpl-item-meta b { color: var(--theme-deep); }
.mpl-item-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: 0 0 auto; }
.mpl-item-eq i { width: 2px; height: 3px; border-radius: 2px; background: var(--theme); animation: wmw-eq .9s ease-in-out infinite alternate; }
.mpl-item-eq i:nth-child(2) { animation-delay: .2s; }
.mpl-item-eq i:nth-child(3) { animation-delay: .4s; }
.mpl-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 12px; }

/* ===================================================================
 * 音乐播放顶部通知（淡入淡出）
 * 由播放器动态注入：开始播放显示歌名，停止播放显示提示。
 * =================================================================== */
.warm-music-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: calc(100vw - 32px);
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(34, 50, 70, .94);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 28px rgba(20, 28, 42, .26);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}
.warm-music-notice.show {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s linear 0s;
}
@media (max-width: 640px) {
    .warm-music-notice { font-size: 12px; padding: 9px 16px; top: 12px; }
}

/* ---------- 归档页面 page-archive.php ---------- */
.archive-hero { padding: 26px 28px 22px; position: relative; overflow: hidden; }
.archive-hero::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--theme-fade);
    pointer-events: none;
}
.archive-hero-head { display: flex; align-items: center; gap: 13px; position: relative; }
.archive-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--theme-fade);
    color: var(--theme-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.archive-hero-icon svg { width: 23px; height: 23px; }
.archive-hero-title { font-size: 20px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.archive-hero-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.archive-stats { display: flex; gap: 12px; margin-top: 20px; position: relative; flex-wrap: wrap; }
.archive-stat {
    flex: 1;
    min-width: 110px;
    background: var(--card-soft);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.archive-stat strong { display: block; font-size: 21px; font-weight: 700; color: var(--theme-deep); line-height: 1.2; }
.archive-stat span { font-size: 11px; color: var(--muted); }
.archive-year-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; }
.archive-year-nav a {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--theme-fade);
    color: var(--theme-deep);
    transition: transform .2s, background .2s, color .2s;
}
.archive-year-nav a span { opacity: .7; }
.archive-year-nav a:hover { transform: translateY(-2px); background: var(--theme-soft); color: var(--theme-deep); }

.archive-intro { padding: 20px 26px; }

.archive-timeline { display: flex; flex-direction: column; gap: 16px; }
.archive-year-card { padding: 24px 28px 20px; scroll-margin-top: var(--nav-offset); }
.archive-year-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.archive-year-num { font-size: 24px; font-weight: 800; color: var(--theme-deep); letter-spacing: .5px; }
.archive-year-count { font-size: 11px; color: var(--muted); }
.archive-month { padding-top: 16px; }
.archive-month-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.archive-month-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--theme); flex-shrink: 0; }
.archive-month-label span { color: var(--muted); font-weight: 400; }
.archive-list { list-style: none; display: flex; flex-direction: column; }
.archive-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    border-radius: 8px;
    transition: background .2s, transform .2s;
}
.archive-item:hover { background: var(--card-soft); transform: translateX(3px); }
.archive-item time {
    font-size: 12px;
    color: var(--muted);
    flex-shrink: 0;
    width: 42px;
    font-variant-numeric: tabular-nums;
}
.archive-item-title {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s;
}
.archive-item:hover .archive-item-title { color: var(--theme-deep); }
.archive-item-arrow {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 14px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s, transform .2s, color .2s;
}
.archive-item:hover .archive-item-arrow { opacity: 1; transform: none; color: var(--theme-deep); }

.archive-empty { padding: 60px 20px; text-align: center; }
.archive-empty p { color: var(--muted); margin-bottom: 12px; }
.archive-empty a { color: var(--theme-deep); font-weight: 600; }

@media (max-width: 720px) {
    .archive-hero, .archive-year-card, .archive-intro { padding: 20px 18px; }
    .archive-stat { min-width: calc(50% - 6px); }
    .archive-year-num { font-size: 21px; }
    .archive-item { gap: 10px; padding: 10px 8px; }
    .archive-item time { width: 38px; font-size: 11px; }
    .archive-item-title { font-size: 12.5px; }
    .archive-item-arrow { display: none; }
}

/* ---------- 播放音乐时头图头像旋转 + 耳机 ---------- */
.hero-avatar-wrap { position: relative; display: inline-block; margin-bottom: 14px; line-height: 0; }
.hero-avatar { position: relative; margin-bottom: 0; }
.hero-avatar img { transition: transform .4s ease; }
body.music-playing .hero-avatar img {
    animation: warmsun-avatar-spin 8s linear infinite;
}
@keyframes warmsun-avatar-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.hero-headphones {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 142%;
    height: 142%;
    color: #fff;
    transform: translate(-50%, -50%) scale(.74);
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .6));
    transition: opacity .3s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 3;
}
body.music-playing .hero-headphones {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
@media (max-width: 720px) {
    .hero-avatar-wrap { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    body.music-playing .hero-avatar img { animation: none; }
    .hero-headphones { transition: opacity .3s ease; }
}

/* ---------- 播放时彩色音符飘出(摇动上浮) ---------- */
.hero-notes { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.hero-note {
    position: absolute;
    top: 40%;
    font-size: 22px;
    font-style: normal;
    line-height: 1;
    opacity: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    will-change: transform, opacity;
    --sway: 10px;
}
body.music-playing .hero-note { animation: warmsun-note-float 4.2s ease-in-out infinite; }
.note-1 { left: -4%;  color: #ff6b6b; animation-delay: 0s; }
.note-2 { left: 8%;   color: #ffd166; font-size: 18px; animation-delay: 1.05s; --sway: -8px; }
.note-3 { right: -6%; color: #6bc5ff; font-size: 20px; animation-delay: 2.1s; --sway: 12px; }
.note-4 { right: 6%;  color: #b388ff; animation-delay: 3.15s; --sway: -9px; }
@keyframes warmsun-note-float {
    0%   { opacity: 0;   transform: translate(0, 10px) scale(.6) rotate(-14deg); }
    14%  { opacity: 1;   transform: translate(calc(var(--sway) * -1), -2px) scale(1.05) rotate(9deg); }
    30%  { opacity: 1;   transform: translate(var(--sway), -16px) scale(1.08) rotate(-10deg); }
    47%  { opacity: .95; transform: translate(calc(var(--sway) * -1), -31px) scale(1.1) rotate(10deg); }
    64%  { opacity: .9;  transform: translate(var(--sway), -46px) scale(1.12) rotate(-8deg); }
    82%  { opacity: .65; transform: translate(calc(var(--sway) * -.55), -60px) scale(1.14) rotate(6deg); }
    100% { opacity: 0;   transform: translate(0, -74px) scale(1.16) rotate(0deg); }
}
@media (max-width: 720px) {
    .hero-note { font-size: 17px; }
    .note-2, .note-4 { font-size: 15px; }
    @keyframes warmsun-note-float {
        0%   { opacity: 0;   transform: translate(0, 7px) scale(.6) rotate(-14deg); }
        14%  { opacity: 1;   transform: translate(calc(var(--sway) * -1), -1px) scale(1.05) rotate(9deg); }
        30%  { opacity: 1;   transform: translate(var(--sway), -11px) scale(1.08) rotate(-10deg); }
        47%  { opacity: .95; transform: translate(calc(var(--sway) * -1), -22px) scale(1.1) rotate(10deg); }
        64%  { opacity: .9;  transform: translate(var(--sway), -32px) scale(1.12) rotate(-8deg); }
        82%  { opacity: .65; transform: translate(calc(var(--sway) * -.55), -42px) scale(1.14) rotate(6deg); }
        100% { opacity: 0;   transform: translate(0, -52px) scale(1.16) rotate(0deg); }
    }
}
@media (prefers-reduced-motion: reduce) {
    body.music-playing .hero-note { animation: none; opacity: 0; }
}

/* ---------- 首页卡片：最新评论预览（可折叠） ---------- */
.card-comments { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.card-comments-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
.card-comments-head > span { font-weight: 600; color: var(--text-strong); }
.card-comments-toggle { border: 0; background: none; color: var(--theme-deep); font-size: 11px; cursor: pointer; padding: 2px 0; display: inline-flex; align-items: center; gap: 3px; }
html.dark .card-comments-toggle { color: var(--theme); }
.card-comments-toggle .toggle-caret { display: inline-block; transition: transform .2s; }
.card-comments.expanded .card-comments-toggle .toggle-caret { transform: rotate(180deg); }
.card-comments-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card-comment-item { display: flex; gap: 9px; align-items: flex-start; }
.card-comment-item.is-extra { display: none; }
.card-comments.expanded .card-comment-item.is-extra { display: flex; }
.card-comment-avatar { flex: none; width: 30px; height: 30px; }
.card-comment-avatar .avatar-box,
.card-comment-avatar .avatar { width: 30px !important; height: 30px !important; display: block; }
.card-comment-body { min-width: 0; flex: 1; }
.card-comment-meta { display: flex; align-items: baseline; gap: 8px; }
.card-comment-author { font-size: 11px; font-weight: 600; color: var(--text-strong); }
.card-comment-meta time { font-size: 10px; color: var(--muted); }
.card-comment-text { margin-top: 2px; font-size: 11px; line-height: 1.6; color: var(--text); word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-comments-more { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--theme-deep); text-decoration: none; }
html.dark .card-comments-more { color: var(--theme); }
.card-comments-more:hover { text-decoration: underline; }
/* 卡片评论头像：博主角标缩小 + 回复按钮 */
.card-comment-avatar { display: inline-flex; cursor: default; }
.card-comment-avatar .author-badge { font-size: 8px; right: -6px; bottom: -4px; padding: 0 4px; }
.card-comment-foot { margin-top: 3px; }
.card-comment-reply { border: 0; background: none; padding: 0; font-size: 10px; line-height: 1; color: var(--muted); cursor: pointer; }
.card-comment-reply:hover { color: var(--theme-deep); }
html.dark .card-comment-reply:hover { color:var(--theme); }
/* 评论弹窗：淡入淡出 */
.comment-modal { opacity: 0; transition: opacity .24s ease; }
.comment-modal.is-visible { opacity: 1; }
.comment-modal .comment-modal-box { transform: translateY(12px) scale(.98); opacity: 0; transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .24s ease; }
.comment-modal.is-visible .comment-modal-box { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .comment-modal, .comment-modal .comment-modal-box { transition: none; }
}
/* 评论者省份标识 */
.comment-province { display: inline-block; flex: none; font-size: 10px; line-height: 1.6; padding: 0 7px; border-radius: 20px; color: var(--theme-deep); background: color-mix(in srgb, var(--theme) 12%, transparent); border: 1px solid color-mix(in srgb, var(--theme) 22%, transparent); white-space: nowrap; vertical-align: middle; }
html.dark .comment-province { color: var(--theme); }
.comment-province-sm { font-size: 9px; padding: 0 5px; line-height: 1.5; }

/* ---------- 首页快捷发布（仅博主登录可见） ---------- */
.quick-publish-card { margin-bottom: 18px; }
.quick-publish-card .card-title { padding: 16px 20px 0; }
#ws-quick-form { padding: 12px 20px 18px; }
.ws-quick-types { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ws-quick-type { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 18px; background: var(--card-soft); color: var(--muted); font-size: 12px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.ws-quick-type:has(input:checked) { border-color: var(--theme); background: var(--theme-soft); color: var(--theme-deep); }
.ws-quick-type input:checked + span { color: var(--theme-deep); font-weight: 600; }
.ws-quick-type input { width: 12px; height: 12px; margin: 0; accent-color: var(--theme-deep); }
.ws-quick-type-hint { flex: 1 1 100%; font-size: 11px; color: var(--muted); }
.ws-quick-title-wrap { margin-bottom: 9px; }
.ws-quick-title-wrap[hidden] { display: none !important; }
#ws-quick-title { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); color: var(--text-strong); font-size: 13px; }
#ws-quick-text { width: 100%; min-height: 96px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); color: var(--text); font-size: 13px; line-height: 1.7; }
#ws-quick-title:focus, #ws-quick-text:focus { border-color: var(--theme); background: var(--card); }
.ws-quick-category-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
#ws-quick-category { flex: 1 1 34%; min-width: 120px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); color: var(--text); font-size: 12px; cursor: pointer; }
#ws-quick-category:focus { border-color: var(--theme); background: var(--card); }
#ws-quick-category-new { flex: 1 1 60%; min-width: 160px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); color: var(--text); font-size: 12px; }
#ws-quick-category-new::placeholder { color: var(--muted); }
#ws-quick-category-new:focus { border-color: var(--theme); background: var(--card); }
.ws-quick-edit-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border-radius: 9px; background: #eef7f5; color: #2f7d74; font-size: 12px; }
/* display:flex 会覆盖 hidden 属性的默认 display:none，必须显式声明，编辑结束后才能真正隐藏 */
.ws-quick-edit-bar[hidden] { display: none !important; }
html.dark .ws-quick-edit-bar { background: #25423f; color: #8fe0d4; }
.ws-quick-edit-bar strong { font-weight: 600; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-quick-edit-cancel { margin-left: auto; flex: none; border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 7px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.ws-quick-edit-cancel:hover { opacity: .75; }
.ws-quick-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
/* 快捷发布表情面板：跟在按钮行之后，留出间距，不挡发布按钮 */
.ws-quick-actions + .ws-emoji-panel { margin: 10px 0 2px; }
.ws-quick-shortcode { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-soft); color: var(--theme-deep); font-size: 12px; }
.ws-quick-shortcode:hover { border-color: var(--theme); background: var(--theme-soft); }
.ws-quick-upload-btn { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-soft); color: var(--theme-deep); font-size: 12px; }
.ws-quick-upload-btn:hover { border-color: var(--theme); background: var(--theme-soft); }
.ws-quick-upload-btn:disabled { opacity: .6; cursor: wait; }
#ws-quick-upload[hidden] { display: none !important; }
.ws-quick-tip { flex: 1; font-size: 11px; color: var(--muted); }
.ws-quick-submit { flex: none; padding: 8px 22px; border-radius: 8px; background: var(--theme); color: #fff; font-size: 13px; font-weight: 600; }
.ws-quick-submit:hover { background: var(--theme-deep); }
.ws-quick-submit:disabled { opacity: .6; cursor: wait; }
/* 短代码面板：前台与后台共用 editor.js 的同一套按钮 */
#ws-shortcode-panel { position: fixed; width: 320px; max-width: calc(100vw - 16px); z-index: 9998; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 38px rgba(0,0,0,.2); }
.ws-panel-title { margin-bottom: 10px; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.ws-panel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ws-panel-btn { padding: 7px 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--card-soft); color: var(--text); font-size: 11px; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.ws-panel-btn:hover { border-color: var(--theme); background: var(--theme-soft); color: var(--theme-deep); }
/* 动态卡片：完整正文，媒体尺寸收敛到卡片宽度内 */
.post-card-status .post-status-content { margin-top: 14px; font-size: 14px; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.post-card-status .post-status-content p { margin: 0 0 10px; }
.post-card-status .post-status-content p:last-child { margin-bottom: 0; }
/* 动态正文图片：固定小图并排显示，点击可开灯箱 */
.post-card-status .post-status-content > p:has(> img) {
    display: inline-block;
    margin: 0 6px 6px 0;
    vertical-align: top;
}
.post-card-status .post-status-content > p:has(> img) > img,
.post-card-status .post-status-content > img {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 10px;
    cursor: zoom-in;
}
.post-card-status .post-status-content > p:has(> img) > img:hover,
.post-card-status .post-status-content > img:hover { opacity: .9; }
/* 正文表情：不按正文配图放大，保持评论里的小尺寸行内图片 */
.post-card-status .post-status-content p:has(> .ws-comment-emoji) {
    display: block !important;
    margin: 0 0 10px !important;
}
.post-content .ws-comment-emoji,
.post-status-content .ws-comment-emoji {
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 2px !important;
    border-radius: 4px !important;
    object-fit: contain !important;
    vertical-align: -6px !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}
.post-content .ws-comment-emoji:hover,
.post-status-content .ws-comment-emoji:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}
.post-card-status .ws-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.post-card-status .ws-gallery img {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    margin: 0;
    border-radius: 10px;
    cursor: zoom-in;
}
.post-card-status .ws-gallery img:hover { opacity: .9; }
.post-card-status .ws-video { margin: 12px 0; }
.post-card-status .ws-video iframe { max-height: none; }
.post-card-status .ws-video video { max-height: none; }
.post-card-status .ws-music { margin: 12px 0; }

/* 内容图片悬浮动效：轻微放大 + 提亮，配合灯箱点击 */
.post-content img,
.post-status-content img,
.ws-gallery img,
.post-thumb {
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, filter .35s ease;
}
.post-content img:hover,
.post-status-content img:hover,
.ws-gallery img:hover,
.post-thumb:hover {
    transform: scale(1.06);
    filter: brightness(1.06) saturate(1.12);
    box-shadow: 0 12px 28px rgba(20, 30, 45, .22);
}

/* ---------- KuroCat 桌宠：官网同款贴边偷看猫（页面真实元素，可全屏拖动） ---------- */
.ambient-edge-cat {
    position: fixed;
    left: 0;
    top: clamp(500px, 58vh, 680px);
    width: 360px;
    height: 264px;
    z-index: 860;
    background: transparent;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .45));
    transition: opacity .24s ease;
}
/* 贴左/右边缘时，裁掉屏幕外侧的一半，只露出探头部分 */
.ambient-edge-cat.edge-left { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .2)); }
.ambient-edge-cat.edge-left canvas { clip-path: inset(0 185px 0 0); -webkit-clip-path: inset(0 185px 0 0); }
.ambient-edge-cat.edge-right { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .2)); }
.ambient-edge-cat.edge-right canvas { clip-path: inset(0 0 0 185px); -webkit-clip-path: inset(0 0 0 185px); }
.ambient-edge-cat.is-dragging { cursor: grabbing !important; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .26)); }
.ambient-edge-cat.is-dragging canvas { clip-path: none !important; -webkit-clip-path: none !important; }
.ambient-edge-cat.petting { cursor: grab; }
.ambient-edge-cat.is-hidden { opacity: 0; pointer-events: none; }
.ambient-edge-cat canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.ambient-edge-cat canvas.hidden { display: none; }
/* 播放音乐时头顶飘出的音符气泡（贴左边缘时音符要在可见的右半部分，即容器 x≈175~360） */
.kuro-notes { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: hidden; }
.kuro-notes i { position: absolute; bottom: var(--note-y, 52%); font-style: normal; line-height: 1; opacity: 0; }
.kuro-notes i:nth-child(1) { font-size: 22px; color: #d4f044; text-shadow: 0 2px 8px rgba(0, 0, 0, .55), 0 0 12px rgba(212, 240, 68, .5); }
.kuro-notes i:nth-child(2) { font-size: 28px; color: #7fe9ff; text-shadow: 0 2px 8px rgba(0, 0, 0, .55), 0 0 12px rgba(127, 233, 255, .5); }
.kuro-notes i:nth-child(3) { font-size: 19px; color: #ffb3d9; text-shadow: 0 2px 8px rgba(0, 0, 0, .55), 0 0 12px rgba(255, 179, 217, .5); }
/* 猫猫语言气泡：跟随小猫，显示欢迎语与卡片/链接提示 */
.kuro-bubble {
    position: fixed;
    left: var(--bubble-x, 120px);
    top: var(--bubble-y, 300px);
    transform: translate(-50%, 10px) scale(.9);
    max-width: 260px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid var(--kuro-bubble-border);
    background: var(--kuro-bubble-bg);
    color: var(--kuro-bubble-ink);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    z-index: 900;
    pointer-events: none;
    opacity: 0;
    box-shadow: var(--kuro-bubble-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.kuro-bubble::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    transform: translateY(-50%);
}
.kuro-bubble.bubble-on-right::after {
    left: -8px;
    border-right: 8px solid var(--kuro-bubble-arrow);
}
.kuro-bubble.bubble-on-left::after {
    right: -8px;
    border-left: 8px solid var(--kuro-bubble-arrow);
}
.kuro-bubble.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (prefers-reduced-motion: reduce) { .kuro-bubble { transition: none; } }

/* 贴左：可见区是容器 x=0~175，三个音符横向错开 */
.ambient-edge-cat .kuro-notes i:nth-child(1) { left: var(--note-1x, 34%); }
.ambient-edge-cat .kuro-notes i:nth-child(2) { left: var(--note-2x, 46%); }
.ambient-edge-cat .kuro-notes i:nth-child(3) { left: var(--note-3x, 58%); }
/* 贴右：可见区是容器 x=185~360 */
/* 音符横向位置由 JS 按贴边/拖动状态写入 --note-* 变量，跟随小猫位置 */
/* 拖拽中整只猫可见，音符仍由 --note-* 变量跟随猫身 */
body.music-playing .ambient-edge-cat:not(.is-hidden) .kuro-notes i { animation: kuroNoteFloat 2.4s ease-out infinite; }
body.music-playing .ambient-edge-cat:not(.is-hidden) .kuro-notes i:nth-child(2) { animation-delay: .8s; }
body.music-playing .ambient-edge-cat:not(.is-hidden) .kuro-notes i:nth-child(3) { animation-delay: 1.6s; }
@keyframes kuroNoteFloat {
    0% { opacity: 0; transform: translateY(8px) scale(.6) rotate(-12deg); }
    18% { opacity: 1; transform: translateY(-6px) scale(1.05) rotate(-4deg); }
    70% { opacity: .9; }
    100% { opacity: 0; transform: translateY(-72px) scale(1.1) rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) { body.music-playing .ambient-edge-cat:not(.is-hidden) .kuro-notes i { animation: none; opacity: .85; } }
.ambient-edge-close {
    position: absolute; top: 10px; right: 10px; z-index: 6;
    width: 22px; height: 22px; padding: 0; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: #0e1016c7; color: #f5f5f7c7;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    transition: opacity .18s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.ambient-edge-cat.edge-left .ambient-edge-close { left: 10px; right: auto; }
.ambient-edge-cat.edge-right .ambient-edge-close { left: auto; right: 10px; }
.ambient-edge-cat:hover .ambient-edge-close, .ambient-edge-close:focus-visible { opacity: .9; }
.ambient-edge-cat.is-dragging .ambient-edge-close { opacity: 0; pointer-events: none; }
.ambient-edge-close:hover { opacity: 1; background: #ffffff24; border-color: #d4f044a6; color: #fff; }
/* 边缘吸附引导线：官网在拖到边缘时高亮，主题里默认不显示 */
#browser-edge-guide-left, #browser-edge-guide-right { display: none; }
@media (max-width: 1023px) {
    /* 与官网一致：窄屏不显示贴边猫和猫猫气泡 */
    .ambient-edge-cat, .kuro-bubble { display: none; }
}
