:root {
  --bg: #f8f5ed;
  --bg-2: #ede5d3;
  --ink: #1f1a12;
  --ink-soft: #6b5d47;
  --accent: #6b8e4e;
  --accent-deep: #3d5829;
  --warm: #c25e2c;
  --gold: #b8954e;
  --shadow-sm: 0 1px 2px rgba(31, 26, 18, 0.08);
  --shadow: 0 4px 16px rgba(31, 26, 18, 0.12);
  --shadow-lg: 0 12px 40px rgba(31, 26, 18, 0.18);
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: "LXGW WenKai Screen", "Source Han Serif SC", "PingFang SC", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* === 密码门 === */
.lock {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(107, 142, 78, 0.4), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(184, 149, 78, 0.35), transparent 55%),
    linear-gradient(135deg, #1a2418 0%, #2d3a26 50%, #3d4f33 100%);
  z-index: 100;
}
.lock-card {
  background: var(--bg);
  padding: 2.5rem 2.25rem;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  text-align: center;
  max-width: 340px;
  width: 90vw;
}
.lock-logo { font-size: 2.5rem; margin-bottom: 0.25rem; }
.lock-card h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.05em; }
.lock-sub { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 1.5rem; }
#lock-form { display: flex; gap: 0.4rem; }
#lock-input {
  flex: 1; padding: 0.65rem 0.9rem;
  border: 1px solid var(--bg-2);
  border-radius: 4px;
  font-family: inherit; font-size: 0.95rem;
  background: white;
}
#lock-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
#lock-form button {
  padding: 0.65rem 1.1rem;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 4px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
#lock-form button:hover { background: var(--accent-deep); }
.lock-error { color: var(--warm); font-size: 0.82rem; margin-top: 0.6rem; }

/* === 主页头部 === */
.hero {
  height: 75vh; min-height: 480px; max-height: 720px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #1a1410;
  color: #f5e8d4;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg .hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
  animation: kenburns 16s ease-in-out infinite alternate;
}
.hero-bg .hero-slide.active { opacity: 1; }
@keyframes kenburns {
  0%   { transform: scale(1.04) translate(0%, 0%); }
  100% { transform: scale(1.16) translate(-1.5%, -1%); }
}
.hero-vignette {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(15, 12, 8, 0.55) 90%),
    linear-gradient(to bottom, rgba(15, 12, 8, 0.25), rgba(15, 12, 8, 0.6));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 800px; margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}
.hero h1 {
  font-size: 3rem; font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.hero-welcome {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 232, 212, 0.75);
  font-family: "Georgia", serif;
  margin-bottom: 0.8rem;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(245, 232, 212, 0.3);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.15);
}
.hero-sub {
  font-size: 0.78rem; opacity: 0.55;
  font-weight: 400; letter-spacing: 0.35em;
  font-family: "Georgia", serif;
  margin-bottom: 1.5rem;
}
.hero-meta {
  color: rgba(245, 232, 212, 0.85);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.hero-meta strong {
  color: #f5e8d4;
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0.2rem;
  letter-spacing: 0.05em;
}
.hero-scroll {
  position: absolute; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 1.2rem; color: rgba(245, 232, 212, 0.5);
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 8px); opacity: 0.85; }
}
@media (max-width: 720px) {
  .hero { height: 60vh; min-height: 380px; }
  .hero h1 { font-size: 2rem; letter-spacing: 0.05em; }
  .hero-meta strong { font-size: 1.3rem; }
}

/* === 导航 === */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(248, 245, 237, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-2);
  padding: 0.6rem 0;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.nav-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  align-items: center;
}
.nav-label {
  font-size: 0.72rem; color: var(--ink-soft);
  letter-spacing: 0.1em;
  margin-right: 0.4rem;
  text-transform: uppercase;
  font-family: "Georgia", serif;
}
.tab {
  padding: 0.3rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab:hover { background: var(--bg-2); color: var(--ink); }
.tab.active {
  background: var(--ink);
  color: var(--bg);
}
.tab .count { opacity: 0.55; margin-left: 0.25rem; font-size: 0.78em; }

/* People row */
.people-box { padding-top: 0.2rem; }
.people-box summary {
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "Georgia", serif;
  list-style: none;
  user-select: none;
  display: inline-flex; align-items: center;
  gap: 0.4rem;
}
.people-box summary::-webkit-details-marker { display: none; }
.people-box summary::after { content: "▾"; transition: transform 0.2s; }
.people-box[open] summary::after { transform: rotate(180deg); }
.people-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.5rem 0 0.2rem;
}
.person-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--bg-2);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-avatar:hover { transform: scale(1.1); border-color: var(--accent); }
.person-avatar.active {
  border-color: var(--warm);
  box-shadow: 0 0 0 2px rgba(194, 94, 44, 0.25);
}
.person-avatar .pcount {
  position: absolute; bottom: -2px; right: -2px;
  background: var(--ink); color: var(--bg);
  font-size: 0.6rem; padding: 0 0.3rem; border-radius: 999px;
  border: 2px solid var(--bg);
  line-height: 1.4;
}

/* === 瀑布流 === */
.grid {
  max-width: 1400px; margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
  column-count: 4;
  column-gap: 0.6rem;
}
@media (max-width: 1100px) { .grid { column-count: 3; } }
@media (max-width: 720px)  { .grid { column-count: 2; column-gap: 0.4rem; padding: 1rem 0.6rem 3rem; } }
@media (max-width: 480px)  { .grid { column-count: 2; column-gap: 0.3rem; padding: 0.6rem 0.4rem 2rem; } }

.card {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 0.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (max-width: 720px) { .card { margin-bottom: 0.4rem; } }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-img {
  width: 100%; height: auto; display: block;
  transition: transform 0.6s ease;
}
.card:hover .card-img { transform: scale(1.03); }

.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 16, 10, 0.85) 0%, rgba(20, 16, 10, 0) 45%, rgba(20, 16, 10, 0) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex; align-items: flex-end;
  padding: 0.9rem 0.85rem;
  pointer-events: none;
}
.card:hover .card-overlay { opacity: 1; }
.card-overlay-inner {
  color: white;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.card-overlay-scene {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-family: "Georgia", serif;
}
.card-overlay-desc {
  font-size: 0.85rem; line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* 角标 */
.card-scene-chip {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: rgba(20, 16, 10, 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem; letter-spacing: 0.05em;
  z-index: 1;
  opacity: 0; transition: opacity 0.25s ease;
}
.card:hover .card-scene-chip { opacity: 1; }

.card-faces {
  position: absolute; bottom: 0.45rem; right: 0.45rem;
  display: flex; gap: -2px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover .card-faces { opacity: 1; }
.card-face-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid white;
  overflow: hidden;
  margin-left: -3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.card-face-dot img { width: 100%; height: 100%; object-fit: cover; }

/* 触屏（无 hover）始终显示场景标签 */
@media (hover: none) {
  .card-scene-chip { opacity: 0.85; }
  .card-faces { opacity: 0.85; }
}

/* === Lightbox === */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, 0.97);
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 340px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox[hidden] { display: none; }

.lb-stage {
  display: grid; place-items: center;
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}
#lb-img {
  max-width: 100%; max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  border-radius: 2px;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  display: grid; place-items: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.18);
  transform: scale(1.05);
}
.lb-close { top: 1rem; right: 360px; z-index: 2; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 360px; top: 50%; transform: translateY(-50%); }
.lb-close:hover { transform: scale(1.05); }
.lb-prev:hover { transform: translateY(-50%) scale(1.05); }
.lb-next:hover { transform: translateY(-50%) scale(1.05); }

.lb-meta {
  background: var(--bg);
  padding: 2.5rem 2rem 2rem;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid var(--bg-2);
}
.lb-scene-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent-deep);
  text-transform: uppercase;
  font-family: "Georgia", serif;
}
.lb-desc {
  font-size: 1.05rem; line-height: 1.7;
  color: var(--ink);
  font-weight: 500;
}
.lb-highlight {
  font-size: 0.92rem; font-style: italic;
  color: var(--warm);
  padding-left: 0.85rem;
  border-left: 2px solid var(--warm);
  margin-left: -0.1rem;
}
.lb-highlight:empty { display: none; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lb-tag {
  background: var(--bg-2); color: var(--ink-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
}
.lb-people-row {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding: 0.4rem 0;
}
.lb-people-row .person-avatar { width: 36px; height: 36px; }

.lb-info {
  margin-top: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--bg-2);
  padding-top: 1rem;
}
.lb-counter {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-family: "Georgia", serif;
  letter-spacing: 0.1em;
}

/* 移动端 lightbox */
@media (max-width: 768px) {
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-close { right: 1rem; }
  .lb-next { right: 1rem; }
  .lb-meta { padding: 1.25rem; max-height: 38vh; }
  .lb-counter { bottom: auto; top: 1rem; left: 1rem; transform: none; }
}

.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

/* === 留言本 === */
.guestbook {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  padding: 4rem 1.5rem 5rem;
  border-top: 1px solid var(--bg-2);
}
.gb-inner { max-width: 680px; margin: 0 auto; }
.gb-title {
  font-size: 1.6rem; font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.gb-title .gb-sub {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  font-family: "Georgia", serif;
  margin-left: 0.5rem;
  font-weight: 400;
}
.gb-hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.gb-form {
  display: flex; flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  position: relative;
}
.gb-form .gb-name {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--bg-2);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--bg);
}
.gb-form .gb-content {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--bg-2);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--bg);
  resize: vertical;
  line-height: 1.6;
}
.gb-form input:focus, .gb-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.gb-form button {
  align-self: flex-end;
  padding: 0.5rem 1.4rem;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 4px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.gb-form button:hover { background: var(--accent-deep); }
.gb-form button:disabled { opacity: 0.5; cursor: not-allowed; }

.gb-list {
  display: flex; flex-direction: column;
  gap: 0.85rem;
}
.gb-item {
  background: var(--bg);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  border-left: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.gb-item-header {
  display: flex; justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.gb-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.gb-item-time {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  font-family: "Georgia", serif;
}
.gb-item-content {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.gb-empty {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 0;
  font-style: italic;
}

/* lightbox 内的评论区 */
.lb-comments {
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bg-2);
}
.lb-comments-title {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  text-transform: uppercase;
  font-family: "Georgia", serif;
  margin-bottom: 0.65rem;
  font-weight: 600;
}
.lb-form {
  margin-bottom: 1rem;
}
.lb-form .gb-name { font-size: 0.85rem; padding: 0.45rem 0.7rem; }
.lb-form .gb-content { font-size: 0.85rem; padding: 0.5rem 0.7rem; }
.lb-form button { padding: 0.4rem 1rem; font-size: 0.82rem; }
.lb-gb-list .gb-item {
  padding: 0.6rem 0.75rem;
  background: var(--bg-2);
  box-shadow: none;
}
.lb-gb-list .gb-item-name { font-size: 0.82rem; }
.lb-gb-list .gb-item-content { font-size: 0.82rem; }

/* === 语言切换 / Style 切换 === */
.nav-lang-row { margin-top: 0.1rem; }
.lang-tab { font-family: "Georgia", serif; letter-spacing: 0.06em; }

/* === 每日抽卡 === */
.daily {
  position: fixed;
  top: 5rem; right: 1.25rem;
  width: 280px;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(184, 149, 78, 0.4);
  padding: 0.85rem 0.85rem 1rem;
  z-index: 25;
  cursor: pointer;
  animation: dailyIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}
@keyframes dailyIn {
  from { transform: scale(0.85) rotate(2deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.daily.fading { animation: dailyOut 0.5s ease forwards; }
@keyframes dailyOut {
  to { transform: scale(0.92) translateX(20px); opacity: 0; }
}
.daily-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-family: "Georgia", serif;
  margin-bottom: 0.5rem;
}
.daily img {
  width: 100%; height: 180px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.5rem;
}
.daily-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.daily-tip {
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-style: italic;
}
.daily-close {
  position: absolute;
  top: 0.4rem; right: 0.4rem;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white; border: 0;
  font-size: 0.7rem;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.2s;
  z-index: 1;
}
.daily:hover .daily-close { opacity: 1; }
@media (max-width: 480px) { .daily { width: calc(100vw - 1.5rem); right: 0.75rem; top: 4rem; } }

/* === 纪念日彩蛋 === */
.anniversary-fx {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.anniversary-fx .confetti {
  position: absolute;
  width: 8px; height: 14px;
  top: -20px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
.hero.anniversary h1::after {
  content: " 🎉";
  display: inline-block;
  animation: party 1s ease-in-out infinite;
}
@keyframes party {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

/* === 气氛联动视觉层 === */
.fx-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}

/* 森林：飘落叶子 */
body.fx-forest .fx-layer::before,
body.fx-forest .fx-layer::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 6px 10px at 20% 0%, rgba(107, 142, 78, 0.7) 30%, transparent 70%),
    radial-gradient(ellipse 5px 8px at 60% 0%, rgba(184, 149, 78, 0.65) 30%, transparent 70%),
    radial-gradient(ellipse 7px 11px at 85% 0%, rgba(140, 100, 40, 0.55) 30%, transparent 70%);
  background-size: 600px 800px;
  background-repeat: repeat;
  animation: leafFall 12s linear infinite;
}
body.fx-forest .fx-layer::after {
  background-position: 300px 0;
  animation-duration: 18s;
  animation-delay: -6s;
  opacity: 0.7;
}
@keyframes leafFall {
  0% { transform: translateY(-100vh) rotate(0); }
  100% { transform: translateY(100vh) rotate(80deg); }
}

/* 雨：稀疏柔和的斜向雨丝 + 整体微凉色调 */
body.fx-rain .fx-layer::before {
  content: "";
  position: absolute;
  top: -200px; left: -200px; right: -200px; bottom: -200px;
  background-image:
    repeating-linear-gradient(
      102deg,
      transparent 0px,
      transparent 30px,
      rgba(190, 210, 230, 0.12) 30px,
      rgba(190, 210, 230, 0.12) 31px
    );
  animation: rainSlide 0.85s linear infinite;
  opacity: 0.7;
}
body.fx-rain .fx-layer::after {
  content: "";
  position: absolute;
  top: -200px; left: -200px; right: -200px; bottom: -200px;
  background-image:
    repeating-linear-gradient(
      105deg,
      transparent 0px,
      transparent 70px,
      rgba(200, 220, 240, 0.16) 70px,
      rgba(200, 220, 240, 0.16) 72px
    );
  animation: rainSlide2 1.4s linear infinite;
  opacity: 0.55;
}
body.fx-rain { background: linear-gradient(180deg, #f4f1ea 0%, #ebe8df 100%); }
@keyframes rainSlide {
  from { transform: translate(0, 0); }
  to   { transform: translate(-31px, 144px); }
}
@keyframes rainSlide2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-72px, 270px); }
}

/* 篝火：边缘橙光脉动 */
body.fx-fire {
  position: relative;
}
body.fx-fire::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 24;
  box-shadow: inset 0 0 200px 60px rgba(212, 121, 77, 0.35);
  animation: firePulse 3s ease-in-out infinite;
}
@keyframes firePulse {
  0%, 100% { box-shadow: inset 0 0 180px 50px rgba(212, 121, 77, 0.3); }
  50%      { box-shadow: inset 0 0 240px 80px rgba(212, 121, 77, 0.5); }
}

/* 风：图片轻微摇晃 */
body.fx-wind .card { animation: windSway 4s ease-in-out infinite; }
body.fx-wind .card:nth-child(2n) { animation-duration: 5s; animation-delay: -1s; }
body.fx-wind .card:nth-child(3n) { animation-duration: 6s; animation-delay: -2s; }
@keyframes windSway {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-2px) rotate(-0.4deg); }
  75% { transform: translateY(-1px) rotate(0.4deg); }
}

/* === Lightbox 便签留言 === */
.lb-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%; max-height: 92vh;
}
.lb-pins {
  position: absolute; inset: 0;
  pointer-events: none;
}
.lb-pin {
  position: absolute;
  background: rgba(255, 248, 220, 0.96);
  color: #1f1a12;
  padding: 0.45rem 0.65rem;
  border-radius: 3px;
  font-size: 0.78rem;
  line-height: 1.4;
  max-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%) rotate(-2deg);
  pointer-events: auto;
  cursor: default;
  font-family: inherit;
  border: 1px solid rgba(184, 149, 78, 0.4);
  animation: pinDrop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lb-pin:nth-child(2n) { transform: translate(-50%, -50%) rotate(2deg); }
.lb-pin:nth-child(3n) { transform: translate(-50%, -50%) rotate(-1deg); background: rgba(245, 230, 200, 0.96); }
@keyframes pinDrop {
  from { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 0; }
}
.lb-pin-name {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--warm);
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.lb-pin-hint {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  background: rgba(194, 94, 44, 0.95);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  pointer-events: none;
  animation: pulse2 1.5s ease-in-out infinite;
  z-index: 5;
  white-space: nowrap;
}
@keyframes pulse2 {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}
.lb-img-wrap.pin-mode { cursor: crosshair; }
.lb-img-wrap.pin-mode #lb-img { box-shadow: 0 0 0 3px var(--warm); }

.lb-form-row {
  display: flex; gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}
.lb-pin-btn {
  background: transparent;
  color: var(--warm);
  border: 1px solid var(--warm);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.lb-pin-btn:hover { background: var(--warm); color: white; }
.lb-pin-btn.active { background: var(--warm); color: white; }

/* === 管理员模式 === */
.admin-badge {
  position: fixed;
  top: 1rem; right: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  z-index: 40;
  display: flex; align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid var(--gold);
}
.admin-badge::before {
  content: "🛡";
  font-size: 0.85rem;
}
.admin-badge button {
  background: rgba(255,255,255,0.15);
  color: var(--bg);
  border: 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.admin-badge button:hover { background: rgba(255,255,255,0.3); }

.gb-delete {
  background: transparent;
  color: var(--warm);
  border: 1px solid transparent;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  margin-left: 0.5rem;
  opacity: 0.7;
  transition: all 0.15s;
}
.gb-delete:hover { opacity: 1; border-color: var(--warm); }
.gb-item-header { gap: 0.5rem; }

/* 管理员模式下，pin 便签鼠标悬停显示删除按钮 */
.lb-pin .pin-delete {
  position: absolute;
  top: -8px; right: -8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--warm);
  color: white;
  border: 0;
  font-size: 0.6rem;
  display: none;
  cursor: pointer;
}
body.admin-mode .lb-pin:hover .pin-delete { display: grid; place-items: center; }

/* ========================================== */
/* === 移动端整体适配 (≤720px / ≤480px)    === */
/* ========================================== */
@media (max-width: 720px) {
  /* nav 横向滚动而非换行 */
  .nav-inner { padding: 0 0.75rem; }
  .nav-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 0.3rem;
    padding-bottom: 0.15rem;
  }
  .nav-row::-webkit-scrollbar { display: none; }
  .tab { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
  .nav-label { font-size: 0.65rem; }

  /* hero 字号收一档，避免溢出 */
  .hero-welcome { font-size: 0.7rem; padding: 0.25rem 0.7rem; }
  .hero-meta { font-size: 0.85rem; padding: 0 0.5rem; }
  .hero-meta strong { font-size: 1.2rem; }

  /* 浮元素位置错开，不互相挡 */
  .ambient { bottom: 0.85rem; left: 0.85rem; }
  .ambient-toggle { width: 40px; height: 40px; font-size: 1rem; }
  .ambient-panel { width: 180px; padding: 0.7rem; }

  .flashback {
    bottom: 0.75rem; right: 0.75rem;
    width: 220px;
  }
  .flashback img { height: 130px; }

  /* daily 在小屏避开 admin-badge */
  .daily { top: 4.2rem; right: 0.75rem; width: 220px; }
  .daily img { height: 140px; }
  .daily-tip { font-size: 0.65rem; }

  /* 留言本 */
  .guestbook { padding: 2.5rem 1rem 3.5rem; }
  .gb-title { font-size: 1.3rem; }

  /* 卡片间距更紧 */
  .grid { padding: 0.85rem 0.45rem 3rem; }
}

@media (max-width: 720px) {
  /* 移动端简洁：隐藏所有浮动卡片和视觉特效 */
  .flashback, .daily { display: none !important; }
  /* 气氛视觉特效在窄屏全部关掉，只保留声音 */
  body.fx-forest .fx-layer::before,
  body.fx-forest .fx-layer::after,
  body.fx-rain .fx-layer::before,
  body.fx-rain .fx-layer::after { display: none; }
  body.fx-fire::before { box-shadow: none; animation: none; }
  body.fx-wind .card { animation: none; }
  body.fx-rain { background: var(--bg); }
  /* hero 装饰简化 */
  .hero::before { display: none; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {

  /* lightbox 改竖布局：图占满，meta 滑入下方 */
  .lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: 60vh 1fr;
  }
  .lb-stage { padding: 1rem 1rem 0; }
  #lb-img { max-height: 56vh; }
  .lb-close { right: 0.75rem; top: 0.75rem; width: 36px; height: 36px; }
  .lb-prev { left: 0.5rem; width: 36px; height: 36px; }
  .lb-next { right: 0.5rem; width: 36px; height: 36px; }
  .lb-counter { bottom: 0.4rem; font-size: 0.7rem; }
  .lb-meta {
    padding: 1.25rem 1rem 1.5rem;
    border-left: 0;
    border-top: 1px solid var(--bg-2);
    max-height: none;
  }

  /* 留言表单更紧凑 */
  .gb-form .gb-name, .gb-form .gb-content { font-size: 0.85rem; padding: 0.5rem 0.75rem; }
  .gb-form button { font-size: 0.85rem; padding: 0.45rem 1rem; }
  .lb-form-row { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .lb-pin-btn { width: 100%; }

  /* admin badge 不要太挤压 */
  .admin-badge { top: 0.5rem; right: 0.5rem; font-size: 0.7rem; padding: 0.3rem 0.6rem; }

  /* hero 字号 */
  .hero h1 { font-size: 1.7rem; letter-spacing: 0.04em; }
  .hero { height: 55vh; min-height: 340px; }

  /* 雨效在窄屏减半，避免太喧 */
  body.fx-rain .fx-layer::before { opacity: 0.5; }
  body.fx-rain .fx-layer::after { opacity: 0.4; }
  /* 风效在窄屏关掉摇晃，避免眩晕 */
  body.fx-wind .card { animation: none; }
}

/* 横屏手机 */
@media (max-width: 900px) and (max-height: 500px) {
  .hero { height: 90vh; min-height: 280px; }
}


.empty {
  column-span: all;
  text-align: center; padding: 4rem 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* === 回忆闪回小卡片 === */
.flashback {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  width: 280px;
  background: var(--bg);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  cursor: pointer;
  z-index: 30;
  animation: flashIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255,255,255,0.5);
}
@keyframes flashIn {
  from { transform: translateY(20px) scale(0.92); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.flashback.fading {
  animation: flashOut 0.6s ease forwards;
}
@keyframes flashOut {
  to { transform: translateY(20px) scale(0.92); opacity: 0; }
}
.flashback img {
  width: 100%; height: 160px;
  object-fit: cover;
  display: block;
}
.flashback-meta {
  padding: 0.7rem 0.9rem 0.85rem;
}
.flashback-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  font-family: "Georgia", serif;
  display: block;
  margin-bottom: 0.3rem;
}
.flashback-desc {
  font-size: 0.85rem; line-height: 1.5;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.flashback-close {
  position: absolute;
  top: 0.4rem; right: 0.4rem;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: white;
  border: 0;
  font-size: 0.75rem;
  display: grid; place-items: center;
  z-index: 1;
  opacity: 0; transition: opacity 0.2s;
}
.flashback:hover .flashback-close { opacity: 1; }
@media (max-width: 480px) {
  .flashback { width: calc(100vw - 1.5rem); right: 0.75rem; bottom: 0.75rem; }
}

/* === 气氛混音 === */
.ambient {
  position: fixed;
  bottom: 1.25rem; left: 1.25rem;
  z-index: 30;
}
.ambient-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--bg-2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-size: 1.2rem;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.ambient-toggle:hover { transform: scale(1.08); color: var(--warm); }
.ambient-toggle.playing {
  background: var(--warm);
  color: white;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(194, 94, 44, 0.4); }
  50% { box-shadow: 0 4px 16px rgba(194, 94, 44, 0.7), 0 0 0 4px rgba(194, 94, 44, 0.15); }
}
.ambient-panel {
  position: absolute;
  bottom: calc(100% + 0.5rem); left: 0;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  padding: 0.85rem;
  width: 200px;
  border: 1px solid var(--bg-2);
}
.ambient-title {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: "Georgia", serif;
  margin-bottom: 0.6rem;
  text-align: center;
}
.ambient-presets {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-bottom: 0.7rem;
}
.ambient-presets button {
  padding: 0.45rem 0.4rem;
  font-size: 0.78rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--bg-2);
  border-radius: 4px;
  transition: all 0.15s;
}
.ambient-presets button:hover { border-color: var(--accent); }
.ambient-presets button.active {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
#ambient-volume {
  width: 100%;
  accent-color: var(--warm);
}
