/* ===========================================================
   曦霖佑 · 家庭成长博客
   设计基调：米白纸感、暖陶土色、柔绿点缀，圆润留白
   =========================================================== */

:root {
  --bg: #FBF7F1;
  --bg-alt: #F6EFE6;
  --paper: #FFFFFF;
  --ink: #3B3229;
  --ink-soft: #6E6055;
  --ink-mute: #9A8C7E;
  --line: #ECE0D2;
  --line-soft: #F2E9DE;
  --brand: #C4764F;
  --brand-deep: #A75F3C;
  --brand-soft: #F5E5DA;
  --accent: #7E9C76;
  --accent-soft: #E6EFE3;
  --gold: #D9A54C;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(89, 66, 45, .06);
  --shadow: 0 10px 30px rgba(89, 66, 45, .09);
  --shadow-lg: 0 24px 60px rgba(89, 66, 45, .16);
  --serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(196, 118, 79, .05), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(126, 156, 118, .06), transparent 38%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; line-height: 1.4; margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 247, 241, .88);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: flex; transition: transform .4s ease; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 22px; letter-spacing: .08em; }
.brand-text em { font-style: normal; font-size: 11.5px; color: var(--ink-mute); letter-spacing: .12em; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  position: relative; padding: 9px 15px; border-radius: 999px;
  font-size: 15px; color: var(--ink-soft); transition: .22s;
}
.site-nav a:hover { color: var(--brand-deep); background: var(--brand-soft); }
.site-nav a.active { color: var(--brand-deep); background: var(--brand-soft); font-weight: 600; }
.site-nav a[hidden] { display: none; }
.nav-space { position: relative; }
.nav-space::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.nav-out { color: var(--ink-faint, var(--ink-soft)); font-size: 14px; }
.nav-out:hover { color: var(--brand-deep); }
.nav-admin { border: 1px solid var(--line); margin-left: 8px; }
.nav-admin.is-login { background: var(--brand); color: #fff; border-color: var(--brand); }
.nav-admin.is-login:hover { background: var(--brand-deep); color: #fff; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 0; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 通用容器 ---------- */
.view { min-height: 62vh; padding: 40px 0 72px; animation: fadeUp .38s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { margin-bottom: 30px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--ink-soft); margin: 8px 0 0; font-size: 15px; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: .22em; color: var(--brand); text-transform: uppercase; margin-bottom: 8px; }

.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 52px 0 20px; }
.section-title h2 { font-size: 22px; }
.section-title .more { font-size: 14px; color: var(--brand); }
.section-title .more:hover { color: var(--brand-deep); text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 14.5px; transition: .2s;
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.btn.danger { background: transparent; border-color: #E3B7AC; color: #B4553C; }
.btn.danger:hover { background: #FBEAE5; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; }

.chip {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-soft); transition: .2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.meta { color: var(--ink-mute); font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-mute); display: inline-block; }

.empty { padding: 66px 20px; text-align: center; color: var(--ink-mute); }
.empty .ico { font-size: 40px; opacity: .5; }

/* ---------- 首页 ---------- */
.hero {
  position: relative; border-radius: 26px; overflow: hidden;
  background: #453126; color: #fff; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.05fr .95fr; min-height: 400px;
}
.hero-photo { position: relative; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(40,28,20,.86) 12%, rgba(40,28,20,.42) 52%, rgba(40,28,20,.1) 78%); }
.hero-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 46px 44px; z-index: 2; }
.hero-body .eyebrow { color: #F6D9BE; }
.hero-body h1 { font-size: 42px; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.28); }
.hero-body p { max-width: 420px; color: rgba(255,255,255,.88); font-size: 15.5px; margin: 12px 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn.ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.hero-actions .btn.ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 8px; }
.stat { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px; text-align: center; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--serif); font-size: 27px; color: var(--brand-deep); line-height: 1.3; }
.stat span { font-size: 13px; color: var(--ink-mute); letter-spacing: .06em; }

.home-grid { display: grid; grid-template-columns: 1.35fr .95fr; gap: 30px; margin-top: 12px; }
.home-list { display: flex; flex-direction: column; gap: 16px; }

.post-row { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 14px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line-soft); transition: .24s; box-shadow: var(--shadow-sm); }
.post-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.post-thumb { width: 132px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-row:hover .post-thumb img { transform: scale(1.06); }
.post-row h3 { font-size: 17.5px; margin-bottom: 6px; }
.post-row:hover h3 { color: var(--brand-deep); }
.post-row p { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.side-card { padding: 22px; margin-bottom: 18px; }
.side-card h3 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.side-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.side-photos button { padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.side-photos img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.side-photos button:hover img { transform: scale(1.12); }
.journey-mini { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.journey-mini:last-child { border-bottom: 0; }
.journey-mini img { width: 62px; height: 52px; border-radius: 10px; object-fit: cover; }
.journey-mini b { display: block; font-size: 15px; font-weight: 600; }
.journey-mini:hover b { color: var(--brand-deep); }
.journey-mini span { font-size: 12.5px; color: var(--ink-mute); }

/* ---------- 文章列表 ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search-box input { width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; color: var(--ink); outline: none; font-family: inherit; }
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(196,118,79,.12); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: .26s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card .cover { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); position: relative; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .cover img { transform: scale(1.05); }
.post-card .tag-cat { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.93); color: var(--brand-deep); font-size: 12px; padding: 4px 11px; border-radius: 999px; backdrop-filter: blur(4px); }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 19px; margin-bottom: 8px; }
.post-card:hover h3 { color: var(--brand-deep); }
.post-card p { color: var(--ink-soft); font-size: 14.2px; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { margin-top: auto; }

.archive-year { margin-top: 34px; }
.archive-year > h3 { font-size: 18px; color: var(--brand-deep); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; }

/* ---------- 文章详情 ---------- */
.article { max-width: 780px; margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 32px; }
.article-head h1 { font-size: 34px; margin: 10px 0 14px; }
.article-head .meta { justify-content: center; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow-sm); }
.article-cover img { width: 100%; }

.md-body { font-size: 16.6px; line-height: 1.95; color: #4A3F34; }
.md-body > *:first-child { margin-top: 0; }
.md-body h2 { font-size: 23px; margin: 40px 0 14px; padding-left: 14px; border-left: 4px solid var(--brand); color: var(--ink); }
.md-body h3 { font-size: 19px; margin: 30px 0 12px; color: var(--ink); }
.md-body p { margin: 0 0 20px; }
.md-body ul, .md-body ol { margin: 0 0 20px; padding-left: 24px; }
.md-body li { margin-bottom: 8px; }
.md-body blockquote { margin: 22px 0; padding: 14px 20px; background: var(--bg-alt); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; color: var(--ink-soft); font-family: var(--serif); }
.md-body blockquote p:last-child { margin-bottom: 0; }
.md-body img { border-radius: var(--radius-sm); margin: 22px 0; box-shadow: var(--shadow-sm); }
.md-body a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.md-body code { background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; font-size: 14px; color: var(--brand-deep); font-family: ui-monospace, Menlo, Consolas, monospace; }
.md-body pre { background: #3C332B; color: #F1E6DA; padding: 18px 20px; border-radius: var(--radius-sm); overflow-x: auto; margin: 22px 0; }
.md-body pre code { background: none; color: inherit; padding: 0; }
.md-body hr { border: 0; border-top: 1px dashed var(--line); margin: 32px 0; }
.md-body strong { color: var(--ink); }
.md-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.md-body th, .md-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.md-body th { background: var(--bg-alt); font-family: var(--serif); color: var(--ink); }
.md-body tbody tr:nth-child(even) { background: rgba(246, 239, 230, .45); }
.md-body del { color: var(--ink-mute); }
.md-body mark { background: #FBEBC0; padding: 1px 4px; border-radius: 4px; }

.article-foot { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.article-nav a { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line-soft); font-size: 14.5px; color: var(--ink-soft); }
.article-nav a:hover { border-color: var(--brand); color: var(--brand-deep); }
.article-nav a b { display: block; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* ---------- 相册 / 时间轴 ---------- */
.view-switch { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.view-switch button { border: 0; background: none; padding: 7px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-soft); transition: .2s; }
.view-switch button.on { background: var(--paper); color: var(--brand-deep); box-shadow: var(--shadow-sm); font-weight: 600; }

.album-block { margin-bottom: 38px; }
.album-block h3 { font-size: 19px; margin-bottom: 4px; }
.album-block .album-desc { color: var(--ink-mute); font-size: 13.5px; margin: 0 0 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photo-item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); aspect-ratio: 1; border: 0; padding: 0; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.photo-item:hover img { transform: scale(1.07); }
.photo-item .overlay { position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; background: linear-gradient(transparent, rgba(35,24,16,.72)); color: #fff; text-align: left; opacity: 0; transition: .3s; }
.photo-item:hover .overlay { opacity: 1; }
.photo-item .overlay b { display: block; font-size: 14.5px; font-weight: 600; }
.photo-item .overlay span { font-size: 12px; opacity: .85; }
.photo-item .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; box-shadow: var(--shadow); }
.photo-item .play::before { content: ""; border-left: 15px solid var(--brand-deep); border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.badge-video { position: absolute; right: 10px; top: 10px; background: rgba(35,24,16,.66); color: #fff; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }

.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--line), var(--brand-soft)); }
.tl-item { position: relative; margin-bottom: 34px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tl-date { font-size: 13px; color: var(--ink-mute); letter-spacing: .06em; }
.tl-card { margin-top: 10px; display: grid; grid-template-columns: 260px 1fr; gap: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tl-card .media { cursor: pointer; overflow: hidden; background: var(--bg-alt); }
.tl-card .media img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; transition: transform .5s; }
.tl-card:hover .media img { transform: scale(1.05); }
.tl-card .info { padding: 18px 20px; }
.tl-card .info b { font-size: 17px; display: block; margin-bottom: 6px; }
.tl-card .info p { color: var(--ink-soft); font-size: 14px; margin: 0 0 10px; }

/* ---------- 游记 ---------- */
.journey-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.journey-card { overflow: hidden; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); transition: .26s; }
.journey-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.journey-card .cover { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.journey-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.journey-card:hover .cover img { transform: scale(1.05); }
.journey-card .dest { position: absolute; left: 14px; bottom: 14px; color: #fff; font-family: var(--serif); font-size: 22px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.journey-card .days { position: absolute; right: 14px; top: 14px; background: rgba(255,255,255,.92); color: var(--brand-deep); font-size: 12.5px; padding: 4px 12px; border-radius: 999px; }
.journey-card .body { padding: 18px 22px 22px; }
.journey-card h3 { font-size: 20px; margin-bottom: 8px; }
.journey-card p { color: var(--ink-soft); font-size: 14.2px; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.journey-detail { max-width: 860px; margin: 0 auto; }
.journey-hero { border-radius: var(--radius); overflow: hidden; position: relative; margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.journey-hero img { width: 100%; max-height: 420px; object-fit: cover; }
.journey-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.fact { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.fact span { display: block; font-size: 12px; color: var(--ink-mute); letter-spacing: .08em; }
.fact b { font-size: 16px; font-family: var(--serif); color: var(--ink); }

/* ---------- 关于 ---------- */
.about-wrap { max-width: 800px; margin: 0 auto; }
.family-card { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; padding: 28px; margin-bottom: 28px; }
.family-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); }
.family-card h2 { font-size: 26px; margin-bottom: 12px; }
.family-card p { color: var(--ink-soft); margin: 0 0 10px; }
.member-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 26px; }
.member { padding: 18px; text-align: center; }
.member .avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 26px; background: var(--brand-soft); overflow: hidden; }
.member .avatar img { width: 100%; height: 100%; object-fit: cover; }
.member b { display: block; font-size: 16px; }
.member span { font-size: 13px; color: var(--ink-mute); }
.member p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin: 9px 0 0; }
.m-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 11px; }
.m-tags i { font-style: normal; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--ink-soft); }

/* 后台：圆形头像 */
.member-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 17px; color: var(--ink-soft); }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 后台：当前登录用户信息条 */
.admin-me { margin-top: 34px; }
.me-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-info b { font-size: 15px; }

/* ---------- 后台 ---------- */
.login-wrap { max-width: 400px; margin: 40px auto; padding: 34px 32px; }
.login-wrap h1 { font-size: 25px; text-align: center; margin-bottom: 6px; }
.login-wrap .hint { text-align: center; color: var(--ink-mute); font-size: 13px; margin-bottom: 24px; }
.login-tip { margin-top: 16px; padding: 12px 14px; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-soft); }
.guest-entry { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); text-align: center; }
.guest-entry > span { display: block; font-size: 13px; color: var(--ink-mute); margin-bottom: 10px; }
.guest-entry p { font-size: 12.5px; color: var(--ink-mute); margin-top: 12px; line-height: 1.7; }

/* ---------- 私密小天地 ---------- */
.space-gate { max-width: 560px; margin: 40px auto; padding: 40px 34px; text-align: center; }
.gate-ico { font-size: 42px; margin-bottom: 12px; }
.space-gate h1 { font-size: 25px; margin: 8px 0 12px; }
.space-gate p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.85; }
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

.space-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.space-head h1 { font-size: 30px; margin: 8px 0 10px; }
.space-head p { color: var(--ink-soft); font-size: 14px; line-height: 1.8; max-width: 620px; }

.space-list { display: flex; flex-direction: column; gap: 14px; }
.space-item { display: flex; gap: 18px; padding: 18px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); transition: .2s; }
.space-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.space-item .si-cover { flex: 0 0 132px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.space-item .si-cover img { width: 100%; height: 96px; object-fit: cover; }
.space-item .si-body { flex: 1; min-width: 0; }
.space-item .si-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.space-item .si-top b { font-size: 17px; }
.space-item p { color: var(--ink-mute); font-size: 14px; margin: 8px 0 10px; line-height: 1.7; }
.mood-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--ink-soft); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 7px; font-weight: 600; }
.field input[type="text"], .field input[type="password"], .field input[type="date"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: 15px; font-family: inherit; outline: none; transition: .2s;
}
.field textarea { resize: vertical; min-height: 200px; line-height: 1.75; }
.field textarea.short { min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(196,118,79,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.file-drop { border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 16px; text-align: center; color: var(--ink-mute); font-size: 13.5px; background: var(--bg-alt); transition: .2s; }
.file-drop:hover, .file-drop.over { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.preview-img { margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; max-width: 260px; border: 1px solid var(--line-soft); }
.preview-video { margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; max-width: 420px; border: 1px solid var(--line-soft); background: #1b1b1b; }
.preview-video video { display: block; width: 100%; max-height: 260px; }
.hint { font-size: 12.5px; color: var(--ink-mute); line-height: 1.6; }
.field .hint { margin-top: 8px; }
.hint code { background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-tabs button { border: 1px solid var(--line-soft); background: var(--paper); padding: 9px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-soft); transition: .2s; }
.admin-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }

.row-list { display: flex; flex-direction: column; gap: 10px; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.row-item img.thumb { width: 58px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .grow b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .grow span { font-size: 12.5px; color: var(--ink-mute); }
.row-item .ops { display: flex; gap: 8px; flex: none; }
.row-item.is-picked { border-color: var(--brand); background: var(--brand-soft); }

/* ---- 批量选择与操作 ---- */
.pick-row, .pick-item { display: flex; align-items: center; gap: 10px; flex: none; cursor: pointer; }
.pick-row input, .pick-item input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.bulk-select { display: flex; align-items: center; padding: 10px 16px; background: var(--paper);
  border: 1px dashed var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px;
  background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius-sm); margin-bottom: 12px; }
.bulk-count { font-size: 13.5px; color: var(--brand-deep); font-weight: 500; }
.bulk-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bulk-filter select { width: auto; min-width: 130px; padding: 7px 10px; }
.bulk-undo { display: flex; align-items: center; gap: 12px; padding: 11px 16px; margin-bottom: 16px;
  background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 13.5px; }
.bulk-undo[hidden] { display: none; }

.md-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.md-toolbar button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; color: var(--ink-soft); }
.md-toolbar button:hover { border-color: var(--brand); color: var(--brand-deep); }
.md-preview { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 18px 22px; background: var(--paper); max-height: 460px; overflow-y: auto; }

.notice { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid #D5E3D0; color: #4C6B45; font-size: 13.5px; line-height: 1.7; }
.notice.warn { background: #FDF3E3; border-color: #EBD6AE; color: #8A6520; }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(28, 20, 14, .94); display: grid; place-items: center; padding: 40px 64px; }
.lightbox[hidden] { display: none; }
.lb-stage { max-width: min(1200px, 100%); max-height: 100%; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-stage video { max-width: 100%; max-height: 82vh; border-radius: 8px; background: #000; }
.lb-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.9); font-size: 14px; }
.lb-caption b { display: block; font-size: 16px; margin-bottom: 2px; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%; width: 46px; height: 46px; font-size: 26px; line-height: 1; transition: .2s; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 18px; right: 22px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { background: #3B3229; color: #fff; padding: 11px 22px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .3s ease; }
.toast.err { background: #A8452F; }
.toast.ok { background: #4C6B45; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 页脚 ---------- */
.site-footer { background: #453126; color: rgba(255,255,255,.78); margin-top: 40px; padding: 44px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.footer-brand strong { font-family: var(--serif); font-size: 21px; color: #fff; letter-spacing: .08em; }
.footer-brand p { margin: 10px 0 0; font-size: 14px; line-height: 1.7; }
.footer-links { display: flex; gap: 22px; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; }
.footer-links a { font-size: 14.5px; color: rgba(255,255,255,.78); }
.footer-links a:hover { color: #F6D9BE; }
.footer-copy { grid-column: 1 / -1; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: rgba(255,255,255,.5); text-align: center; }
.footer-copy .beian-link { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-copy .beian-link:hover { color: rgba(255,255,255,.78); }

/* ---------- 本地大文件缺失提示 ---------- */
/* 数据里留着 idb:xxx 引用、但 IndexedDB 里找不到本体时（例如跨设备只导入了 JSON），
   由 blobs.hydrate 打上 data-blob-missing，这里显示一个占位角标，避免静默空白。 */
img[data-blob-missing], video[data-blob-missing] {
  position: relative;
  min-width: 90px;
  min-height: 70px;
  background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 8px, var(--bg) 8px, var(--bg) 16px);
  outline: 1px dashed var(--line);
}
img[data-blob-missing]::after {
  content: '图片缺失';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; color: var(--ink-mute);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo img { height: 260px; min-height: 0; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(40,28,20,.62), rgba(40,28,20,.72)); }
  .hero-body { padding: 30px 26px; }
  .hero-body h1 { font-size: 32px; }
  .hero-body p { max-width: none; }
  .journey-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .wrap { padding: 0 18px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 10px 18px 18px; gap: 2px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 15.5px; }
  .nav-admin { margin: 6px 0 0; text-align: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 1fr; }
  .tl-card { grid-template-columns: 1fr; }
  .family-card { grid-template-columns: 1fr; text-align: center; }
  .family-card img { max-width: 200px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .article-head h1 { font-size: 27px; }
  .md-body { font-size: 16px; }
  .space-head h1 { font-size: 25px; }
  .space-item { flex-direction: column; gap: 12px; }
  .space-item .si-cover { flex: none; }
  .space-item .si-cover img { height: 150px; }
  .space-gate { padding: 30px 22px; }
  .field-row { grid-template-columns: 1fr; }
  .row-item { flex-wrap: wrap; }
  .post-row { grid-template-columns: 96px 1fr; }
  .post-thumb { width: 96px; height: 76px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .lightbox { padding: 20px 12px 70px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; width: 42px; height: 42px; }
  .lb-prev { left: 26%; }
  .lb-next { right: 26%; }
  .lb-caption { bottom: 62px; padding: 0 20px; }
  .view { padding: 26px 0 56px; }
}

/* ---------- 登录 / 密钥页 ---------- */
.form-err { color: #B4483C; font-size: 13px; margin: -8px 0 14px; }

/* ---------- 云端保存状态条：失败必须可见、可重试 ---------- */
.sync-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 460px); padding: 10px 14px;
  border-radius: 999px; font-size: 13px; line-height: 1.5;
  background: var(--paper); border: 1px solid var(--line-soft);
  box-shadow: 0 6px 20px rgba(60, 42, 30, .16);
}
.sync-badge.pending { color: var(--ink-soft); }
.sync-badge.ok { color: #3F7A52; border-color: rgba(63, 122, 82, .35); }
.sync-badge.err { color: #B4483C; border-color: rgba(180, 72, 60, .45); }
.sync-badge .sb-text { flex: 1; }
.sync-badge .sb-retry {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  color: inherit; font-size: 13px; font-weight: 600; text-decoration: underline;
  padding: 2px 4px;
}
