/* ==========================================================
   站点前台样式 · site.css
   个人备案站 · 完整导航布局 + 内容页 + 备案展示区
   ========================================================== */

:root {
    --theme: #16baaa;
    --theme-dark: #0f8f84;
    --theme-soft: rgba(22, 186, 170, .1);
    --text: #2b3440;
    --text-2: #5b6773;
    --text-3: #98a2b3;
    --line: #e9edf2;
    --bg: #f5f7fa;
    --card: #ffffff;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(15, 35, 60, .06);
    --shadow-hover: 0 10px 30px rgba(15, 35, 60, .12);
    --header-h: 64px;
    --maxw: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body.site-body {
    margin: 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--theme); text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-dark); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0; font-weight: 600; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--theme); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- 顶栏 ---------------- */

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(15, 35, 60, .08); }

.site-header-inner {
    max-width: var(--maxw); margin: 0 auto; height: var(--header-h);
    padding: 0 20px; display: flex; align-items: center; gap: 16px;
}

.site-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 16px; color: var(--text); flex: none;
}
.site-brand:hover { color: var(--theme); }
.site-brand img {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    background: #eef2f6; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }

.site-nav-item {
    padding: 7px 13px; border-radius: 8px; color: var(--text-2);
    font-size: 14px; white-space: nowrap; transition: .2s;
}
.site-nav-item:hover { background: var(--theme-soft); color: var(--theme-dark); }
.site-nav-item.on { background: var(--theme); color: #fff; }
.site-nav-search { padding: 7px 11px; }

.site-menu-btn {
    display: none; margin-left: auto; border: 0; background: none; cursor: pointer;
    font-size: 22px; color: var(--text-2); padding: 6px;
}

/* 公告条 */
.site-notice {
    background: linear-gradient(90deg, #fff9e6, #fffdf5);
    border-bottom: 1px solid #ffe9a8;
}
.site-notice-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 9px 20px;
    display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #8a6100;
}
.site-notice-inner .layui-icon { flex: none; }
.site-notice-inner span { flex: 1; }
.site-notice-close { border: 0; background: none; cursor: pointer; font-size: 18px; color: #b08a2a; line-height: 1; }

/* ---------------- 主体 ---------------- */

.site-main {
    max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 56px;
    min-height: calc(100vh - 380px);
}

.page-head { margin-bottom: 22px; }
.page-head h1 {
    font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.page-head h1 .layui-icon { color: var(--theme); }
.page-head h1 small { font-size: 14px; color: var(--text-3); font-weight: 400; }
.page-sub { color: var(--text-3); font-size: 13.5px; margin: 6px 0 0; }

/* ---------------- 首页 Hero ---------------- */

.hero { display: grid; grid-template-columns: 1fr; gap: 18px; }

.hero-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 36px 24px 28px; text-align: center;
}
.hero-avatar {
    width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
    border: 4px solid #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, .14);
    background: #eef2f6; transition: transform .35s;
}
.hero-avatar:hover { transform: rotate(-4deg) scale(1.04); }
.hero-avatar.square { border-radius: 18px; }

.hero-name { font-size: 26px; margin: 14px 0 8px; letter-spacing: 1px; }
.hero-intro { margin: 0; color: var(--text-2); font-size: 14.5px; }
.hero-intro em { font-style: normal; color: var(--text-3); margin: 0 8px; }
.hero-extra { margin: 8px 0 0; color: var(--text-3); font-size: 13.5px; }
.hero-contact { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.hero-contact .layui-icon { color: var(--theme); margin-right: 4px; }

.hero-links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 30px; font-size: 14px;
    background: var(--theme-soft); color: var(--theme-dark); transition: .22s;
}
.hero-btn:hover {
    background: var(--theme); color: #fff; transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 186, 170, .3);
}

.hero-stats {
    margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line);
    display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--text-3);
}
.hero-stats b { display: block; font-size: 19px; color: var(--theme-dark); }

/* 一言 */
.hitokoto-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.hitokoto-title {
    padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--theme-dark);
    background: var(--theme-soft); display: flex; align-items: center; gap: 6px;
}
.hitokoto-body { padding: 16px; position: relative; }
.hitokoto-body p { margin: 0; padding-right: 40px; font-size: 14.5px; color: var(--text-2); min-height: 44px; }
.hitokoto-btn {
    position: absolute; right: 12px; bottom: 12px; border: 0; cursor: pointer;
    width: 30px; height: 30px; border-radius: 50%; background: var(--theme-soft); color: var(--theme-dark);
}
.hitokoto-btn:hover { background: var(--theme); color: #fff; }

/* ---------------- 首页分区 ---------------- */

.home-section { margin-top: 34px; }
.section-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.section-head h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.section-head h2 .layui-icon { color: var(--theme); }
.section-more { margin-left: auto; font-size: 13px; color: var(--text-3); }
.section-more:hover { color: var(--theme); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.post-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2f6; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 { font-size: 15.5px; margin-bottom: 8px; }
.post-card-body h3 a { color: var(--text); }
.post-card-body h3 a:hover { color: var(--theme); }
.post-excerpt {
    margin: 0 0 12px; font-size: 13.5px; color: var(--text-3); line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}

.post-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--text-3);
}
.post-meta .layui-icon { font-size: 13px; margin-right: 2px; }

.mini-tag {
    --tc: var(--theme);
    display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11.5px;
    color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
}
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .mini-tag { background: rgba(22, 186, 170, .1); }
}

/* 说说 */
.moment-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 18px; }
.moment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.moment-item:last-child { border-bottom: 0; }
.moment-dot {
    width: 9px; height: 9px; border-radius: 50%; background: var(--theme);
    margin-top: 9px; flex: none; box-shadow: 0 0 0 3px var(--theme-soft);
}
.moment-body { flex: 1; min-width: 0; }
.moment-text { font-size: 14.5px; color: var(--text); word-break: break-word; }
.moment-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* 友链 */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.friend-grid.big { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.friend-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: var(--card); border-radius: 10px; box-shadow: var(--shadow);
    transition: .22s; color: var(--text);
}
.friend-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--text); }
.friend-item img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #eef2f6; flex: none; }
.friend-item b { display: block; font-size: 14px; }
.friend-item span {
    display: block; font-size: 12.5px; color: var(--text-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px;
}

/* ---------------- 列表页 ---------------- */

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag-cloud.big { gap: 12px; }
.tag-chip {
    --tc: var(--theme);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px; font-size: 13px;
    background: #fff; border: 1px solid var(--line); color: var(--text-2); transition: .2s;
}
.tag-chip em { font-style: normal; font-size: 11px; color: var(--text-3); }
.tag-chip:hover, .tag-chip.on {
    background: var(--tc); color: #fff; border-color: var(--tc);
}
.tag-chip:hover em, .tag-chip.on em { color: rgba(255, 255, 255, .85); }

.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-item {
    display: flex; gap: 18px; background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px; transition: .22s;
}
.article-item:hover { box-shadow: var(--shadow-hover); }
.article-cover {
    width: 200px; height: 124px; flex: none; border-radius: 8px; overflow: hidden; background: #eef2f6;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { flex: 1; min-width: 0; }
.article-title { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--theme); }
.article-excerpt { margin: 0 0 10px; font-size: 13.5px; color: var(--text-3); }

.top-badge, .type-badge {
    font-size: 11px; padding: 1px 8px; border-radius: 4px;
    background: #fff1f0; color: #f5222d; font-weight: 400;
}
.type-badge { background: var(--theme-soft); color: var(--theme-dark); }

.timeline-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 20px; }
.timeline-item { display: flex; gap: 18px; padding: 15px 0; border-bottom: 1px dashed var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-date { flex: none; width: 92px; font-size: 12.5px; color: var(--text-3); padding-top: 2px; }
.timeline-content { flex: 1; min-width: 0; }

.bookmark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bookmark-card {
    display: block; padding: 16px; background: var(--card); border-radius: 10px;
    box-shadow: var(--shadow); transition: .22s; border-left: 3px solid var(--theme);
}
.bookmark-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.bookmark-card b { display: block; color: var(--text); font-size: 14.5px; }
.bookmark-card span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 4px; word-break: break-all; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.pager-btn {
    min-width: 34px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13.5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line); color: var(--text-2);
}
.pager-btn:hover { border-color: var(--theme); color: var(--theme); }
.pager-btn.on { background: var(--theme); border-color: var(--theme); color: #fff; }
.pager-gap { color: var(--text-3); }
.pager-info { font-size: 12.5px; color: var(--text-3); margin-left: 6px; }

.empty-box {
    text-align: center; padding: 56px 20px; background: var(--card);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-box .layui-icon { font-size: 46px; color: #d5dbe3; }
.empty-box p { color: var(--text-3); margin: 12px 0 18px; }

/* ---------------- 详情页 ---------------- */

.detail-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.detail-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 22px; }
.detail-breadcrumb { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.detail-breadcrumb .layui-icon { font-size: 11px; margin: 0 4px; }
.detail-head h1 { font-size: 26px; margin-bottom: 12px; }

.detail-body.with-toc { display: grid; grid-template-columns: 1fr 210px; gap: 28px; align-items: start; }

.toc {
    position: sticky; top: calc(var(--header-h) + 20px); order: 2;
    background: #fafbfc; border-radius: 10px; padding: 14px; font-size: 13px;
    max-height: calc(100vh - var(--header-h) - 60px); overflow: auto;
}
.toc-title { font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 3px 0; }
.toc li.toc-l3 { padding-left: 12px; }
.toc a { color: var(--text-3); display: block; padding: 3px 6px; border-radius: 5px; }
.toc a:hover { background: var(--theme-soft); color: var(--theme-dark); }

.article-content { font-size: 15.5px; line-height: 1.9; color: #333c48; word-break: break-word; min-width: 0; }
.article-content h2 { font-size: 20px; margin: 28px 0 12px; padding-left: 10px; border-left: 4px solid var(--theme); }
.article-content h3 { font-size: 17px; margin: 22px 0 10px; }
.article-content p { margin: 0 0 16px; }
.article-content img { border-radius: 8px; margin: 8px 0; }
.article-content a { border-bottom: 1px dashed var(--theme); }
.article-content blockquote {
    margin: 16px 0; padding: 12px 18px; background: #f7fafc;
    border-left: 4px solid var(--theme); color: var(--text-2); border-radius: 0 8px 8px 0;
}
.article-content pre {
    background: #1e2a38; color: #e6edf3; padding: 16px; border-radius: 10px;
    overflow: auto; font-size: 13px; line-height: 1.6;
}
.article-content code { background: #f0f3f7; padding: 2px 6px; border-radius: 4px; font-size: .92em; color: #d4380d; }
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 8px 12px; }
.article-content th { background: #f8fafc; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 16px; }

.prev-next { display: flex; gap: 14px; margin-top: 30px; }
.prev-next > * { flex: 1; }
.pn-item {
    display: block; padding: 14px 16px; border-radius: 10px; background: #fafbfc;
    border: 1px solid var(--line); transition: .2s;
}
.pn-item:hover { border-color: var(--theme); background: #fff; }
.pn-item.right { text-align: right; }
.pn-item span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.pn-item b { font-size: 14px; color: var(--text); font-weight: 500; }

/* ---------------- 关于我 ---------------- */

.about-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.about-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.about-card h3 { font-size: 15px; margin-bottom: 12px; }
.about-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.about-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: #eef2f6; }
.about-head h2 { font-size: 20px; }
.about-head p { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }
.about-quote {
    margin: 0 0 16px; padding: 12px 16px; background: #f8fafc;
    border-left: 4px solid var(--theme); border-radius: 0 8px 8px 0; color: var(--text-2);
}
.about-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.about-skills span {
    padding: 3px 12px; border-radius: 20px; font-size: 13px;
    background: var(--theme-soft); color: var(--theme-dark);
}
.about-hobby { font-size: 13.5px; color: var(--text-2); margin: 6px 0 0; }
.about-hobby .layui-icon { color: var(--theme); margin-right: 4px; }
.about-stat-list { list-style: none; margin: 0; padding: 0; }
.about-stat-list li {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px dashed var(--line); font-size: 13.5px; color: var(--text-2);
}
.about-stat-list li:last-child { border-bottom: 0; }
.about-stat-list b { color: var(--theme-dark); }
.about-note { font-size: 13px; color: var(--text-3); margin: 0; line-height: 1.8; }

/* ---------------- 时间线 ---------------- */

.tl-year { margin-bottom: 26px; }
.tl-year-label {
    display: inline-block; font-size: 22px; font-weight: 700; color: var(--theme);
    margin-bottom: 12px;
}
.tl-items { position: relative; padding-left: 28px; border-left: 2px solid var(--line); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-dot {
    position: absolute; left: -37px; top: 12px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--theme); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; box-shadow: 0 0 0 4px #fff;
}
.tl-card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px; }
.tl-date { font-size: 12.5px; color: var(--text-3); }
.tl-card h3 { font-size: 15.5px; margin: 4px 0 6px; }
.tl-card p { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* ---------------- 相册 ---------------- */

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.album-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: .22s; }
.album-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.album-cover { aspect-ratio: 4 / 3; position: relative; background: #eef2f6; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover-empty { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #cfd6df; }
.album-count {
    position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; color: #fff;
    background: rgba(0, 0, 0, .45); padding: 2px 10px; border-radius: 20px;
}
.album-body { padding: 12px 14px; }
.album-body h3 { font-size: 15px; color: var(--text); }
.album-body p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-item { margin: 0; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .35s; }
.photo-item:hover img { transform: scale(1.06); }
.photo-item figcaption { padding: 8px 10px; font-size: 12.5px; color: var(--text-3); }

.lightbox {
    position: fixed; inset: 0; z-index: 999; background: rgba(10, 16, 24, .92);
    display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 90vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-btn {
    position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 20px;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev { left: 4vw; }
.lb-next { right: 4vw; }
.lb-close { right: 4vw; top: 4vh; }
.lb-counter { position: absolute; bottom: 4vh; color: rgba(255, 255, 255, .8); font-size: 13px; }

/* ---------------- 留言板 ---------------- */

.notice-box {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}
.notice-box.ok { background: #ecfdf3; border: 1px solid #c3eed6; color: #12875c; }
.notice-box.err { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }

.message-form-card, .message-list {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 22px; margin-bottom: 18px;
}
.message-form-card h2 { font-size: 16px; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.field em { color: #f5222d; font-style: normal; }
.field .layui-input, .field .layui-textarea {
    border-color: var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field .layui-input:focus, .field .layui-textarea:focus {
    border-color: var(--theme) !important; box-shadow: 0 0 0 3px var(--theme-soft);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-tip { font-size: 12.5px; color: var(--text-3); }

.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 22px; border-radius: 8px; border: 0; cursor: pointer;
    background: var(--theme); color: #fff; font-size: 14px; transition: .2s;
}
.btn-primary:hover { background: var(--theme-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; color: var(--text-2); font-size: 14px;
}
.btn-ghost:hover { border-color: var(--theme); color: var(--theme); }

.message-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.message-item:last-child { border-bottom: 0; }
.message-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none;
    background: var(--theme-soft); color: var(--theme-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.message-body { flex: 1; min-width: 0; }
.message-head { display: flex; align-items: baseline; gap: 10px; }
.message-head b { font-size: 14px; }
.message-head span { font-size: 12px; color: var(--text-3); }
.message-text { font-size: 14px; color: var(--text-2); margin-top: 4px; word-break: break-word; }

/* ---------------- 搜索 ---------------- */

.search-form { display: flex; gap: 10px; margin-bottom: 22px; }
.search-form .layui-input { height: 44px; border-radius: 10px; border-color: var(--line); }
.search-form .btn-primary { padding: 0 26px; border-radius: 10px; }

/* ---------------- 404 ---------------- */

.notfound-box { text-align: center; padding: 70px 20px; }
.nf-code { font-size: 96px; font-weight: 800; color: var(--theme); line-height: 1; letter-spacing: 4px; opacity: .85; }
.notfound-box h1 { font-size: 22px; margin: 14px 0 8px; }
.notfound-box p { color: var(--text-3); margin-bottom: 24px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------- 页脚 ---------------- */

.site-footer { background: #1e2a38; color: #a9b6c4; margin-top: 40px; }
.site-footer-cols {
    max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 26px;
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px;
}
.footer-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.footer-col p { font-size: 13px; margin: 0 0 8px; line-height: 1.8; }
.footer-contact a { color: #7fd9d0; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 7px; }
.footer-nav a { color: #a9b6c4; font-size: 13px; }
.footer-nav a:hover { color: #fff; }

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px 20px 26px; text-align: center;
    max-width: var(--maxw); margin: 0 auto;
}
.site-footer-bottom p { margin: 4px 0; font-size: 12.5px; color: #8d9aa8; }
.footer-extra { color: #8d9aa8; }
.footer-tech { color: #6f7d8b !important; font-size: 12px !important; }
.footer-tech a { color: #8d9aa8; }

/* ★ 备案展示区（浅色背景，保证备案号清晰可读） */
.beian-area {
    display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
    justify-content: center; margin: 12px 0 6px; font-size: 12.5px;
}
.beian-area.beian-left { justify-content: flex-start; }
.beian-mobile .beian-area { justify-content: center; }

.beian-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: #e8eef5; text-decoration: none; padding: 4px 12px; border-radius: 30px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
    transition: .2s; line-height: 1.5;
}
.beian-link:hover { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(22, 186, 170, .6); }
.beian-link .layui-icon { font-size: 14px; color: #7fd9d0; }
.beian-num { font-weight: 600; letter-spacing: .3px; }
.beian-style-text .beian-link { background: none; border: 0; padding: 0 4px; }
.beian-style-icon .beian-label { display: none; }
.beian-gongan-icon { width: 15px; height: 16px; vertical-align: -2px; }

/* ---------------- 回到顶部 ---------------- */

.back-top {
    position: fixed; right: 22px; bottom: 26px; width: 42px; height: 42px; border-radius: 50%;
    border: 0; background: var(--theme); color: #fff; font-size: 18px; cursor: pointer;
    box-shadow: 0 8px 22px rgba(22, 186, 170, .35); opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: .25s; z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--theme-dark); }

.mini-link { font-size: 12.5px; color: var(--theme); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 860px) {
    .detail-body.with-toc { grid-template-columns: 1fr; }
    .toc { position: static; order: 0; margin-bottom: 16px; }
    .about-grid { grid-template-columns: 1fr; }
    .site-footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    :root { --header-h: 58px; }
    .site-menu-btn { display: block; }
    .site-nav {
        position: absolute; left: 0; right: 0; top: var(--header-h);
        background: #fff; flex-direction: column; align-items: stretch;
        padding: 8px 12px 14px; border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 24px rgba(15, 35, 60, .1); display: none;
    }
    .site-nav.open { display: flex; }
    .site-nav-item { padding: 11px 14px; border-radius: 8px; font-size: 15px; }
    .site-nav-search { text-align: center; }

    .site-main { padding: 18px 14px 40px; }
    .hero-card { padding: 26px 16px 22px; }
    .hero-name { font-size: 22px; }
    .hero-avatar { width: 92px; height: 92px; }
    .hero-stats { gap: 18px; }

    .article-item { flex-direction: column; gap: 12px; }
    .article-cover { width: 100%; height: 160px; }
    .detail-wrap { padding: 18px 16px; }
    .detail-head h1 { font-size: 21px; }

    .form-row { grid-template-columns: 1fr; }
    .site-footer-cols { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }
    .friend-item span { max-width: none; }
    .timeline-date { width: 74px; }
    .nf-code { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ---------------- 前台账号页（登录 / 注册） ---------------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 0 20px;
}
.auth-card {
    width: min(100%, 400px);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 26px 22px;
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head img {
    width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
    background: #eef2f6; margin-bottom: 10px;
}
.auth-head h1 { font-size: 20px; margin: 0 0 6px; }
.auth-head p { margin: 0; font-size: 13px; color: var(--text-3); }
.auth-form .field { margin-bottom: 14px; }
.auth-foot {
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
    font-size: 13px; color: var(--text-3);
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.auth-foot .auth-back { margin-left: auto; }

/* ---------------- 备案区修正：仅图标样式也保留可读性 ---------------- */
.beian-style-icon .beian-link {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    padding: 4px 12px;
    border-radius: 30px;
}
.beian-demo-empty {
    color: #b9c6d3; font-size: 13px; margin: 0; line-height: 1.8;
    display: flex; align-items: center; gap: 8px;
}
@media (max-width: 680px) {
    .auth-card { padding: 22px 18px 18px; }
}

/* 导航栏用户状态 */
.site-user {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    background: var(--theme-soft); color: var(--theme-dark);
    font-size: 13px; white-space: nowrap;
}
.site-user a { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.site-user a:hover { color: #f5222d; }
@media (max-width: 680px) {
    .site-user { margin: 6px 0 0; justify-content: center; }
}

/* ---------------- 首页：站内导航卡片 ---------------- */
.section-sub { margin-left: auto; font-size: 12.5px; color: var(--text-3); }

.module-grid {
    display: grid;
    /* 具体列宽由文件末尾「首页样式锁定区」统一定义，这里只给基础值 */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.module-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    transition: .22s;
    position: relative;
}
.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
}
.module-icon {
    width: 44px; height: 44px; flex: none;
    border-radius: 12px;
    background: var(--theme-soft);
    color: var(--theme);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    transition: .22s;
}
.module-card:hover .module-icon {
    background: var(--theme);
    color: #fff;
    transform: scale(1.06);
}
.module-info { flex: 1; min-width: 0; }
.module-info b { display: block; font-size: 15px; }
.module-info span {
    display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.module-count {
    flex: none;
    font-style: normal;
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--theme-soft);
    color: var(--theme-dark);
}

/* ---------------- 首页：全关时的欢迎卡片 ---------------- */
.welcome-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 46px 28px;
    text-align: center;
}
.welcome-icon {
    width: 66px; height: 66px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme), #0f8fd6);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 26px rgba(22, 186, 170, .3);
}
.welcome-card h2 { font-size: 21px; margin-bottom: 10px; }
.welcome-card > p { color: var(--text-2); font-size: 14px; margin: 0 0 6px; }
.welcome-note {
    color: var(--text-3) !important;
    font-size: 13px !important;
    margin-top: 12px !important;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

@media (max-width: 680px) {
    .module-grid { grid-template-columns: 1fr; }
    .welcome-card { padding: 34px 20px; }
}

/* 页脚空栏目占位 */
.footer-nav .footer-empty {
    color: #6f7d8b;
    font-size: 13px;
    font-style: normal;
}

/* ==========================================================
   页脚（重新设计：浅色优雅版，替代大黑块）
   ========================================================== */

.site-footer {
    margin-top: 56px;
    background: #ffffff;
    border-top: 1px solid var(--line);
    color: var(--text-2);
    position: relative;
}
/* 顶部装饰渐变线 */
.site-footer::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg,
        transparent, var(--theme) 20%, #0f8fd6 50%, var(--theme) 80%, transparent);
    opacity: .55;
}

.site-footer-cols {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 38px 20px 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-col h4 {
    color: var(--text);
    font-size: 14.5px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.footer-col h4::before {
    content: '';
    width: 4px; height: 15px;
    border-radius: 2px;
    background: var(--theme);
}
.footer-col p { font-size: 13px; margin: 0 0 8px; line-height: 1.85; color: var(--text-3); }
.footer-contact { color: var(--text-2); }
.footer-contact a { color: var(--theme-dark); }
.footer-contact a:hover { text-decoration: underline; }

.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a {
    color: var(--text-3); font-size: 13px;
    transition: .2s; display: inline-block;
}
.footer-nav a:hover { color: var(--theme); transform: translateX(3px); }
.footer-nav .footer-empty { color: #c1c9d2; font-size: 13px; }

/* ---------- 底部版权 + 备案区 ---------- */
.site-footer-bottom {
    border-top: 1px solid var(--line);
    padding: 20px 20px 26px;
    text-align: center;
    max-width: var(--maxw);
    margin: 0 auto;
}
.site-footer-bottom p {
    margin: 5px 0;
    font-size: 12.5px;
    color: var(--text-3);
}
.copy-line { color: var(--text-2) !important; }
.copy-line a { color: var(--theme-dark); }
.footer-extra { color: var(--text-3); }
.footer-tech { color: #b3bdc9 !important; font-size: 12px !important; }
.footer-tech a { color: var(--text-3); }

/* ★ 备案展示区：白底 + 主题色描边，备案号清晰可读 */
.beian-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 16px 0 10px;
    font-size: 13px;
}
.beian-area.beian-left { justify-content: flex-start; }

.beian-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 30px;
    color: var(--text);
    text-decoration: none;
    background: #f6f9fb;
    border: 1px solid #e3eaf0;
    transition: .22s;
    line-height: 1.5;
}
.beian-link:hover {
    color: var(--theme-dark);
    background: #fff;
    border-color: var(--theme);
    box-shadow: 0 4px 14px rgba(22, 186, 170, .18);
    transform: translateY(-1px);
}
.beian-link .layui-icon { font-size: 15px; color: var(--theme); }
.beian-label { color: var(--text-3); font-size: 12.5px; }
.beian-num {
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--text);
    font-family: -apple-system, "PingFang SC", Arial, sans-serif;
}
.beian-gongan-icon { width: 16px; height: 17px; vertical-align: -3px; }

.beian-style-text .beian-link {
    background: none; border: 0; padding: 0 6px;
}
.beian-style-text .beian-link:hover { box-shadow: none; transform: none; }
.beian-style-icon .beian-label { display: none; }

/* ---------- 深色页脚（保留为可选） ---------- */
.site-footer.footer-dark {
    background: #24323f;
    border-top: 0;
    color: #a9b6c4;
}
.site-footer.footer-dark .footer-col h4 { color: #fff; }
.site-footer.footer-dark .footer-col h4::before { background: #3fd5c4; }
.site-footer.footer-dark .footer-col p,
.site-footer.footer-dark .footer-nav a,
.site-footer.footer-dark .footer-nav .footer-empty { color: #93a4b4; }
.site-footer.footer-dark .footer-nav a:hover { color: #fff; }
.site-footer.footer-dark .footer-contact a { color: #7fd9d0; }
.site-footer.footer-dark .site-footer-bottom { border-top-color: rgba(255,255,255,.08); }
.site-footer.footer-dark .site-footer-bottom p { color: #8d9aa8; }
.site-footer.footer-dark .copy-line { color: #b9c6d3 !important; }
.site-footer.footer-dark .copy-line a { color: #7fd9d0; }
.site-footer.footer-dark .footer-tech { color: #6f7d8b !important; }
.site-footer.footer-dark .footer-tech a { color: #7d8fa1; }
.site-footer.footer-dark .beian-link {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
    color: #e8eef5;
}
.site-footer.footer-dark .beian-link:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(63,213,196,.7);
    color: #fff;
}
.site-footer.footer-dark .beian-label { color: #9fb0bf; }
.site-footer.footer-dark .beian-num { color: #fff; }

/* ---------- 一言（整体居中） ----------
   最终样式在文件末尾「首页样式锁定区（HOMEPAGE-LOCK）」，
   这里只保留基础居中，避免两处定义打架。 */
.hitokoto-card { text-align: center; }
.hitokoto-title { justify-content: center; }
.hitokoto-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}
.hitokoto-body p { margin: 0; text-align: center; }
.hitokoto-btn .layui-icon { font-size: 15px; line-height: 1; }

@media (max-width: 680px) {
    .site-footer { margin-top: 36px; }
    .site-footer-cols { padding: 26px 16px 18px; gap: 22px; }
    .beian-area { flex-direction: column; gap: 8px; }
    .beian-link { width: 100%; justify-content: center; }
}

/* ==========================================================
   母校公告栏
   ========================================================== */

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notice-item {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    border-left: 4px solid transparent;
    transition: .22s;
}
.notice-item:hover {
    border-left-color: var(--theme);
    box-shadow: var(--shadow-hover);
    transform: translateX(2px);
}
.notice-item.compact { padding: 14px 18px; }

.notice-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.notice-item-head h2 { font-size: 16.5px; margin: 0; line-height: 1.5; }
.notice-item-head h2 a { color: var(--text); }
.notice-item-head h2 a:hover { color: var(--theme); }

.notice-top {
    flex: none;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ff9a3c, #ff5722);
    color: #fff;
    font-weight: 500;
}

.notice-item-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-3);
    margin-bottom: 10px;
}
.notice-item-meta .layui-icon { margin-right: 3px; font-size: 13px; }

.notice-item-excerpt {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.8;
}

.notice-item-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--theme);
}
.notice-item-more:hover { gap: 7px; }

/* 详情页 */
.notice-detail {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.notice-detail-head {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 22px;
}
.notice-detail-head h1 {
    font-size: 24px;
    margin: 8px 0 12px;
    line-height: 1.5;
}
.notice-detail-body { min-height: 80px; }
.notice-detail-source { margin-top: 24px; text-align: center; }
.notice-detail-back {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

@media (max-width: 680px) {
    .notice-item { padding: 16px; }
    .notice-detail { padding: 18px 16px; }
    .notice-detail-head h1 { font-size: 20px; }
}

/* ==========================================================
   本站公告：弹框 + 表格列表
   ========================================================== */

/* ---------- 弹框 ---------- */
.notice-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.notice-modal[hidden] { display: none; }
.nm-mask { position: absolute; inset: 0; background: rgba(12, 22, 34, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: nmFade .25s ease both; }
.nm-box {
    position: relative;
    width: min(100%, 560px);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    overflow: hidden;
    animation: nmIn .3s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes nmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nmIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.nm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0;
}
.nm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--theme-dark);
    background: var(--theme-soft);
    padding: 4px 12px;
    border-radius: 20px;
}
.nm-close {
    border: 0;
    background: #f2f5f9;
    color: #6b7a8c;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}
.nm-close:hover { background: #ffe8e6; color: #f5222d; }

.nm-title { font-size: 19px; margin: 14px 20px 8px; line-height: 1.5; color: var(--text); }
.nm-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-3); margin: 0 20px 12px; }
.nm-body {
    padding: 0 20px 18px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-2);
    flex: 1;
}
.nm-body p { margin: 0 0 10px; }
.nm-body img { border-radius: 8px; max-width: 100%; }
.nm-body:after {
    content: '';
    display: block;
    height: 8px;
    background: linear-gradient(transparent, #fff);
    position: sticky;
    bottom: 0;
}
.nm-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: #fafbfc;
    flex-wrap: wrap;
}
.nm-foot .btn-ghost { padding: 7px 16px; font-size: 13.5px; }
.nm-foot .btn-primary { padding: 8px 22px; }

/* ---------- 筛选栏 ---------- */
.notice-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.nf-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.nf-input {
    height: 34px;
    width: 220px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: .18s;
}
.nf-input:focus { border-color: var(--theme); box-shadow: 0 0 0 3px var(--theme-soft); }
.nf-btn {
    height: 34px;
    padding: 0 20px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 7px;
    font-size: 13.5px;
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: .18s;
}
.nf-btn:hover { border-color: var(--theme); color: var(--theme); }
.nf-btn.primary {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.nf-btn.primary:hover { filter: brightness(1.08); color: #fff; }

/* ---------- 表格列表 ---------- */
.notice-table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.notice-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.notice-table thead th {
    background: #f7f9fb;
    color: #5b6773;
    font-weight: 500;
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.notice-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f5f8;
    vertical-align: middle;
}
.notice-table tbody tr:last-child td { border-bottom: 0; }
.notice-table tbody tr { transition: background .16s; }
.notice-table tbody tr:hover { background: #f8fcfb; }
.notice-table tbody tr[data-top="1"] { background: #fffdf7; }
.notice-table tbody tr[data-top="1"]:hover { background: #fffaf0; }

.nt-num { width: 52px; color: var(--text-3); }
.nt-title { min-width: 280px; }
.nt-title a { color: var(--text); font-size: 14px; }
.nt-title a:hover { color: var(--theme); }
.nt-top {
    display: inline-block;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 3px;
    background: #ff9a3c;
    color: #fff;
    margin-right: 7px;
    vertical-align: 1px;
}
.nt-source, .nt-time { color: var(--text-3); white-space: nowrap; }
.nt-time { width: 145px; }
.nt-status { width: 80px; }
.nt-badge {
    display: inline-block;
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 20px;
    background: #e8f9f1;
    color: #12875c;
}
.nt-op { width: 90px; white-space: nowrap; }
.nt-op a { color: #1677ff; font-size: 13px; }
.nt-op a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .notice-table thead { display: none; }
    .notice-table tbody tr {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
    }
    .notice-table tbody td { display: block; padding: 3px 0; border: 0; }
    .nt-num { display: none !important; }
    .nt-title { min-width: 0; font-size: 14.5px; }
    .nt-source::before { content: '发布者：'; color: #b0b9c4; }
    .nt-time::before { content: '时间：'; color: #b0b9c4; }
    .nt-status { display: inline-block !important; margin-right: 10px; }
    .nt-op { display: inline-block !important; }
    .nf-input { width: 100%; }
    .nf-item { width: 100%; }
    .notice-filter { padding: 12px 14px; }
}

/* ==========================================================
   404 页面
   ========================================================== */

.err-page {
    text-align: center;
    padding: 56px 20px 40px;
    max-width: 640px;
    margin: 0 auto;
    animation: errIn .5s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes errIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 插画 ---------- */
.err-art {
    position: relative;
    margin-bottom: 30px;
}
.err-glow {
    position: absolute;
    left: 50%; top: 46%;
    width: 260px; height: 260px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(22,186,170,.18), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
}
.err-num {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 104px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 2px;
    color: var(--theme);
    text-shadow: 0 10px 30px rgba(22, 186, 170, .22);
}
.err-num > span:first-child,
.err-num > span:last-child {
    background: linear-gradient(160deg, var(--theme), #0f8fd6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.err-zero {
    width: 104px;
    height: 104px;
    display: inline-block;
    flex: none;
}
.err-orbit {
    transform-origin: 60px 60px;
    animation: errSpin 6s linear infinite;
}
.err-dot {
    transform-origin: 60px 60px;
    animation: errSpin 6s linear infinite;
}
@keyframes errSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.err-waves {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: -6px;
}
.err-waves .w1 { stroke-dasharray: 8 10; animation: waveMove 8s linear infinite; }
.err-waves .w2 { stroke-dasharray: 6 12; animation: waveMove 12s linear infinite reverse; }
@keyframes waveMove {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -180; }
}

/* ---------- 文案 ---------- */
.err-title {
    font-size: 25px;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: 1px;
}
.err-desc {
    font-size: 14px;
    color: var(--text-3);
    margin: 0 auto 26px;
    line-height: 1.8;
    max-width: 460px;
}

/* ---------- 搜索框 ---------- */
.err-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto 22px;
    padding: 6px 6px 6px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: 0 4px 18px rgba(15, 35, 60, .06);
    transition: .22s;
}
.err-search:focus-within {
    border-color: var(--theme);
    box-shadow: 0 6px 24px rgba(22, 186, 170, .18);
}
.err-search > .layui-icon {
    color: var(--text-3);
    font-size: 16px;
    flex: none;
}
.err-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
    color: var(--text);
    padding: 8px 0;
}
.err-search input::placeholder { color: #b7c0cb; }
.err-search button {
    flex: none;
    border: 0;
    cursor: pointer;
    padding: 9px 22px;
    border-radius: 24px;
    background: var(--theme);
    color: #fff;
    font-size: 13.5px;
    font-family: inherit;
    transition: .2s;
}
.err-search button:hover { filter: brightness(.93); }

/* ---------- 按钮 ---------- */
.err-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 34px;
}
.err-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: .22s;
}
.err-btn:hover {
    border-color: var(--theme);
    color: var(--theme-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 35, 60, .08);
}
.err-btn.primary {
    background: linear-gradient(135deg, var(--theme), #0f8fd6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(22, 186, 170, .3);
}
.err-btn.primary:hover {
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 12px 28px rgba(22, 186, 170, .38);
}

/* ---------- 快捷入口 ---------- */
.err-tip {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 14px;
}
.err-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.err-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    background: var(--theme-soft);
    color: var(--theme-dark);
    font-size: 13px;
    text-decoration: none;
    transition: .2s;
}
.err-chip:hover {
    background: var(--theme);
    color: #fff;
    transform: translateY(-2px);
}
.err-chip .layui-icon { font-size: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 680px) {
    .err-page { padding: 34px 16px 26px; }
    .err-num { font-size: 68px; }
    .err-zero { width: 68px; height: 68px; }
    .err-title { font-size: 21px; }
    .err-search { padding: 5px 5px 5px 14px; }
    .err-search button { padding: 8px 18px; }
    .err-actions { gap: 10px; }
    .err-btn { flex: 1; justify-content: center; padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .err-orbit, .err-dot, .err-waves .w1, .err-waves .w2 { animation: none; }
}

/* ==========================================================
   全站背景图层
   ========================================================== */

/* 背景层：固定定位，不随内容滚动 */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: opacity .5s ease;
}

/* 有背景图时加一层白色柔化遮罩，保证文字可读 */
.site-bg-mask {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, .62) 0%,
        rgba(255, 255, 255, .48) 45%,
        rgba(255, 255, 255, .68) 100%
    );
    backdrop-filter: saturate(115%) blur(2px);
    -webkit-backdrop-filter: saturate(115%) blur(2px);
    pointer-events: none;
}

/* 内容包裹层：在背景之上 */
.site-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 有背景图时：body 透明，让背景层透出来 */
body.site-body.has-bg {
    background: transparent;
}

/* 有背景图时：卡片用半透明 */
body.site-body.has-bg .hero-card,
body.site-body.has-bg .post-card,
body.site-body.has-bg .article-item,
body.site-body.has-bg .detail-wrap,
body.site-body.has-bg .about-card,
body.site-body.has-bg .album-card,
body.site-body.has-bg .message-form-card,
body.site-body.has-bg .message-list,
body.site-body.has-bg .notice-item,
body.site-body.has-bg .notice-detail,
body.site-body.has-bg .notice-table-wrap,
body.site-body.has-bg .friend-item,
body.site-body.has-bg .bookmark-card,
body.site-body.has-bg .module-card,
body.site-body.has-bg .empty-box,
body.site-body.has-bg .tl-card,
body.site-body.has-bg .hitokoto-card,
body.site-body.has-bg .moment-list {
    background: var(--card-bg, rgba(255, 255, 255, .82)) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 顶栏在有背景时也半透明 */
body.site-body.has-bg .site-header {
    background: rgba(255, 255, 255, .8);
}

/* 有背景图时，主区域留一点顶部间距 */
body.site-body.has-bg .site-main {
    padding-top: 32px;
}

@media (max-width: 680px) {
    .site-bg { background-attachment: scroll; }
    body.site-body.has-bg .site-main { padding-top: 20px; }
}

/* ==========================================================
   两侧动态粒子（Canvas）
   ========================================================== */

.site-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;         /* 不拦截鼠标事件 */
    display: block;
}

/* 有背景图时粒子在遮罩之上，保证可见 */
body.site-body.has-bg .site-particles {
    z-index: 0;
    opacity: .85;
}

/* 中间区域用渐变遮罩淡化粒子，保证文字区干净 */
.site-particles::after {
    content: '';
}

/*
 * 窄屏幕隐藏粒子（省性能 + 防止压到正文）：
 * 正文卡片最宽 1160px，加左右内边距后约 1200px。
 * 屏幕比这更窄时两侧留白不足，粒子会叠在卡片上，直接不渲染。
 */
@media (max-width: 1200px) {
    .site-particles { display: none; }
}

/* 系统要求减少动效时不显示 */
@media (prefers-reduced-motion: reduce) {
    .site-particles { display: none; }
}

/* ==========================================================
   首页样式锁定区（HOMEPAGE-LOCK v1）
   ----------------------------------------------------------
   这一块是首页最终的版面，已经定稿：
     · 个人名片卡：头像 · 昵称 · 简介 · 联系方式 · 按钮 · 访问统计
     · 一言卡：整体居中（标题居中、正文居中、刷新按钮正中）
     · 站内导航卡：按栏目数量等宽铺满，单数时最后一个占整行
   下面所有规则都带 !important，优先级最高，避免被别处的
   通用样式或后台的可调参数意外改掉。
   如需再调整首页外观，只改这一块，并把版本号 v1 递增即可。
   ========================================================== */

/* —— 个人名片卡 —— */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
.hero-card { text-align: center !important; }
.hero-avatar { margin: 0 auto !important; }
.hero-name { margin: 14px 0 8px !important; }
.hero-links { justify-content: center !important; }
.hero-stats {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
}

/* —— 一言卡：严格居中 —— */
.hitokoto-card { text-align: center !important; }
.hitokoto-title { justify-content: center !important; }
.hitokoto-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 20px 20px 18px !important;
}
.hitokoto-body p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    max-width: 100% !important;
    word-break: break-word !important;
}
.hitokoto-btn {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    flex: none !important;
    border-radius: 50% !important;
    line-height: 1 !important;
}

/* —— 站内导航：等宽铺满 —— */
.module-grid {
    display: grid !important;
    grid-auto-rows: 1fr !important;
    align-items: stretch !important;
    gap: 14px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.module-grid.cols-1 { grid-template-columns: minmax(0, 1fr) !important; }
/* 两列布局下：单数时最后一个跨整行占满，绝不留下半行空白 */
.module-grid.cols-3 > .module-card:nth-child(3),
.module-grid.cols-5 > .module-card:nth-child(5),
.module-grid.cols-7 > .module-card:nth-child(7),
.module-grid.cols-8 > .module-card:nth-child(8) {
    grid-column: 1 / -1 !important;
}
/* 宽屏会用三列重新排布，这里撤销上面的跨行，交给下面的 @media 处理 */
@media (min-width: 1201px) {
    .module-grid.cols-5 > .module-card:nth-child(5),
    .module-grid.cols-8 > .module-card:nth-child(8) {
        grid-column: auto !important;
    }
}
/* 卡片等高等宽，不被内容长短拉偏 */
.module-card { height: 100% !important; min-width: 0 !important; }
.module-info { min-width: 0 !important; }

@media (min-width: 1201px) {
    .module-grid.cols-4,
    .module-grid.cols-5,
    .module-grid.cols-6,
    .module-grid.cols-7,
    .module-grid.cols-8,
    .module-grid.cols-9 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .module-grid.cols-4 > .module-card:nth-child(4),
    .module-grid.cols-7 > .module-card:nth-child(7),
    .module-grid.cols-8 > .module-card:nth-child(8) {
        grid-column: 1 / -1 !important;
    }
    /*
     * 三列下 5 个栏目：第一行 3 个，第二行剩 2 个。
     * 用 6 列栅格均分，第二行的卡片各占 3 格（即 1.5 个普通卡宽），
     * 既等宽又铺满整行，不会留空白。
     */
    .module-grid.cols-5 {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
    .module-grid.cols-5 > .module-card { grid-column: span 2 !important; }
    .module-grid.cols-5 > .module-card:nth-child(4),
    .module-grid.cols-5 > .module-card:nth-child(5) {
        grid-column: span 3 !important;
    }
}

@media (max-width: 680px) {
    .module-grid,
    .module-grid.cols-1,
    .module-grid.cols-2,
    .module-grid.cols-3,
    .module-grid.cols-4,
    .module-grid.cols-5,
    .module-grid.cols-6,
    .module-grid.cols-7,
    .module-grid.cols-8,
    .module-grid.cols-9 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .module-grid > .module-card { grid-column: auto !important; }
}
