/* ==========================================================
   日记簿 · 前台样式
   ========================================================== */

:root {
    --accent: #b3543f;
    --accent-dark: #8f3d2c;
    --soft: #fbf7f2;
    --paper: #fffdf9;
    --ink: #2c2825;
    --muted: #7d7369;
    --line: #e8dfd4;
    --ring: rgba(179, 84, 63, .18);
    --radius: 14px;
    --shadow: 0 10px 30px rgba(78, 60, 40, .07);
    --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="green"] { --accent: #3f7d5a; --accent-dark: #2f5f43; --soft: #f3f8f4; --paper: #fbfdfb; --line: #d9e6dc; --ring: rgba(63, 125, 90, .2); }
[data-theme="lemon"] { --accent: #a8791c; --accent-dark: #855c10; --soft: #fdf8e9; --paper: #fffdf5; --line: #ece1c7; --ring: rgba(168, 121, 28, .2); }
[data-theme="dandelion"] { --accent: #8a6b3f; --accent-dark: #6a5030; --soft: #faf5ec; --paper: #fffdf8; --line: #e8ddcb; --ring: rgba(138, 107, 63, .2); }
[data-theme="lonely_july"] { --accent: #3d5a80; --accent-dark: #2c4463; --soft: #f1f5fa; --paper: #fbfcfe; --line: #d8e1ec; --ring: rgba(61, 90, 128, .2); }
[data-theme="lotus"] { --accent: #a05a70; --accent-dark: #7d4356; --soft: #fcf4f6; --paper: #fffafb; --line: #eedade; --ring: rgba(160, 90, 112, .2); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, var(--soft), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(255, 255, 255, .8), transparent 55%),
        #f6f1e9;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.inline-form { display: inline; }

/* ---------- 头部 ---------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 253, 249, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.head-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark-box {
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 1px 6px 16px var(--ring);
	border: 1px solid var(--accent);
}
.brand-mark {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.brand-logo-svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.main-nav > a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #5e554c;
    font-size: 14px;
}
.main-nav > a:hover { background: var(--soft); color: var(--accent); }

.search-mini input {
    width: 150px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
}
.search-mini input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.head-link { background: none; border: 0; padding: 6px 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.head-link:hover { color: var(--accent); }
.head-user { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; }
.head-user:hover { color: var(--accent); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--soft); }
.avatar-xs { width: 28px; height: 28px; }
.avatar-sm { width: 40px; height: 40px; }
.avatar-lg { width: 84px; height: 84px; border: 4px solid #fff; box-shadow: var(--shadow); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 17px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    font-size: 14px; cursor: pointer; transition: .18s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: #b3261e; border-color: #eccbc7; }
.btn-danger:hover { background: #fdf1ef; color: #8f1d17; border-color: #d9a9a2; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }

/* ---------- 通用卡片 / 版式 ---------- */
.flash-wrap { margin-top: 18px; }
.alert {
    padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px;
    border: 1px solid transparent;
}
.alert-error { background: #fdf1ef; color: #9c2f24; border-color: #eccbc7; }
.alert-success { background: #eff7f1; color: #2f6b47; border-color: #cfe5d8; }

.site-main { padding: 30px 0 60px; }

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.panel-pad { padding: 24px 26px; }

.section-head {
    display: flex; align-items: end; justify-content: space-between;
    gap: 16px; margin: 0 0 16px;
}
.section-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: .02em; }
.section-head .more { font-size: 13px; color: var(--muted); }
.section-head .more:hover { color: var(--accent); }

.page-title h1 { margin: 0 0 6px; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.page-title p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- 首页 hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 42px 44px;
    background:
        radial-gradient(700px 300px at 90% 0%, rgba(255, 255, 255, .75), transparent 70%),
        linear-gradient(135deg, var(--soft), var(--paper));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}
.hero::after {
    content: "Diary";
    position: absolute; right: 34px; bottom: 5px;
    font-family: var(--serif); font-style: italic; font-size: 90px; color: var(--accent);
    opacity: .07; line-height: 1;
}
.hero h1 {
    margin: 0 0 12px;
    font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: .02em;
    max-width: 640px;
}
.hero p { margin: 0 0 22px; color: #5f564c; max-width: 560px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; position: relative; z-index: 1; }
.hero-stat strong { display: block; font-family: var(--serif); font-size: 25px; color: var(--accent); line-height: 1.2; }
.hero-stat span { font-size: 12.5px; color: var(--muted); }
.hero-theme { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.hero-theme-label { font-size: 12.5px; color: var(--muted); }
.theme-dot {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid transparent; padding: 0; cursor: pointer;
    transition: .15s ease; flex: none;
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--paper); box-shadow: 0 0 0 2px var(--accent); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 双栏 ---------- */
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }

/* ---------- 日记卡片 ---------- */
.entry-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: .2s ease;
}
.entry-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #ddd0c0; }
.entry-card--noimg { grid-template-columns: minmax(0, 1fr); }
.entry-card--noimg .entry-body { padding: 0; }
.entry-card--noimg .entry-excerpt { max-width: none; }
.entry-card > a:first-child { display: block; line-height: 0; }
.entry-thumb { width: 100%; height: 96px; object-fit: cover; display: block; border-radius: 6px; background: var(--soft); }
.entry-body { padding: 0; min-width: 0; }
.entry-kicker { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.entry-kicker img { width: 22px; height: 22px; border-radius: 50%; }
.entry-title { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); line-height: 1.4; margin-bottom: 7px; }
.entry-title:hover { color: var(--accent); }
.entry-excerpt { margin: 0; color: #6a6057; font-size: 13.8px; line-height: 1.75; }
.entry-foot { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.entry-foot span { display: inline-flex; gap: 4px; align-items: center; }
.pill {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 999px;
    background: var(--soft); color: var(--accent);
    font-size: 12px; border: 1px solid var(--line);
}
.pill-gray { background: #f4f1ed; color: var(--muted); }

.entry-row {
    display: flex; gap: 14px; justify-content: space-between; align-items: baseline;
    padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.entry-row:last-child { border-bottom: 0; }
.entry-row .t { font-family: var(--serif); font-size: 15.5px; color: var(--ink); }
.entry-row .t:hover { color: var(--accent); }
.entry-row .m { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- 侧栏 ---------- */
.side-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 20px 16px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.side-card h3 {
    margin: 0 0 14px; font-family: var(--serif); font-size: 16.5px; font-weight: 600;
    padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.book-mini {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; color: var(--ink);
}
.book-mini:hover { color: var(--accent); }
.book-mini img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.book-mini .n { font-size: 14px; line-height: 1.3; }
.book-mini .d { font-size: 11.5px; color: var(--muted); }

.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a {
    font-size: 13px; padding: 4px 10px;
    border: 1px solid var(--line); border-radius: 999px; color: #6a6057; background: #fff;
}
.link-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 日记本列表 ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.book-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 10px;
    transition: .2s ease;
}
.book-card:hover { transform: translateY(-2px); }
.book-card .top { display: flex; gap: 12px; align-items: center; }
.book-card img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.book-card .name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.book-card .nick { font-size: 12.5px; color: var(--muted); }
.book-card .intro { margin: 0; font-size: 13px; color: #6a6057; line-height: 1.7; min-height: 44px; }
.book-card .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* ---------- 详情页 ---------- */
.diary-article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 38px 44px;
    box-shadow: var(--shadow);
}
.article-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article-head h1 { margin: 0 0 12px; font-family: var(--serif); font-size: 30px; line-height: 1.35; font-weight: 600; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.article-meta img { width: 32px; height: 32px; border-radius: 50%; }
.article-meta a { color: var(--ink); }
.article-meta a:hover { color: var(--accent); }

.prose { font-size: 15.5px; line-height: 2; color: #3d3732; word-break: break-word; }
.prose p { margin: 0 0 1em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 10px; }
.prose br { content: ""; }
.prose a { border-bottom: 1px solid var(--ring); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose blockquote {
    margin: 1.2em 0; padding: 10px 18px;
    border-left: 3px solid var(--accent);
    background: var(--soft); color: #5b5249; border-radius: 0 8px 8px 0;
}
.prose h2, .prose h3 { font-family: var(--serif); margin: 1.3em 0 .6em; }

.article-pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 24px; }
.article-pictures img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

.article-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- 留言 ---------- */
.comments { margin-top: 26px; }
.comments h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 16px; }
.comment {
    display: flex; gap: 12px;
    padding: 16px 0; border-bottom: 1px dashed var(--line);
}
.comment:last-child { border-bottom: 0; }
.comment-avatar { flex: none; }
.comment-avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.comment-head strong { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.comment-body { margin-top: 5px; font-size: 14px; color: #4b443d; line-height: 1.8; word-break: break-word; }
.comment-body img { max-height: 60px; vertical-align: middle; margin: 0 2px; }
.comment-body p { margin: 0 0 6px; }
.reply {
    margin-top: 11px; padding: 11px 14px;
    background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
    font-size: 13.5px; color: #4b443d; line-height: 1.8;
}
.reply .who { display: block; margin-bottom: 4px; color: var(--accent); font-size: 12.5px; }
.comment-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }

.comment-form { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.comment-form textarea { min-height: 96px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13.5px; color: #5b5249; margin-bottom: 6px; }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--muted); }

input[type=text], input[type=password], input[type=email], input[type=search], input[type=file], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd4c8;
    border-radius: 9px;
    background: #fffdfa;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    transition: .15s ease;
}
textarea { resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); background: #fff;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #5b5249; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.auth-card { max-width: 440px; margin: 20px auto; padding: 34px 36px; }
.auth-card h1 { font-family: var(--serif); font-size: 25px; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }

/* ---------- 编辑器 ---------- */
.editor {
    border: 1px solid #ddd4c8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.editor-toolbar {
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fbf8f3;
}
.editor-toolbar button {
    border: 0; background: transparent; color: #5b5249;
    padding: 5px 8px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.editor-toolbar button:hover { background: #efe8de; color: var(--accent); }
.editor-toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.editor-toolbar .upload-label {
    padding: 5px 9px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: #5b5249;
    border: 1px dashed #d6cabb;
}
.editor-toolbar .upload-label:hover { color: var(--accent); border-color: var(--accent); }
.editor-toolbar input[type=file] { display: none; }
.editor-area {
    min-height: 360px; padding: 18px 20px; outline: none;
    font-size: 15px; line-height: 1.9; color: #3d3732;
    overflow-y: auto; max-height: 70vh;
}
.editor-area:empty::before { content: attr(data-placeholder); color: #b3a798; }
.editor-area img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.editor-area blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: #6a6057; margin: 10px 0; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); background: #fbf8f3; font-size: 12px; color: var(--muted); }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 0; }
.pager .pg {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 9px;
    background: #fff; color: #5b5249; font-size: 13px;
}
.pager .pg:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .disabled, .pager .gap { color: #b8ada2; background: transparent; border-color: transparent; }

/* ---------- 我的日记 / 设置 ---------- */
.dash-head {
    display: flex; align-items: center; gap: 20px;
    padding: 26px 28px; margin-bottom: 22px;
}
.dash-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow); }
.dash-head h1 { font-family: var(--serif); font-size: 25px; margin: 0; }
.dash-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dash-stats { display: flex; gap: 26px; margin-left: auto; flex-wrap: wrap; }
.dash-stats strong { display: block; font-family: var(--serif); color: var(--accent); font-size: 22px; }
.dash-stats span { font-size: 12px; color: var(--muted); }

.my-entry {
    display: flex; gap: 16px; align-items: center;
    padding: 15px 0; border-bottom: 1px dashed var(--line);
}
.my-entry:last-child { border-bottom: 0; }
.my-entry .t { flex: 1; min-width: 0; }
.my-entry .t a { font-family: var(--serif); font-size: 16.5px; color: var(--ink); }
.my-entry .t a:hover { color: var(--accent); }
.my-entry .t p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.my-entry .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 7px 13px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.tabs a:hover { background: var(--soft); color: var(--accent); }
.tabs a.active { background: var(--accent); color: #fff; }

.avatar-preview { display: flex; align-items: center; gap: 16px; }
.avatar-preview img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.skin-option { position: relative; }
.skin-option input { position: absolute; opacity: 0; pointer-events: none; }
.skin-option label {
    display: block; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; background: #fff; transition: .15s ease;
}
.skin-option label:hover { border-color: var(--accent); }
.skin-option input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.skin-option .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.skin-option .n { font-size: 13.5px; color: var(--ink); }
.skin-option .d { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- 后台 ---------- */
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-nav {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; position: sticky; top: 90px;
}
.admin-nav a { display: block; padding: 9px 12px; border-radius: 8px; color: #5b5249; font-size: 13.5px; }
.admin-nav a:hover, .admin-nav a.active { background: var(--soft); color: var(--accent); }
.admin-main { min-width: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; background: #fbf8f3; white-space: nowrap; }
.table td { color: #4b443d; }
.table .nowrap { white-space: nowrap; }
.table td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-box strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--accent); }
.stat-box span { font-size: 12.5px; color: var(--muted); }

.empty {
    text-align: center; padding: 46px 20px; color: var(--muted);
}
.empty .big { font-family: var(--serif); font-size: 22px; color: #6a6057; margin-bottom: 8px; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); background: rgba(255, 253, 249, .7); padding: 26px 0; margin-top: 30px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; gap: 16px; font-size: 13px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .layout-2col { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-nav { position: static; display: flex; flex-wrap: wrap; }
    .admin-nav a { padding: 7px 10px; }
    .entry-card { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
    .entry-thumb { height: 84px; }
    .search-mini { display: none; }
}

@media (max-width: 720px) {
    .head-inner { flex-wrap: wrap; min-height: 0; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
    .main-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .main-nav > a { white-space: nowrap; }
    .head-actions { gap: 6px; }
    .head-user span { display: none; }
    .brand-text small { display: none; }
    .hero { padding: 30px 24px; }
    .hero h1 { font-size: 27px; }
    .entry-card { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
    .entry-thumb { height: 120px; width: 100%; max-width: 100%; object-fit: cover; border-radius: 6px; }
    .entry-body { padding: 16px 18px; }
    .diary-article { padding: 26px 22px; }
    .article-head h1 { font-size: 24px; }
    .dash-head { flex-wrap: wrap; padding: 20px; }
    .dash-stats { margin-left: 0; width: 100%; gap: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 22px; }
    .foot-inner { flex-direction: column; align-items: flex-start; }
    .editor-area { min-height: 280px; }
}

/* 打印/暗色系统偏好不做切换，保持纸感 */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto; }
}
