/* ===========================================================
   家庭生活志 · 温馨暖阳主题
   =========================================================== */

:root {
  --bg:          #FDF8F2;
  --bg-soft:     #F7EFE4;
  --surface:     #FFFFFF;
  --surface-2:   #FBF5EC;

  --ink:         #3E332A;
  --ink-2:       #6B5B4D;
  --ink-3:       #9C8B7B;

  --line:        rgba(62, 51, 42, 0.09);
  --line-2:      rgba(62, 51, 42, 0.16);

  --sun:         #DE7B53;
  --sun-deep:    #C25F38;
  --sun-soft:    #F6DCCB;
  --sun-wash:    #FDF0E6;

  --sage:        #7FA383;
  --sage-soft:   #E3EDE1;

  --sky:         #6E93B8;

  --radius-s:    10px;
  --radius:      16px;
  --radius-l:    24px;

  --shadow-s:    0 1px 2px rgba(62, 51, 42, 0.04);
  --shadow:      0 6px 20px -8px rgba(62, 51, 42, 0.16);
  --shadow-l:    0 20px 48px -20px rgba(62, 51, 42, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Songti SC", "STSong", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 12% -6%, rgba(222, 123, 83, 0.10), transparent 62%),
    radial-gradient(620px 380px at 92% 4%, rgba(127, 163, 131, 0.10), transparent 60%);
}

a { color: var(--sun-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ---------- 布局 ---------- */

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(150%) blur(12px);
  background: rgba(253, 248, 242, 0.86);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px var(--sun-wash);
  flex: none;
}

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--ink); color: #fff; }

.nav a.ghost { border: 1px solid var(--line-2); }

/* ---------- 通用组件 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}

.section { margin: 54px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.section-head h2 { font-size: 21px; }
.section-head .sub { color: var(--ink-3); font-size: 13px; }
.section-head .more { margin-left: auto; font-size: 13px; color: var(--ink-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s, background .18s, border-color .18s, opacity .18s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--sun); border-color: var(--sun); color: #fff; }
.btn.primary:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
.btn.danger { color: #B4453C; border-color: rgba(180, 69, 60, .3); }
.btn.danger:hover { background: #FCF0EE; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sun-wash);
  color: var(--sun-deep);
  font-size: 12px;
  line-height: 1.7;
}
.tag.sage { background: var(--sage-soft); color: #4F7154; }
.tag.plain { background: var(--surface-2); color: var(--ink-3); }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sun);
  box-shadow: 0 0 0 3px var(--sun-wash);
}
textarea { resize: vertical; min-height: 110px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; min-width: 0; }

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: rgba(255,255,255,.5);
}

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.center { text-align: center; }

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

.hero { padding: 60px 0 16px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 5.2vw, 46px);
  letter-spacing: 0.04em;
}
.hero .subtitle {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.days-card {
  margin: 34px auto 0;
  max-width: 560px;
  padding: 30px 26px 26px;
  border-radius: var(--radius-l);
  background: linear-gradient(168deg, #FFF7F0 0%, #FDEFE2 62%, #F9E6D6 100%);
  border: 1px solid var(--sun-soft);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.days-card::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  right: -70px; top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,255,255,0));
}
.days-card .label { color: var(--sun-deep); font-size: 13px; letter-spacing: .18em; }
.days-card .num {
  font-family: var(--font-title);
  font-size: clamp(52px, 11vw, 76px);
  line-height: 1.05;
  margin: 8px 0 2px;
  color: var(--sun-deep);
  font-weight: 600;
}
.days-card .num small { font-size: 22px; margin-left: 6px; color: var(--ink-2); }
.days-card .since { color: var(--ink-2); font-size: 13px; }
.days-card .heart { font-size: 15px; color: var(--sun); }

.anniv-strip {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.anniv {
  min-width: 150px;
  padding: 13px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow-s);
}
.anniv .t { font-size: 12px; color: var(--ink-3); }
.anniv .d { font-family: var(--font-title); font-size: 22px; color: var(--ink); margin: 3px 0 1px; }
.anniv .d span { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.anniv .w { font-size: 12px; color: var(--sun-deep); }
.anniv.soon { border-color: var(--sun-soft); background: var(--sun-wash); }

/* ---------- 照片墙 ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.photo-grid.dense { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-s);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.photo:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo:hover img { transform: scale(1.05); }
.photo .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(30,22,16,.72), transparent);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity .25s;
}
.photo .cap .date { opacity: .8; font-size: 11px; }
.photo:hover .cap { opacity: 1; }
.photo.flip { aspect-ratio: 4 / 5; }

/* ---------- 爱心照片墙 ---------- */

.heart-wrap { max-width: 940px; margin: 0 auto; }
.heart-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 32 / 28.75;   /* 与心形轮廓的宽高比一致 */
}
.heart-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.heart-tile {
  position: absolute;
  display: block;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 1px 3px rgba(62, 51, 42, .14);
  cursor: zoom-in;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .45s ease,
              transform .55s cubic-bezier(.2, .85, .3, 1.15),
              box-shadow .25s, border-color .2s;
}
.heart-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.heart-tile .ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--sun-soft);
  font-size: 15px;
}
.heart-tile.in { opacity: 1; transform: scale(1); }
.heart-tile:hover,
.heart-tile:focus-visible {
  transform: scale(1.18);
  z-index: 6;
  outline: none;
  border-color: var(--sun);
  box-shadow: var(--shadow-l);
}
.heart-cap {
  min-height: 24px;
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.heart-cap b { color: var(--ink); font-weight: 500; }
.heart-cap .dot { margin: 0 6px; opacity: .5; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 20, 14, .93);
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 80vh;
  width: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-l);
}
.lightbox .meta {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.86);
  text-align: center;
  font-size: 13px;
  max-width: 80vw;
}
.lightbox .meta .t { font-size: 15px; font-weight: 500; }
.lightbox .meta .d { opacity: .65; font-size: 12px; }
.lightbox .close,
.lightbox .prev,
.lightbox .next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
}
.lightbox button:hover { background: rgba(255,255,255,.24); }
.lightbox .close { top: 20px; right: 20px; }
.lightbox .prev { left: 20px; top: 50%; margin-top: -21px; }
.lightbox .next { right: 20px; top: 50%; margin-top: -21px; }
.lightbox .orig {
  position: absolute; top: 24px; left: 20px;
  font-size: 12px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); color:#fff; border:none; cursor:pointer;
}

/* ---------- 时间轴 ---------- */

.tl { position: relative; padding-left: 30px; }
.tl::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--sun-soft), var(--sage-soft), transparent);
  border-radius: 2px;
}
.tl-year {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--sun);
  margin: 34px 0 14px;
  position: relative;
}
.tl-year:first-child { margin-top: 0; }
.tl-year::before {
  content: "";
  position: absolute;
  left: -30px; top: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px var(--sun-wash);
}
.tl-item {
  position: relative;
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .2s, box-shadow .2s;
}
.tl-item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.tl-item::before {
  content: "";
  position: absolute;
  left: -27px; top: 23px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--sun);
}
.tl-item .date { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.tl-item h3 { font-size: 16px; margin: 4px 0 6px; }
.tl-item p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------- 日记 ---------- */

.post-list { display: grid; gap: 16px; }
.post-card {
  display: flex;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card .thumb {
  width: 148px; height: 108px;
  flex: none;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--bg-soft);
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb.empty-thumb {
  display: grid; place-items: center;
  color: var(--sun-soft); font-size: 26px;
  background: linear-gradient(140deg, #FFF6EE, #F9EADF);
}
.post-card .body { flex: 1; min-width: 0; }
.post-card h3 { font-size: 17px; margin-bottom: 6px; }
.post-card h3 a { color: var(--ink); }
.post-card .excerpt {
  color: var(--ink-2); font-size: 13.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .meta { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }

.article { padding: 6px 0 40px; }
.article .head { max-width: 720px; margin: 0 auto 26px; text-align: center; }
.article .head h1 { font-size: clamp(24px, 4vw, 33px); margin-bottom: 12px; }
.article .head .meta { color: var(--ink-3); font-size: 13px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.article .cover { border-radius: var(--radius-l); overflow: hidden; margin: 0 0 30px; box-shadow: var(--shadow); }
.article .content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 2;
  color: #463A30;
  white-space: pre-wrap;
  word-break: break-word;
}
.article .content p { margin: 0 0 1.1em; }

/* ---------- 愿望清单 ---------- */

.wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.wish {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform .2s, opacity .2s;
}
.wish:hover { transform: translateY(-2px); }
.wish .check {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  cursor: pointer;
  display: grid; place-items: center;
  color: transparent;
  font-size: 12px;
  transition: background .2s, border-color .2s, color .2s;
  background: transparent;
}
.wish .check:hover { border-color: var(--sage); }
.wish.done .check { background: var(--sage); border-color: var(--sage); color: #fff; }
.wish .t { font-size: 15px; font-weight: 500; }
.wish.done .t { text-decoration: line-through; color: var(--ink-3); }
.wish .n { font-size: 13px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }
.wish .f { font-size: 12px; color: var(--ink-3); margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wish.done { background: var(--surface-2); }

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  margin: 6px 0 22px;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), var(--sage));
  transition: width .5s ease;
}

/* ---------- 管理后台 ---------- */

.auth-shell {
  max-width: 420px;
  margin: 56px auto 80px;
  padding: 30px 28px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth-shell h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-shell .lead { text-align: center; color: var(--ink-3); font-size: 13px; margin-bottom: 22px; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  margin-bottom: 20px;
}
.tabs button {
  flex: 1;
  padding: 7px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }

.inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 5px;
}

.admin-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 26px 0 8px;
}
.admin-head h1 { font-size: 24px; }
.admin-head .who { color: var(--ink-3); font-size: 13px; }
.admin-head .sp { margin-left: auto; display: flex; gap: 8px; }

.admin-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
  margin-bottom: 24px;
}
.admin-nav button {
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.admin-nav button:hover { color: var(--ink); }
.admin-nav button.on { color: var(--sun-deep); border-bottom-color: var(--sun); }

.panel { display: none; }
.panel.on { display: block; animation: fade .3s ease; }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.upload-zone {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.hot { border-color: var(--sun); background: var(--sun-wash); }
.upload-zone .big { font-size: 15px; font-weight: 500; }
.upload-zone .small { color: var(--ink-3); margin-top: 4px; }

.queue { margin-top: 16px; display: grid; gap: 10px; }
.q-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
}
.q-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.q-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item .st { font-size: 12px; color: var(--ink-3); flex: none; }
.q-item .st.ok { color: var(--sage); }
.q-item .st.err { color: #B4453C; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.mini-grid .m {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 1/1;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.mini-grid .m img { width: 100%; height: 100%; object-fit: cover; }
.mini-grid .m .x {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(28,20,14,.6); color: #fff; font-size: 13px;
  display: grid; place-items: center;
}
.mini-grid .m .x:hover { background: #B4453C; }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 10px;
}
.list-row .g { flex: 1; min-width: 0; }
.list-row .t { font-size: 14.5px; font-weight: 500; }
.list-row .s { font-size: 12px; color: var(--ink-3); }
.list-row .acts { display: flex; gap: 6px; flex: none; }

/* ---------- 登录门禁 ---------- */

#gate { display: none; }
html.gate-check main,
html.gate-locked main { display: none; }
html.gate-locked #gate { display: block; }

.gate-card {
  max-width: 440px;
  margin: 72px auto 96px;
  padding: 42px 34px 34px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.gate-card .lock {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--sun-wash);
  color: var(--sun-deep);
  display: grid;
  place-items: center;
}
.gate-card h1 { font-size: 21px; margin-bottom: 10px; }
.gate-card .desc { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.gate-card .tip { color: var(--ink-3); font-size: 12.5px; margin: 18px 0 0; }

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  z-index: 300;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #A33C33; }

.loading { padding: 40px; text-align: center; color: var(--ink-3); font-size: 14px; }
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--line-2);
  border-top-color: var(--sun);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--sun-wash);
  border: 1px solid var(--sun-soft);
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 18px;
}

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

.site-footer {
  margin-top: 70px;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}
.site-footer .sep { margin: 0 8px; opacity: .5; }

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

@media (max-width: 700px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .site-header .inner { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .nav a { padding: 6px 11px; font-size: 13.5px; white-space: nowrap; }
  .hero { padding: 38px 0 10px; }
  .section { margin: 40px 0; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .post-card { flex-direction: column; gap: 12px; }
  .post-card .thumb { width: 100%; height: 160px; }
  .tl { padding-left: 24px; }
  .lightbox .prev { left: 10px; }
  .lightbox .next { right: 10px; }
  .admin-head .sp { margin-left: 0; width: 100%; }
  .heart-tile { border-radius: 5px; }
  .heart-stage { aspect-ratio: 32 / 28.75; }
}

/* ---------- 动效降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  .heart-tile {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .heart-tile:hover, .heart-tile:focus-visible { transform: none; }
}

/* ===========================================================
   首页迷你爱心墙
   =========================================================== */
.heart-stage.mini { height: 430px; }
@media (max-width: 640px) {
  .heart-stage.mini { height: 340px; }
}

/* ===========================================================
   统计条（美食 / 旅行页顶部）
   =========================================================== */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 26px 0 8px;
}
.stat-strip .anniv { min-width: 130px; text-align: center; padding: 14px 22px; }
.stat-strip .anniv .d { font-size: 26px; }

/* ===========================================================
   美食 · 吃过的好味道
   =========================================================== */
.filter-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0 26px;
}
.filter-tabs button {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.filter-tabs button:hover { border-color: var(--sun); color: var(--sun-deep); }
.filter-tabs button.on {
  background: var(--sun-wash);
  border-color: var(--sun-soft);
  color: var(--sun-deep);
  font-weight: 600;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
@media (max-width: 640px) {
  .food-grid { grid-template-columns: 1fr; }
}
.food-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.food-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.food-card .cover {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 34px;
  overflow: hidden;
  cursor: zoom-in;
}
.food-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.food-card:hover .cover img { transform: scale(1.04); }
.food-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.food-card .row1 { display: flex; align-items: baseline; gap: 10px; }
.food-card .row1 h3 { margin: 0; font-size: 17px; line-height: 1.4; flex: 1; }
.stars { color: var(--sun); font-size: 13px; letter-spacing: 2px; white-space: nowrap; }
.stars .off { color: var(--line-2); }
.food-card .meta { color: var(--ink-3); font-size: 12.5px; }
.food-card .note {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}
.food-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.food-card .tags .tag { font-size: 11px; padding: 2px 10px; }
.food-card .foot {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px dashed var(--line-2);
  padding-top: 10px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.badge-want {
  margin-left: auto;
  background: var(--sage-soft);
  color: #4F7154;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 10px;
}

/* ===========================================================
   旅行 · 我们的足迹
   =========================================================== */
.wish-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 6px;
}
.wish-strip .tag { font-size: 12.5px; padding: 5px 16px; cursor: default; }

.trip-year {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--ink);
  margin: 44px 0 6px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.trip-year::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.trip-year:first-of-type { margin-top: 18px; }

.trip-card {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  margin: 18px 0;
  transition: transform .25s, box-shadow .25s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.trip-card .cover {
  flex: 0 0 300px;
  min-height: 190px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 38px;
  cursor: zoom-in;
  overflow: hidden;
}
.trip-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.trip-card:hover .cover img { transform: scale(1.04); }
.trip-card .body { padding: 18px 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.trip-card .row1 { display: flex; align-items: baseline; gap: 12px; }
.trip-card .row1 h3 { margin: 0; font-size: 20px; font-family: var(--font-title); }
.trip-card .meta { color: var(--ink-3); font-size: 13px; }
.trip-card .summary { margin: 0; color: var(--ink); font-size: 14px; }
.trip-card .note {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.trip-card .more-note {
  align-self: flex-start;
  border: 0;
  background: none;
  color: var(--sun-deep);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.trip-card.wish .cover::after { content: "想去"; }
.trip-card.wish { border-style: dashed; }

@media (max-width: 700px) {
  .trip-card { flex-direction: column; }
  .trip-card .cover { flex: none; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
}

/* 首页旅行/美食速览 */
.home-trip-list { display: flex; flex-direction: column; gap: 14px; }
.home-food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
