/*
Theme Name: Aria
Theme URI: https://github.com/gaorkang/aria-typecho
Author: gaorkang
Author URI: https://gaorkang.cn/
Description: Aria 是一款轻量、现代的 Typecho 博客主题。三栏卡片布局、Hero 轮播、天气长条、深色模式、沉浸式阅读目录、友链/归档/关于/留言板、评论归属地与设备、底部玻璃导航，零外部依赖、原生 JS 实现。
Version: 1.0.0
License: MIT
License URI: https://opensource.org/licenses/MIT
*/
/* 设计参考：Robes（https://robes.xin/），代码为独立实现 */

:root {
    --bg: #f7f8fa;
    --card: rgba(255, 255, 255, .92);
    --card-solid: #fff;
    --text: #1d2129;
    --text-2: #4e5969;
    --muted: #86909c;
    --border: #eef0f3;
    --primary: #3858f6;
    --primary-soft: #eef2ff;
    --red: #ff4d4f;
    --orange: #ffba3a;
    --green: #4abd86;
    --shadow: 0 8px 28px rgba(29, 26, 49, .055);
    --radius: 16px;
    --radius-sm: 9px;
    /* Liquid Glass 悬浮玻璃 */
    --glass: rgba(255, 255, 255, .58);
    --glass-stuck: rgba(255, 255, 255, .76);
    --glass-line: rgba(255, 255, 255, .72);
    --glass-shine: rgba(255, 255, 255, .92);
    --glass-shadow: 0 12px 34px rgba(31, 35, 66, .10), 0 2px 8px rgba(31, 35, 66, .05);
}

html[data-theme="dark"] {
    --bg: #14161c;
    --card: rgba(32, 35, 43, .88);
    --card-solid: #202329;
    --text: #e8eaf0;
    --text-2: #c3c8d2;
    --muted: #8a93a2;
    --border: #2e323c;
    --primary: #7089ff;
    --primary-soft: #252b46;
    --shadow: 0 8px 28px rgba(0, 0, 0, .22);
    --glass: rgba(34, 38, 49, .58);
    --glass-stuck: rgba(30, 33, 43, .78);
    --glass-line: rgba(255, 255, 255, .13);
    --glass-shine: rgba(255, 255, 255, .14);
    --glass-shadow: 0 12px 34px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.ico {
    display: inline-block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.2em;
    flex: none;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 背景光晕 */
.site-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(760px 420px at 3% 2%, #fff3d8 0%, rgba(255, 243, 216, 0) 70%),
        radial-gradient(700px 460px at 88% 0%, #e9e7ff 0%, rgba(233, 231, 255, 0) 72%),
        radial-gradient(900px 520px at 62% 68%, #eef4ff 0%, rgba(238, 244, 255, 0) 76%),
        linear-gradient(180deg, #fbfbfd 0%, #f6f7fa 100%);
}
html[data-theme="dark"] .site-background {
    background:
        radial-gradient(760px 420px at 3% 2%, #2b251d 0%, rgba(43, 37, 29, 0) 70%),
        radial-gradient(700px 460px at 88% 0%, #25223a 0%, rgba(37, 34, 58, 0) 72%),
        radial-gradient(900px 520px at 62% 68%, #1b2333 0%, rgba(27, 35, 51, 0) 76%),
        linear-gradient(180deg, #16181e 0%, #121419 100%);
}

/* 阅读进度 */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 90;
    background: linear-gradient(90deg, #ffba3a, var(--primary));
    transition: width .12s linear;
}

/* 顶部导航 */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: auto;
    padding: 10px 16px 8px;
}
.topbar-inner {
    max-width: 1280px;
    height: 58px;
    margin: 0 auto;
    padding: 0 14px 0 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--glass-line);
    border-radius: 20px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-shine);
    transition: background .25s, box-shadow .25s;
}
.topbar.is-stuck .topbar-inner {
    background: var(--glass-stuck);
    box-shadow: 0 10px 30px rgba(31, 35, 66, .12), inset 0 1px 0 var(--glass-shine);
}
.brand {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1.4px;
    line-height: 1;
    white-space: nowrap;
}
.brand sup { font-size: 9px; font-weight: 500; margin-left: 2px; vertical-align: super; }
.brand img { max-height: 30px; width: auto; }

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
}
.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}
.nav > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav a {
    font-size: 13px;
    color: var(--text-2);
    transition: color .2s;
    white-space: nowrap;
}
.nav a:hover, .nav .current a { color: var(--primary); }
.nav .has-sub > a::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 138px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: .2s;
}
.nav .has-sub:hover .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub-menu a { display: block; padding: 7px 10px; border-radius: 7px; font-size: 12px; }
.sub-menu a:hover { background: var(--primary-soft); }

.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--glass-line);
    border-radius: 50%;
    background: var(--glass);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    color: var(--text-2);
    box-shadow: inset 0 1px 0 var(--glass-shine), 0 3px 10px rgba(31, 35, 66, .07);
    transition: .2s;
}
html[data-theme="dark"] .icon-btn { background: var(--glass); }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.icon-btn .ico { width: 17px; height: 17px; }
.menu-btn { display: none; }

/* 布局 */
.layout {
    max-width: 1280px;
    margin: 4px auto 0;
    padding: 18px 24px 36px;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr) 282px;
    gap: 24px;
    align-items: start;
}
.col { min-width: 0; }
.profile-col, .side-col { position: sticky; top: 92px; }
.main-col { display: flex; flex-direction: column; gap: 18px; }

/* 文章页：左侧目录 + 最佳阅读宽度的正文 */
body.is-post-page .layout {
    max-width: 1180px;
    grid-template-columns: 220px minmax(0, 780px);
    justify-content: center;
    gap: 40px;
}
.post-toc-col { position: sticky; top: 92px; align-self: start; }
.post-toc-sticky {
    position: relative;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 4px 0 4px 2px;
    scrollbar-width: thin;
}
.post-toc-heading {
    display: flex; align-items: center; gap: 7px;
    margin: 0 0 14px; padding: 0 0 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 700; color: var(--text);
    letter-spacing: .5px;
}
.post-toc-heading .ico { width: 15px; height: 15px; color: var(--primary); }
.post-toc-list { position: relative; display: flex; flex-direction: column; gap: 2px; }
.post-toc-list::before {
    content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
    width: 2px; border-radius: 2px; background: var(--border);
}
.post-toc-list a {
    position: relative; display: block;
    padding: 6px 8px 6px 20px; border-radius: 7px;
    font-size: 12px; line-height: 1.6; color: var(--muted);
    transition: color .2s, background .2s;
}
.post-toc-list a::before {
    content: ""; position: absolute; left: 2px; top: 50%;
    width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
    background: var(--card-solid); border: 2px solid var(--border);
    transition: border-color .2s, background .2s;
}
.post-toc-list a.level-h3 { padding-left: 32px; font-size: 11.5px; }
.post-toc-list a.level-h3::before { left: 14px; width: 6px; height: 6px; margin-top: -3px; }
.post-toc-list a:hover { color: var(--primary); background: var(--primary-soft); }
.post-toc-list a.is-active { color: var(--primary); font-weight: 600; background: var(--primary-soft); }
.post-toc-list a.is-active::before { border-color: var(--primary); background: var(--primary); }
.post-toc-empty { padding: 6px 8px 6px 20px; font-size: 12px; color: var(--muted); }
.post-toc-foot {
    margin-top: 14px; padding: 9px 10px;
    border-radius: 9px; background: var(--primary-soft);
    font-size: 11px; color: var(--primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.is-post-page .toc-fab.show { display: none; }

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
html[data-theme="dark"] .card { border-color: var(--border); }
.card + .card { margin-top: 16px; }
.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}
.card-title .more { color: var(--muted); font-weight: 400; }

/* 左侧作者卡片 */
.profile-card { text-align: center; padding: 24px 20px; }
.avatar-wrap { position: relative; display: inline-block; }
.avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #dfe8ff, #f6e6ff);
    border: 3px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 14px rgba(56, 88, 246, .12);
}
.avatar-fallback {
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}
.avatar-badge {
    position: absolute;
    right: -2px;
    bottom: 4px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc247, #ff8a3d);
    color: #fff;
    border: 2px solid #fff;
}
.avatar-badge .ico { width: 10px; height: 10px; stroke-width: 3; }
.profile-name { margin: 12px 0 4px; font-size: 16px; font-weight: 700; }
.profile-badge-row { display: flex; justify-content: center; }
.profile-badge {
    display: inline-block;
    padding: 0 9px;
    border: 1px solid #ffd591;
    border-radius: 999px;
    color: #d48806;
    background: #fffbe6;
    font-size: 10px;
    line-height: 18px;
}
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
}
.profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    transition: transform .2s, box-shadow .2s;
}
.profile-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .85;
}
.profile-tag:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(29, 26, 49, .08); }
.profile-tag-0 { color: #2f6bff; background: #eef3ff; border-color: #dce7ff; }
.profile-tag-1 { color: #0f9b76; background: #e8f8f2; border-color: #cdeee0; }
.profile-tag-2 { color: #c2660d; background: #fff3e6; border-color: #ffe2bf; }
.profile-tag-3 { color: #8b5cf6; background: #f3edff; border-color: #e6d9ff; }
html[data-theme="dark"] .profile-tag-0 { color: #8fb0ff; background: rgba(47,107,255,.14); border-color: rgba(47,107,255,.26); }
html[data-theme="dark"] .profile-tag-1 { color: #5fd3ac; background: rgba(15,155,118,.14); border-color: rgba(15,155,118,.26); }
html[data-theme="dark"] .profile-tag-2 { color: #f0a75a; background: rgba(194,102,13,.14); border-color: rgba(194,102,13,.26); }
html[data-theme="dark"] .profile-tag-3 { color: #b79bff; background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.26); }
.profile-bio {
    margin: 12px 0 8px;
    font-size: 12px;
    line-height: 1.9;
    color: var(--text-2);
    word-break: break-word;
}
.profile-ip { font-size: 11px; color: var(--muted); }

.stat-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat-item {
    position: relative;
    overflow: hidden;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.stat-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.stat-label .ico { width: 13px; height: 13px; color: var(--muted); }
.stat-num { margin-top: 2px; font-size: 25px; font-weight: 700; line-height: 1.3; }
.stat-deco {
    position: absolute;
    right: -14px;
    bottom: -16px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 226, 175, .55), rgba(255, 208, 150, .25));
    opacity: .55;
    pointer-events: none;
}
.stat-item:nth-child(2) .stat-deco { background: linear-gradient(135deg, rgba(214, 205, 255, .55), rgba(196, 205, 255, .25)); }

.social-row { display: flex; justify-content: space-around; gap: 8px; }
.social-link {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 600;
    transition: .2s;
}
.social-link:hover { color: #fff; background: var(--primary); border-color: var(--primary); transform: translateY(-2px); }

/* 横幅与分类 tabs */
.banner {
    position: relative;
    overflow: hidden;
    height: 108px;
    border-radius: 12px;
    background: linear-gradient(115deg, #111827 0%, #252046 45%, #5b2c6f 72%, #1e3a5f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 26px;
    color: #fff;
}
.banner::after {
    content: "";
    position: absolute;
    inset: -40% -10%;
    background: radial-gradient(circle at 70% 45%, rgba(255, 95, 190, .55), transparent 26%),
                radial-gradient(circle at 38% 65%, rgba(62, 196, 255, .45), transparent 28%);
    filter: blur(6px);
    pointer-events: none;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-label, .banner-note { position: relative; z-index: 1; }
.banner-label { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.banner-note { font-size: 12px; opacity: .72; }

/* 文章卡片 */
.post-card { padding: 20px 22px 12px; }
.post-head { display: flex; align-items: center; gap: 9px; }
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #dfe8ff, #f6e6ff);
    flex: none;
}
.post-author { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.post-meta { font-size: 11px; color: var(--muted); line-height: 1.3; }
.post-head .post-author-link { display: flex; flex-direction: column; }
.sticky-badge {
    display: inline-block;
    margin-right: 4px;
    padding: 0 6px;
    border-radius: 4px;
    background: linear-gradient(120deg, #ff7a45, #ff4d4f);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    vertical-align: 1px;
}
.post-title { margin: 12px 0 6px; font-size: 17px; line-height: 1.55; font-weight: 600; letter-spacing: -.2px; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--primary); }
.post-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.post-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.post-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--border);
    cursor: zoom-in;
}
.post-images.single { grid-template-columns: 1fr; max-width: 72%; }
.post-images.single img { aspect-ratio: 16 / 9; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    line-height: 18px;
    white-space: nowrap;
    transition: .2s;
}
.tag:hover { background: var(--primary); color: #fff; }
.tag-extra { display: none; }
.tags.expanded .tag-extra { display: inline-block; }
.tag-more {
    padding: 2px 9px;
    border: 0;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    line-height: 18px;
    cursor: pointer;
    transition: .2s;
}
.tag-more:hover { background: var(--primary); color: #fff; }

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 6px;
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
}
.action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    transition: color .2s;
}
.action:hover { color: var(--primary); }
.action.is-active { color: var(--red); }
.action.is-starred { color: var(--orange); }
.action .ico { width: 15px; height: 15px; }

/* 分页 */
.page-navigator {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}
.page-navigator li a, .page-navigator li span {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    font-size: 12px;
}
.page-navigator li.current a, .page-navigator li a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

/* 右侧栏 */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
    color: var(--text-2);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}
.notice-bar .ico { color: var(--orange); }
.notice-bar span { overflow: hidden; text-overflow: ellipsis; }

.side-card { padding: 17px; }
.hot-list { display: flex; flex-direction: column; gap: 7px; }
.hot-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff5f5;
    color: #4e5969;
    font-size: 12px;
}
html[data-theme="dark"] .hot-item { background: #35272c; color: #d7cdd0; }
.hot-item:hover { background: #ffe9e9; }
html[data-theme="dark"] .hot-item:hover { background: #493037; }
.hot-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-badge {
    flex: none;
    padding: 0 4px;
    border-radius: 3px;
    background: linear-gradient(120deg, #ff7a45, #ff3e3e);
    color: #fff;
    font-size: 9px;
    line-height: 14px;
    font-weight: 600;
}

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: var(--border);
    cursor: zoom-in;
    transition: transform .2s;
}
.gallery-grid img:hover { transform: scale(1.04); }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12px; color: var(--text-2); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a:hover { color: var(--primary); }
.mini-user { display: flex; align-items: center; gap: 8px; }
.mini-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.mini-excerpt { color: var(--muted); font-size: 11px; }

/* 标签云：多行无缝横向滚动，相邻行反向，卡片更饱满 */
.tag-cloud-marquee {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 2px 0;
}
.tag-cloud-row {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.tag-cloud-track {
    display: flex;
    width: max-content;
    animation: ar-tag-scroll 24s linear infinite;
}
.tag-cloud-row.reverse .tag-cloud-track { animation-direction: reverse; }
.tag-cloud-track:hover,
.tag-cloud-marquee:hover .tag-cloud-track { animation-play-state: paused; }
.tag-cloud-set { display: flex; flex: 0 0 auto; gap: 8px; padding-right: 8px; }
.tag-cloud-set .tag {
    padding: 5px 12px;
    font-size: 12px;
    line-height: 20px;
}
@keyframes ar-tag-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--tag-shift, -33.333%)); }
}

.ad-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 108px;
    padding: 0 20px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(115deg, #131c27, #3a2353 60%, #1d4560);
    color: #fff;
}
.ad-banner.compact { height: 88px; }
.ad-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-banner > * { position: relative; z-index: 1; }
.ad-label { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.ad-note { font-size: 11px; opacity: .7; }

/* 文章详情 */
body.is-post-page .detail-card { padding: 34px 38px 24px; }
body.is-post-page .detail-title { margin: 20px 0 14px; font-size: 27px; line-height: 1.45; }
body.is-post-page .post-content { font-size: 16px; line-height: 1.95; }
body.is-post-page .post-content h2 { font-size: 22px; margin: 34px 0 14px; }
body.is-post-page .post-content h3 { font-size: 18px; margin: 28px 0 12px; }
body.is-post-page .post-content p { margin: 0 0 20px; }
body.is-post-page .post-content h2,
body.is-post-page .post-content h3,
body.is-post-page .post-content h4 { scroll-margin-top: 96px; }
.detail-card { padding: 24px 28px 18px; }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-title { margin: 16px 0 10px; font-size: 21px; line-height: 1.5; font-weight: 700; }
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 10px 0 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}
.post-content { padding: 18px 0 6px; font-size: 14px; line-height: 2; color: var(--text-2); word-break: break-word; }
.post-content p { margin: 0 0 16px; }
.post-content h2, .post-content h3, .post-content h4 { margin: 28px 0 12px; color: var(--text); line-height: 1.4; }
.post-content h2 { font-size: 19px; }
.post-content h3 { font-size: 16px; }
.post-content img { display: block; height: auto; margin: 16px auto; border-radius: 10px; cursor: zoom-in; }
.post-content blockquote {
    position: relative;
    margin: 18px 0;
    padding: 14px 18px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-2);
}
.post-content blockquote::after { content: "\201D"; position: absolute; right: 14px; bottom: -6px; font-size: 38px; color: rgba(134, 144, 156, .25); }
.post-content pre { overflow: auto; padding: 14px; border-radius: 10px; background: #1d2129; color: #e8eaf0; font-size: 12px; }
.post-content code { padding: 2px 5px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-size: .9em; }
.post-content pre code { padding: 0; background: none; color: inherit; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content th, .post-content td { padding: 8px 10px; border: 1px solid var(--border); }

.paywall {
    margin: 18px 0;
    padding: 18px;
    text-align: center;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-2);
    font-size: 13px;
}
.paywall .btn-primary { margin-top: 12px; }
.btn-primary {
    display: inline-block;
    padding: 7px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
}
.btn-primary:hover { filter: brightness(1.08); }

.vote-row { display: flex; justify-content: space-around; gap: 8px; padding: 16px 0 6px; }
.vote-row .action { font-size: 13px; }
.vote-avatars { display: flex; justify-content: center; align-items: center; margin: 2px 0 6px; }
.vote-avatars img { width: 26px; height: 26px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--card-solid); }
.vote-avatars span { margin-left: 8px; font-size: 11px; color: var(--muted); }

.post-near { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.post-near li { padding: 12px 14px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 12px; color: var(--text-2); }
.post-near li span { display: block; color: var(--muted); font-size: 11px; }
.post-near a:hover { color: var(--primary); }

/* 文章目录 */
.toc-fab {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 45;
    display: none;
}
.toc-fab.show { display: block; }
.toc-fab button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-solid);
    color: var(--primary);
    box-shadow: var(--shadow);
}
.toc-panel {
    position: absolute;
    right: 0;
    bottom: 50px;
    width: 230px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-solid);
    box-shadow: var(--shadow);
    display: none;
}
.toc-panel.open { display: block; }
.toc-panel a { display: block; padding: 5px 7px; border-radius: 6px; font-size: 12px; color: var(--text-2); }
.toc-panel a:hover { background: var(--primary-soft); color: var(--primary); }
.toc-panel a.level-3 { padding-left: 18px; font-size: 11px; }

/* 评论 */
.comments-card { padding: 22px 24px; }
.comment-title { margin: 0 0 18px; font-size: 15px; font-weight: 600; }
.comment-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comment-form input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    outline: none;
}
.comment-form input:focus { border-color: var(--primary); }
.comment-form textarea {
    grid-column: 1 / -1;
    min-height: 96px;
    resize: vertical;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    outline: none;
}
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form .submit-wrap { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.cancel-comment-reply { float: right; font-size: 12px; }
.cancel-comment-reply a { color: var(--primary); }

.comment-list { margin: 20px 0 0; padding: 0; list-style: none; }
.comment-item { padding: 14px 0; border-top: 1px solid var(--border); }
.comment-head { display: flex; align-items: center; gap: 9px; }
.comment-avatar img { width: 36px; height: 36px; border-radius: 50%; display: block; }
.comment-meta { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.comment-name { font-size: 13px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--muted); }
.comment-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.comment-from, .comment-device { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.comment-extra .ico { width: 11px; height: 11px; flex: none; opacity: .8; }
.comment-from[data-state="ok"] { color: var(--text-2); }
.comment-from[data-state="fail"] { opacity: .7; }
.comment-reply a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); }
.comment-reply a:hover { background: var(--primary-soft); color: var(--primary); }
.comment-body-text { margin: 9px 0 0 45px; font-size: 13px; color: var(--text-2); }
.comment-body-text p { margin: 0 0 8px; }
.comment-waiting { margin-left: 45px; color: var(--orange); font-size: 11px; }
.comment-children { margin: 10px 0 0 24px; padding: 0; list-style: none; }
.comment-children .comment-item { border-top: 0; padding-top: 8px; }
.comment-awaiting-moderation { color: var(--orange); font-size: 11px; }
.comment-list .page-navigator { justify-content: flex-start; margin-top: 14px; }

.comment-dock {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 40;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 40px));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-solid);
    box-shadow: 0 10px 30px rgba(29, 26, 49, .14);
}
.comment-dock span { flex: 1; color: var(--muted); font-size: 12px; }
.comment-dock button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}

/* 搜索弹层 */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 16vh;
    background: rgba(20, 22, 28, .36);
    backdrop-filter: blur(6px);
}
.search-modal.open { display: flex; }
.search-box {
    width: min(560px, calc(100% - 32px));
    padding: 20px;
    border-radius: 16px;
    background: var(--card-solid);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.search-box form { display: flex; gap: 8px; }
.search-box input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.search-box button { padding: 0 18px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; }
.search-hint { margin-top: 12px; color: var(--muted); font-size: 11px; }

/* 移动端抽屉 */
.drawer-mask { position: fixed; inset: 0; z-index: 95; display: none; background: rgba(0, 0, 0, .3); }
.drawer-mask.open { display: block; }
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 96;
    width: min(300px, 82vw);
    padding: 22px;
    background: var(--card-solid);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .12);
    transform: translateX(102%);
    transition: transform .25s;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-weight: 700; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--text-2); font-size: 14px; }
.drawer-nav a:hover, .drawer-nav a.current { background: var(--primary-soft); color: var(--primary); }
.drawer-section { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* 归档 / 搜索 / 友链 / 404 */
.page-head { padding: 22px 24px; }
.page-head h1 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.link-group { padding: 20px 22px; }
.link-group h2 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-size: 13px;
    transition: .2s;
}
.link-item:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.link-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.notfound { padding: 60px 20px; text-align: center; }
.notfound h1 { margin: 0 0 8px; font-size: 64px; color: var(--primary); }
.notfound p { color: var(--muted); }

/* 页脚 */
.footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px 34px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    line-height: 2;
}
.footer a:hover { color: var(--primary); }
/* Hexo 风格页脚：版权 / 框架主题 / 备案 / 上线时长 */
.ar-footer { line-height: 1.9; }
.ar-footer-line + .ar-footer-line { margin-top: 1px; }
.ar-footer-beian { display: flex; align-items: center; justify-content: center; gap: 5px; }
.ar-footer-beian a { display: inline-flex; align-items: center; gap: 4px; line-height: 1; }
.ar-beian-icon { width: 14px; height: 14px; object-fit: contain; flex: 0 0 auto; }
.ar-footer-age { font-variant-numeric: tabular-nums; }
.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 44;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-solid);
    color: var(--muted);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { color: var(--primary); }
.toc-fab.show ~ .back-top { bottom: 142px; }

/* 底部常驻导航（移动端，仿 IT 之家） */
.dock {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 72;
    height: 60px;
    padding: 4px;
    align-items: stretch;
    justify-content: space-around;
    border: 1px solid var(--glass-line);
    border-radius: 22px;
    background: var(--glass-stuck);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-shine);
}
.dock-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    transition: color .2s, background .2s;
}
.dock-item .ico { width: 21px; height: 21px; stroke-width: 1.7; }
.dock-item.active, .dock-item:hover { color: var(--primary); }
.dock-item.active { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.dock-mask { position: fixed; inset: 0; z-index: 92; display: none; background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dock-mask.open { display: block; }
.dock-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 93;
    padding: 8px 16px calc(86px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    border-top: 1px solid var(--glass-line);
    background: var(--glass-stuck);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .16), inset 0 1px 0 var(--glass-shine);
    transform: translateY(105%);
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
.dock-sheet.open { transform: translateY(0); }
.dock-sheet-grip { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--glass-line); }
.dock-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dock-sheet-head strong { font-size: 15px; }
.dock-sheet-head .icon-btn { width: 30px; height: 30px; }
.dock-all-link {
    display: flex; align-items: center; justify-content: space-between;
    margin: -2px 0 12px; padding: 10px 12px;
    border-radius: 10px; background: var(--primary-soft);
    color: var(--primary); font-size: 13px; font-weight: 600;
}
.dock-all-link .ico { width: 15px; height: 15px; }
.dock-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; }
.dock-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text-2);
    font-size: 13px;
}
.dock-cat .ico { width: 16px; height: 16px; color: var(--primary); }
.dock-cat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-cat small { color: var(--muted); font-size: 11px; }
.dock-cat.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* 灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5vw;
    background: rgba(12, 14, 20, .88);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox button {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 20px;
}

/* 响应式 */
@media (max-width: 1199px) {
    .layout { grid-template-columns: 236px minmax(0, 1fr) 240px; gap: 16px; padding-left: 16px; padding-right: 16px; }
    body.is-post-page .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
    .nav-list { gap: 16px; }
}

@media (max-width: 991px) {
    .layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .profile-col { display: none; }
    .nav { display: none; }
    .menu-btn { display: grid; }
    /* 文章页：平板/手机改单栏正文，目录收进浮动按钮 */
    body.is-post-page .layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; gap: 0; }
    .post-toc-col { display: none; }
    body.is-post-page .toc-fab.show { display: block; }
    body.is-post-page .detail-card { padding: 26px 26px 20px; }
    body.is-post-page .detail-title { font-size: 23px; }
    body.is-post-page .post-content { font-size: 15px; line-height: 1.9; }
}

@media (max-width: 767px) {
    .layout { grid-template-columns: 1fr; padding: 12px 12px 28px; }
    .side-col { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .side-col > * { margin: 0; min-width: 0; }
    .hot-item, .hot-item .title, .mini-list li, .mini-list a { min-width: 0; }
    .post-title a, .detail-title, .comment-body-text, .mini-excerpt { overflow-wrap: anywhere; }
    .notice-bar { grid-column: 1 / -1; }
    .side-col .side-card:nth-of-type(1), .side-col .side-card:last-child { grid-column: 1 / -1; }
    /* Liquid Glass 悬浮胶囊：品牌在左，夜间/搜索两钮靠右 */
    .topbar { padding: 8px 12px 6px; }
    .topbar-inner {
        height: 56px;
        min-height: 0;
        gap: 8px;
        padding: 0 10px 0 16px;
        border-radius: 20px;
    }
    .brand { font-size: 19px; flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
    .top-actions { justify-content: flex-end; gap: 8px; flex: none; }
    .top-actions .icon-btn:nth-child(2) { display: none; }
    /* 底部常驻导航 + 内容避让 */
    .dock { display: flex; padding: 3px; height: 58px; }
    .dock-item { gap: 1px; font-size: 9px; }
    .dock-item .ico { width: 20px; height: 20px; }
    .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    .toc-fab { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 14px; }
    .back-top { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 14px; }
    .toc-fab.show ~ .back-top { bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
    /* 文章/留言页的评论输入条挪到底栏上方，避免与导航重叠 */
    .comment-dock {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        z-index: 71;
        width: calc(100% - 32px);
        padding: 7px 8px 7px 14px;
        box-shadow: 0 8px 24px rgba(29, 26, 49, .12);
    }
    body.has-comment-dock .footer { padding-bottom: calc(154px + env(safe-area-inset-bottom, 0px)); }
    body.has-comment-dock .toc-fab,
    body.has-comment-dock .back-top { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); }
    body.has-comment-dock .toc-fab.show ~ .back-top { bottom: calc(192px + env(safe-area-inset-bottom, 0px)); }
    .post-card { padding: 16px; }
    .post-images { grid-template-columns: repeat(2, 1fr); }
    .detail-card { padding: 18px 16px; }
    .detail-title { font-size: 18px; }
    .comments-card { padding: 16px; }
    .comment-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 479px) {
    .side-col { grid-template-columns: minmax(0, 1fr); }
    .notice-bar, .side-col .side-card:nth-of-type(1), .side-col .side-card:last-child { grid-column: auto; }
    .link-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: 1fr; padding: 14px 16px 8px; }
    .post-near { grid-template-columns: 1fr; }
    .comment-form { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   增强部分：光球 / 置顶卡片 / 动画
   ═══════════════════════════════════════════ */

/* — 动态光球背景 — */
.orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; will-change: transform; }
html[data-theme="dark"] .orb { opacity: .12; }
.orb-1 { width: 420px; height: 420px; background: #8b9cf7; top: -120px; left: -100px; animation: ar-float-1 16s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: #c084fc; bottom: -90px; right: -80px; animation: ar-float-2 19s ease-in-out infinite; }
.orb-3 { width: 320px; height: 320px; background: #67e8f9; top: 42%; left: 56%; animation: ar-float-3 13s ease-in-out infinite; }
@keyframes ar-float-1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(50px, 35px); } }
@keyframes ar-float-2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-45px, -30px); } }
@keyframes ar-float-3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-35px, 45px); } }

/* — 卡片滚动缩放淡入（仿 AOS zoom-in，纯 CSS + 原生 IO，零外部库） — */
.ar-anim-ready .ar-reveal {
    opacity: 0;
    transform: scale(.92);
    transform-origin: center center;
    will-change: opacity, transform;
}
.ar-anim-ready .ar-reveal.is-visible {
    animation: ar-card-in var(--ar-reveal-dur, .5s) cubic-bezier(.22, .68, .35, 1) forwards;
}
@keyframes ar-card-in {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* — 图片加载扫光 — */
.ar-shimmer { position: relative; background: var(--border); }
.ar-shimmer::before {
    content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
    background: linear-gradient(110deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.35) 50%, rgba(255,255,255,.05) 70%);
    background-size: 300% 100%; animation: ar-sweep 1.4s ease-in-out infinite; pointer-events: none;
}
html[data-theme="dark"] .ar-shimmer::before {
    background: linear-gradient(110deg, rgba(255,255,255,.02) 30%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.02) 70%);
    background-size: 300% 100%;
}
.ar-shimmer.is-loaded::before { display: none; }
@keyframes ar-sweep { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* — 首屏 Hero 轮播 — */
@property --hr-ring { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.hero {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
    isolation: isolate; min-height: 188px;
    background: linear-gradient(135deg, #4a6cf7, #a06bff);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
    animation: ar-card-in .5s ease both;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.hero-bgs { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; }
.hero-bg-layer {
    position: absolute; inset: -18px; background-size: cover; background-position: center;
    opacity: 0; filter: blur(14px); transform: scale(1.02);
    transition: opacity 1.1s, filter 1.1s; will-change: opacity, filter, transform;
}
.hero-bg-layer.is-active { opacity: 1; filter: blur(0); animation: ar-hero-drift 8s cubic-bezier(.22,1,.36,1) both; }
@keyframes ar-hero-drift { 0% { transform: scale(1.08) translate(0,0); } 100% { transform: scale(1.02) translate(0,0); } }
.hero-scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(8,12,20,.42) 0%, rgba(8,12,20,.1) 22%, rgba(8,12,20,0) 44%),
        linear-gradient(to top, rgba(8,12,20,.78) 0%, rgba(8,12,20,.4) 38%, rgba(8,12,20,.04) 66%, rgba(8,12,20,0) 100%),
        linear-gradient(to right, rgba(8,12,20,.34) 0%, rgba(8,12,20,.1) 44%, rgba(8,12,20,0) 72%);
}
.hero-content { position: relative; z-index: 2; flex: 1; padding: 15px 19px 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; color: #fff; }
.hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-head::before {
    content: "精选推荐"; flex-shrink: 0; font-size: 10px; font-weight: 600; letter-spacing: .18em;
    color: rgba(255,255,255,.92); padding: 4px 11px 4px 12px; border-radius: 999px;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 4px 14px rgba(9,14,23,.14);
    text-shadow: 0 1px 4px rgba(9,14,23,.3);
}
/* Hero 右上角天气长条（单行玻璃胶囊，数据源：国内中国天气网） */
.hero-weather {
    order: 2; margin-left: auto; flex-shrink: 1; min-width: 0;
    max-width: min(560px, calc(100% - 88px));
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 13px; border-radius: 999px;
    color: #fff; font-size: 11px; line-height: 1.3; white-space: nowrap;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26);
    backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 4px 14px rgba(9,14,23,.16); text-shadow: 0 1px 6px rgba(9,14,23,.35);
    overflow: hidden;
}
.hero-weather .hw-icon { width: 13px; height: 13px; flex: none; }
.hero-weather .hw-city, .hero-weather .hw-temp {
    flex: none; font-size: 13px; font-weight: 600; line-height: 1.2;
}
.hero-weather .hw-temp { font-variant-numeric: tabular-nums; }
.hero-weather .hw-desc { flex: none; opacity: .9; }
.hero-weather .hw-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: .78; }
.hero-weather .hw-meta:not(:empty)::before { content: '·'; margin: 0 5px; opacity: .55; }
.hero-weather.is-loading .hw-icon { opacity: .5; animation: ar-weather-pulse 1.2s ease-in-out infinite; }
.hero-weather.is-error { opacity: .8; }
@keyframes ar-weather-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.hero-feature { position: relative; flex: 1; min-height: 84px; max-width: 640px; margin-top: auto; }
.hero-feat-track { margin: 0; padding: 0; list-style: none; height: 100%; }
.hero-feat { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; visibility: hidden; pointer-events: none; }
.hero-feat:not(.is-active) { transition: opacity .16s, visibility .16s; }
.hero-feat.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.hero-feat.is-active .hf-title { animation: ar-hero-title .78s cubic-bezier(.22,1,.36,1) both; }
.hero-feat.is-active .hf-meta { animation: ar-hero-meta .7s cubic-bezier(.22,1,.36,1) .08s both; }
@keyframes ar-hero-title { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ar-hero-meta { from { opacity: 0; transform: translateY(10px); } to { opacity: .92; transform: translateY(0); } }
.hero-feat a { display: block; max-width: 92%; color: #fff; }
.hf-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: clamp(20px, 1.7vw, 23px); font-weight: 700; line-height: 1.32; letter-spacing: .2px;
    text-shadow: 0 2px 18px rgba(6,10,18,.4); transition: opacity .2s;
}
.hero-feat a:hover .hf-title { opacity: .86; }
.hf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 10px; font-size: 12px; line-height: 1; letter-spacing: .3px; opacity: .92; text-shadow: 0 1px 8px rgba(9,14,23,.4); }
.hf-meta > span { display: inline-flex; align-items: center; }
.hf-meta > span + span:not(.hf-cat)::before { content: ""; display: inline-block; width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 9px; }
.hf-meta .ico { width: 11px; height: 11px; margin-right: 5px; opacity: .62; }
.hf-cat { display: inline-flex; align-items: center; margin-left: 13px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(10px) saturate(1.3); font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: .4px; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-progress { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hero-dots { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; height: 16px; }
.hero-dot { display: flex; align-items: center; justify-content: center; width: 18px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dot::before { content: ""; display: block; width: 12px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.32); box-shadow: 0 1px 4px rgba(9,14,23,.3); transition: width .26s, background .22s, box-shadow .22s; }
.hero-dot:hover::before { background: rgba(255,255,255,.62); }
.hero-dot.is-active::before { width: 18px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.4), 0 1px 4px rgba(9,14,23,.3); }
.hero-count { font-size: 10px; line-height: 1; letter-spacing: .12em; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 6px rgba(9,14,23,.4); }
.hero-count b { font-weight: 600; color: #fff; }
.hero-count i { font-style: normal; margin: 0 3px; opacity: .5; }
.hero-rec-ctrl {
    position: relative; flex: none; display: flex; align-items: center; gap: 2px; height: 34px; padding: 4px;
    border-radius: 999px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24);
    backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 4px 16px rgba(9,14,23,.18);
}
.hero-rec-nav {
    position: relative; width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; cursor: pointer; color: #fff; border-radius: 50%; transition: transform .2s, background .2s;
}
.hero-rec-nav .ico { width: 15px; height: 15px; }
.hero-rec-nav:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.hero-rec-nav:active:not(:disabled) { transform: scale(.86); }
.hero-rec-nav.is-running::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 1;
    background: conic-gradient(#fff var(--hr-ring, 0%), transparent 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation: ar-hero-ring 5s linear both;
}
@keyframes ar-hero-ring { from { --hr-ring: 0%; } to { --hr-ring: 100%; } }
.hero.is-paused .hero-rec-nav.is-running::before { animation-play-state: paused; }

/* — 排序标签 — */
.sort-tabs { display: flex; gap: 6px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.sort-tabs::-webkit-scrollbar { display: none; }
.sort-tab {
    padding: 5px 14px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--border); background: var(--card); color: var(--text-2); font-size: 12px; transition: .2s;
}
.sort-tab:hover { color: var(--primary); border-color: var(--primary); }
.sort-tab.active { color: #fff; border-color: transparent; background: var(--primary); box-shadow: 0 3px 10px rgba(56,88,246,.25); }

/* — 回到顶部进度环 — */
.back-top { width: 44px; height: 44px; }
.scroll-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.scroll-ring-bg { fill: none; stroke: var(--border); stroke-width: 3; }
.scroll-ring-bar {
    fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 106.81; stroke-dashoffset: 106.81; transition: stroke-dashoffset .15s ease;
}
.back-top .back-arrow { width: 16px; height: 16px; transition: opacity .2s; }
.back-top .scroll-pct {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 10px; font-weight: 700; color: var(--primary); opacity: 0; transition: opacity .2s;
}
.back-top.scrolled .back-arrow { opacity: 0; }
.back-top.scrolled .scroll-pct { opacity: 1; }

/* — Toast 提示 — */
.toast {
    position: fixed; left: 50%; bottom: 40px; z-index: 120;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    background: rgba(28, 32, 40, .92); color: #fff; font-size: 13px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* — 点赞心跳 + 飘心 — */
.like-action.is-active .ico { animation: ar-heartbeat .5s ease; }
@keyframes ar-heartbeat { 0% { transform: scale(1); } 25% { transform: scale(1.35); } 50% { transform: scale(.9); } 100% { transform: scale(1); } }
.heart-float {
    position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
    color: var(--red); font-size: 18px; line-height: 1; pointer-events: none;
    animation: ar-heart-float .85s ease forwards;
}
@keyframes ar-heart-float { 0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-38px) scale(1.4); } }
.like-action, .star-action { position: relative; }

/* — 响应式微调 — */
@media (max-width: 767px) {
    .orbs { display: none; }
    .hero { min-height: 180px; }
    .hero-content { padding: 13px 14px 10px; }
    .hero-weather { padding: 4px 10px; gap: 4px; max-width: calc(100% - 78px); }
    .hero-weather .hw-desc, .hero-weather .hw-meta { display: none; }
    .hero-weather .hw-city, .hero-weather .hw-temp { font-size: 12px; }
    .hf-title { font-size: 18px; }
    .hf-meta { font-size: 11px; margin-top: 8px; }
    .hf-cat { margin-left: 9px; padding: 2px 8px; }
    .hero-dot { width: 14px; }
    .hero-dot::before { width: 10px; }
    .hero-dot.is-active::before { width: 15px; }
    .hero-count { font-size: 9px; }
}

/* ═══════════════════════════════════════════
   独立页面：友链 / 归档 / 关于
   ═══════════════════════════════════════════ */
.standalone-page { padding: 0; overflow: hidden; }
.page-hero, .about-head {
    position: relative; overflow: hidden;
    padding: 22px 24px 0;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(120% 130% at 100% 0%, var(--primary-soft), transparent 58%),
        linear-gradient(120deg, color-mix(in srgb, var(--primary-soft) 70%, transparent), transparent 62%),
        var(--bg);
}
html[data-theme="dark"] .page-hero, html[data-theme="dark"] .about-head {
    background: radial-gradient(120% 130% at 100% 0%, rgba(112,137,255,.16), transparent 58%), var(--bg);
}
.page-hero-deco {
    position: absolute; right: 14px; top: 6px;
    width: 98px; height: 98px; color: var(--primary); opacity: .12;
    stroke-width: 1; transform: rotate(-8deg); pointer-events: none;
}
.page-hero-body, .about-profile { position: relative; z-index: 1; }
.page-eyebrow {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    background: var(--card-solid); border: 1px solid var(--border);
    font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--primary);
}
.page-eyebrow .ico { width: 11px; height: 11px; }
.page-hero-title { margin: 10px 0 6px; font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.page-hero-sub { margin: 0; font-size: 13px; color: var(--muted); }

/* 胶囊切换（带滑动高亮） */
.tab-pills {
    position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px;
    margin-top: 13px; padding: 3px; border-radius: 999px;
    background: color-mix(in srgb, var(--text) 5%, transparent);
}
.tab-pill {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border: 0; background: none; border-radius: 999px;
    font-size: 12px; line-height: 1.45; color: var(--muted); transition: color .2s;
}
.tab-pill:hover { color: var(--text); }
.tab-pill.is-active { color: var(--text); font-weight: 600; }
.tab-pill-count { font-size: 10px; opacity: .85; }
.tab-pill.is-active .tab-pill-count { color: var(--primary); opacity: 1; }
.pill-thumb {
    position: absolute; left: 0; top: 0; height: 0; width: 0; z-index: 0;
    border-radius: 999px; pointer-events: none;
    background: var(--card-solid); box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .32s cubic-bezier(.2,.8,.2,1), width .32s cubic-bezier(.2,.8,.2,1);
}

.page-hero-stats {
    display: flex; position: relative; z-index: 1;
    margin-top: 20px; padding: 13px 0 15px; border-top: 1px solid var(--border);
}
.hero-stat, .about-stat {
    flex: 1; min-width: 0; padding-left: 18px; position: relative;
    display: flex; flex-direction: column; gap: 1px;
}
.hero-stat:first-child, .about-stat:first-child { padding-left: 0; }
.hero-stat::before, .about-stat + .about-stat::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 1px; background: var(--border);
}
.hero-stat:first-child::before { display: none; }
.hero-stat b, .about-stat b {
    font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-stat span, .about-stat span { font-size: 11px; color: var(--muted); }

.group-title {
    display: flex; align-items: center; gap: 7px;
    margin: 22px 24px 12px; font-size: 13px; font-weight: 600;
}
.group-title .ico { width: 15px; height: 15px; color: var(--primary); }
.group-title span { font-size: 11px; color: var(--muted); font-weight: 400; }
.link-group-panel[hidden], .archive-year-panel[hidden] { display: none; }

/* 友链卡片 */
.links-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px; margin: 0 24px 22px;
}
.link-card {
    display: flex; align-items: center; gap: 11px; min-width: 0;
    padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg); transition: transform .22s, box-shadow .22s, border-color .22s;
}
.link-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow); }
.link-avatar {
    flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), #a06bff);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.link-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-letter {
    width: 100%; height: 100%; display: grid; place-items: center;
    color: #fff; font-size: 17px; font-weight: 700;
}
.link-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card:hover .link-name { color: var(--primary); }
.link-desc { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta { margin-top: 5px; }
.link-tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 7px; border-radius: 999px; font-size: 10px;
    color: var(--primary); background: var(--primary-soft);
}
.link-tag .ico { width: 10px; height: 10px; }
.link-arrow { flex: none; width: 14px; height: 14px; color: var(--muted); opacity: 0; transition: .2s; }
.link-card:hover .link-arrow { opacity: 1; color: var(--primary); transform: translateX(2px); }

/* 归档列表 */
.archive-year-panel { padding: 4px 24px 6px; }
.archive-month {
    display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; padding: 0 2px;
}
.archive-month:first-child { margin-top: 8px; }
.archive-month b { font-size: 12px; font-weight: 600; }
.archive-month span { font-size: 11px; color: var(--muted); }
.archive-month i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.archive-row {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px; margin-bottom: 3px; border-radius: 10px;
    transition: background .2s;
}
.archive-row:hover { background: var(--primary-soft); }
.archive-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: .2s; }
.archive-row:hover .archive-dot { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
.archive-date { flex: none; display: inline-flex; align-items: baseline; gap: 5px; min-width: 56px; }
.archive-date b { font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.archive-date i { font-style: normal; font-size: 10px; color: var(--muted); }
.archive-title { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-row:hover .archive-title { color: var(--primary); }
.archive-meta { flex: none; display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.archive-meta span { display: inline-flex; align-items: center; gap: 3px; }
.archive-meta .ico { width: 12px; height: 12px; }

/* 分类页 */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 24px 8px; align-items: stretch; }
.cat-panel {
    min-width: 0; height: 226px; padding: 14px 14px 8px;
    border: 1px solid var(--border); border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 4%, var(--card-solid)), var(--card-solid));
    display: flex; flex-direction: column;
}
.cat-panel-title { margin: 0 0 8px; padding: 0; border: 0; font-size: 12px; }
.cat-panel-title { white-space: nowrap; overflow: hidden; }
.cat-panel-title .ico, .cat-panel-title span { flex: none; }
.cat-desc { margin: -2px 0 8px; font-size: 11px; color: var(--muted); line-height: 1.6; min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-desc-empty { color: transparent; }
.cat-posts { flex: 1; display: flex; flex-direction: column; min-height: 148px; }
.cat-posts .archive-row { padding: 7px 8px; gap: 8px; margin-bottom: 3px; }
.cat-posts .archive-date { min-width: 42px; }
.cat-posts .archive-date b { font-size: 12px; }
.cat-posts .archive-title { font-size: 12px; }
.cat-grid .empty-note { padding: 12px 4px; }
.cat-more {
    display: flex; align-items: center; gap: 4px;
    padding: 7px 8px; min-height: 34px; margin-bottom: 3px;
    border-radius: 10px; color: var(--primary); font-size: 12px;
    transition: background .2s;
}
.cat-more:hover { background: var(--primary-soft); }
.cat-more .ico { width: 13px; height: 13px; }

/* 关于页 */
.about-head { padding-bottom: 0; }
.about-profile { display: flex; align-items: center; gap: 15px; }
.about-avatar {
    flex: none; width: 56px; height: 56px; border-radius: 17px; overflow: hidden;
    display: grid; place-items: center; color: #fff; font-size: 21px; font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #a06bff);
    box-shadow: 0 8px 20px -10px var(--primary);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-intro { flex: 1; min-width: 0; }
.about-title { margin: 6px 0; font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.3px; }
.about-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; font-size: 11px; color: var(--muted); }
.about-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; }
.about-links { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.about-links a {
    display: inline-flex; align-items: center; gap: 5px; height: 29px; padding: 0 11px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--card-solid);
    font-size: 11px; color: var(--text-2); transition: .2s;
}
.about-links a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.about-links .ico { width: 12px; height: 12px; }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 19px; padding: 13px 0 15px; border-top: 1px solid var(--border); }
.about-section { margin: 26px 24px 0; }
.about-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.about-sec-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .1em; }
.about-sec-head h2::before { content: ''; width: 4px; height: 12px; border-radius: 2px; background: linear-gradient(var(--primary), #a06bff); }
.about-sec-head > span { font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.about-more { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.about-more:hover { color: var(--primary); }
.about-more .ico { width: 11px; height: 11px; }
.about-story { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.about-story::before { content: ''; position: absolute; left: 5px; top: 5px; bottom: 8px; width: 1px; background: var(--border); }
.about-story ul { margin: 0; padding: 0; list-style: none; }
.about-story li { position: relative; padding-bottom: 14px; }
.about-story li:last-child { padding-bottom: 0; }
.about-story li::before {
    content: ''; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px;
    border-radius: 50%; background: var(--card-solid); border: 2px solid var(--primary); box-sizing: border-box;
}
.about-story li > time {
    display: inline-block; margin-bottom: 3px; padding: 1px 7px; border-radius: 5px;
    background: var(--primary-soft); color: var(--primary); font-size: 10px; letter-spacing: .5px;
}
.about-story li > strong { display: block; color: var(--text); font-size: 13px; }
.about-posts { margin: 0; padding: 0; list-style: none; }
.about-posts li + li { border-top: 1px solid var(--border); }
.about-posts a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 9px; transition: background .2s; }
.about-posts a:hover { background: var(--primary-soft); }
.about-posts time { flex: none; width: 42px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.about-posts span { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-posts a:hover span { color: var(--primary); }
.about-posts .ico { flex: none; width: 12px; height: 12px; color: var(--primary); opacity: 0; transition: .2s; }
.about-posts a:hover .ico { opacity: 1; }

.page-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin: 26px 24px 24px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px;
    background: linear-gradient(120deg, var(--primary-soft), transparent 70%), var(--bg);
    font-size: 12px; color: var(--text-2);
}
.page-cta a {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 14px;
    border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
}
.page-cta a:hover { filter: brightness(1.08); }
.page-cta .ico { width: 12px; height: 12px; }
.page-raw-content { padding: 18px 24px 0; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.page-raw-content p { margin: 0 0 10px; }
/* 正文列表复用 .about-story 的时间轴装饰，这里去掉圆点，恢复标准数字序号 */
.page-raw-content li::before { display: none; }
.page-raw-content ol { padding-left: 20px; }
.empty-note { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* 留言板 */
.gb-hero { padding-bottom: 0; border-bottom: 1px solid var(--border); }
.gb-hero .page-hero-sub { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-stat-time { font-size: 14px !important; }
.gb-tips {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    margin: 16px 24px 20px;
}
.gb-tip {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); font-size: 12px; line-height: 1.5; color: var(--text-2);
}
.gb-tip .ico { flex: none; width: 15px; height: 15px; color: var(--primary); }
.gb-tip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-tip b { color: var(--text); font-weight: 600; }
.guestbook-page + .comments-card { margin-top: 16px; }

/* ═══════════════════════════════════════════
   友链申请：区块 + 弹窗表单
   ═══════════════════════════════════════════ */
.link-apply {
    position: relative; overflow: hidden;
    margin: 22px 24px 24px; padding: 22px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: radial-gradient(120% 130% at 100% 0%, var(--primary-soft), transparent 58%), var(--bg);
}
html[data-theme="dark"] .link-apply { background: radial-gradient(120% 130% at 100% 0%, rgba(112,137,255,.14), transparent 58%), var(--bg); }
.link-apply > * { position: relative; z-index: 1; }
.link-apply-deco {
    position: absolute; right: 4px; top: -6px; width: 104px; height: 104px;
    color: var(--primary); opacity: .1; transform: rotate(-8deg); pointer-events: none;
}
.link-apply-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.link-apply-head-text { flex: 1; min-width: 200px; }
.link-apply-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.link-apply-badge, .lap-badge {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    padding: 3px 10px; border-radius: 999px;
    background: var(--card-solid); border: 1px solid var(--border);
    font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary);
}
.link-apply-badge .ico, .lap-badge .ico { width: 11px; height: 11px; }
.link-apply-sub { margin: 5px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.link-apply-btn {
    display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
    padding: 10px 14px 10px 20px; border: 0; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: #fff; cursor: pointer;
    background: var(--primary); box-shadow: 0 6px 16px -8px var(--primary);
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.link-apply-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 20px -8px var(--primary); }
.link-apply-btn .ico { width: 14px; height: 14px; transition: transform .22s; }
.link-apply-btn:hover .ico { transform: translateX(2px); }
.link-apply-body { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; border-top: 1px solid var(--border); }
.link-apply-panel { min-width: 0; padding: 16px 18px 2px 0; }
.link-apply-panel + .link-apply-panel { padding-left: 20px; border-left: 1px solid var(--border); }
.link-apply-col-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.link-apply-list { list-style: none; margin: 0; padding: 0; }
.link-apply-list li {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start;
    font-size: 13px; line-height: 1.7; padding: 6px 0; border-top: 1px solid var(--border);
}
.link-apply-list li:first-child { border-top: 0; padding-top: 0; }
.link-apply-list .lk { color: var(--muted); font-size: 12px; }
.link-apply-list .lv { color: var(--text); font-weight: 500; word-break: break-word; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-apply-list a.lv { color: var(--primary); text-decoration: none; }
.link-apply-list a.lv:hover { text-decoration: underline; }
.lk-copy {
    width: 20px; height: 20px; padding: 0; margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
    opacity: .55; transition: opacity .18s, background .18s, color .18s;
}
.lk-copy .ico { width: 13px; height: 13px; }
.lk-copy:hover { opacity: 1; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--primary); }
.lk-copy.is-done { opacity: 1; color: var(--green); }
.link-apply-rules { list-style: none; margin: 0; padding: 0; }
.link-apply-rules li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.65; padding: 5px 0; }
.link-apply-rules .rule-dot {
    width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-soft); color: var(--primary);
}
.link-apply-rules .rule-dot .ico { width: 10px; height: 10px; }

/* 弹窗 */
.ar-modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 20px; }
.ar-modal.active { display: flex; }
.ar-modal-mask { position: absolute; inset: 0; background: rgba(15,18,25,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: background .26s, backdrop-filter .26s; }
.ar-modal.active .ar-modal-mask { background: rgba(15,18,25,.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
html[data-theme="dark"] .ar-modal.active .ar-modal-mask { background: rgba(0,0,0,.5); }
.ar-modal-card {
    position: relative; z-index: 1; width: 100%; max-width: 520px;
    max-height: calc(100vh - 40px); overflow-y: auto; padding: 0;
    border-radius: 20px; border: 1px solid var(--border); background: var(--card);
    box-shadow: 0 24px 60px -18px rgba(0,0,0,.3), 0 6px 18px -8px rgba(0,0,0,.18);
}
.ar-modal.active .ar-modal-card { animation: arModalIn .34s cubic-bezier(.22,1,.36,1) both; }
.ar-modal.closing .ar-modal-card { animation: arModalOut .2s ease both; }
.ar-modal.closing .ar-modal-mask { background: transparent !important; backdrop-filter: none !important; }
@keyframes arModalIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes arModalOut { to { opacity: 0; transform: translateY(8px) scale(.975); } }
.ar-modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 3;
    width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-2);
    transition: background .2s, color .2s;
}
.ar-modal-close:hover { background: var(--primary-soft); color: var(--primary); }
.ar-modal-close .ico { width: 15px; height: 15px; }
.lap-hero {
    position: relative; z-index: 1; overflow: hidden;
    padding: 22px 54px 22px 22px; border-radius: 20px 20px 0 0; border-bottom: 1px solid var(--border);
    background: radial-gradient(120% 130% at 100% 0%, var(--primary-soft), transparent 58%), var(--bg);
}
html[data-theme="dark"] .lap-hero { background: radial-gradient(120% 130% at 100% 0%, rgba(112,137,255,.16), transparent 58%), var(--bg); }
.lap-deco { position: absolute; right: 10px; top: 2px; width: 96px; height: 96px; color: var(--primary); opacity: .12; transform: rotate(-8deg); pointer-events: none; }
.lap-hero-body { position: relative; z-index: 1; }
.lap-hero-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.lap-hero-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.lap-body { position: relative; z-index: 1; padding: 20px 22px 22px; }
.lap-form[hidden], .lap-done[hidden] { display: none; }
.lap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lap-span { grid-column: 1 / -1; }
.lap-field { display: block; min-width: 0; }
.lap-label { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.lap-label .ico { width: 13px; height: 13px; color: var(--primary); }
.lap-label b { color: var(--primary); font-weight: 700; }
.lap-opt { margin-left: auto; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--muted); background: var(--primary-soft); }
.lap-field input, .lap-field textarea {
    width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 14px; line-height: 1.5;
    color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
    outline: none; transition: border-color .18s, box-shadow .18s; -webkit-appearance: none; appearance: none;
}
.lap-field textarea { resize: vertical; min-height: 78px; }
.lap-field input::placeholder, .lap-field textarea::placeholder { color: var(--muted); opacity: .75; }
.lap-field input:focus, .lap-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.lap-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.lap-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.lap-bar-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.lap-bar-note .ico { flex: none; width: 14px; height: 14px; color: var(--primary); }
.lap-submit {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
    padding: 11px 24px; font-size: 14px; font-weight: 600; color: #fff;
    background: var(--primary); border: 0; border-radius: 999px; cursor: pointer;
    box-shadow: 0 6px 18px -8px var(--primary); transition: transform .18s, filter .2s, opacity .2s;
}
.lap-submit .ico { width: 14px; height: 14px; }
.lap-submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.lap-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.lap-err { margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); font-size: 12px; }
.lap-done { position: relative; z-index: 1; text-align: center; padding: 14px 6px 6px; }
.lap-done-ico {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, #4abd86, #2fa36a); box-shadow: 0 10px 26px rgba(74,189,134,.35);
    animation: arPop .4s cubic-bezier(.22,1,.36,1) both;
}
.lap-done-ico .ico { width: 28px; height: 28px; }
@keyframes arPop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.lap-done h4 { margin: 0; font-size: 16px; color: var(--text); }
.lap-done p { margin: 8px auto 18px; max-width: 330px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.lap-done-btn {
    padding: 9px 30px; font-size: 13px; font-weight: 600; color: var(--text);
    background: transparent; border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}
.lap-done-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

@media (max-width: 640px) {
    .page-hero, .about-head { padding: 18px 16px 0; }
    .page-hero-deco { width: 70px; height: 70px; right: 4px; top: 4px; }
    .page-hero-title { font-size: 20px; }
    .page-hero-stats, .about-stats { margin-top: 16px; padding: 12px 0 13px; }
    .hero-stat, .about-stat { padding-left: 9px; }
    .hero-stat b, .about-stat b { font-size: 14px; }
    .hero-stat span, .about-stat span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .links-grid { margin: 0 16px 16px; grid-template-columns: 1fr; }
    .group-title, .archive-year-panel, .about-section, .page-cta, .page-raw-content { margin-left: 16px; margin-right: 16px; }
    .archive-row { gap: 8px; padding: 9px 5px; }
    .archive-date { min-width: 48px; }
    .archive-date i { display: none; }
    .about-avatar { width: 47px; height: 47px; border-radius: 14px; font-size: 18px; }
    .about-title { font-size: 18px; }
    .about-links a { height: 27px; padding: 0 10px; }
    .gb-hero .page-hero-sub { max-width: 100%; }
    .gb-tips { grid-template-columns: 1fr; gap: 6px; margin: 14px 16px 16px; }
    .gb-tip { padding: 8px 10px; font-size: 11px; }
    .gb-stat-time { font-size: 13px !important; }
    .link-apply { padding: 18px 16px 16px; margin: 16px; }
    .link-apply-deco { width: 76px; height: 76px; right: 0; top: -4px; }
    .link-apply-title { font-size: 19px; }
    .link-apply-btn { width: 100%; justify-content: center; }
    .link-apply-body { grid-template-columns: 1fr; }
    .link-apply-panel { padding: 14px 0 2px; }
    .link-apply-panel + .link-apply-panel { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); margin-top: 6px; }
    .ar-modal { padding: 10px; }
    .ar-modal-card { max-height: calc(100vh - 20px); border-radius: 16px; }
    .lap-hero { padding: 16px 44px 16px 16px; }
    .lap-deco { width: 72px; height: 72px; right: 2px; top: 0; }
    .lap-hero-title { font-size: 19px; }
    .lap-hero-sub { font-size: 12px; margin-top: 4px; }
    .lap-body { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
    .lap-grid { gap: 10px 9px; }
    .lap-label { font-size: 12px; }
    .lap-field input, .lap-field textarea { font-size: 14px; padding: 9px 11px; }
    .lap-field textarea { min-height: 60px; }
    .lap-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .lap-bar-note { justify-content: center; text-align: center; }
    .lap-submit { justify-content: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .orb, .ar-shimmer::before, .tag-cloud-track, .hero-bg-layer.is-active { animation: none !important; }
    .ar-anim-ready .ar-reveal { opacity: 1 !important; transform: none !important; }
    .pill-thumb { transition: none; }
}
