/* ============ 我们的故事 · 前台样式 ============ */
:root {
  --bg: #fff9f5;
  --bg2: #fdf1ea;
  --ink: #46352f;
  --ink2: #8b7368;
  --rose: #c46e62;
  --rose-d: #a5534a;
  --line: #efdfd6;
  --card: #ffffff;
  --gold: #b9944a;
  --shadow: 0 12px 34px rgba(150, 100, 80, .10);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
/* 横向溢出剪裁放在 html 上：body 一旦成为滚动容器，iOS Safari 里的
   position:fixed 会退化成跟着页面滚（弹幕就会随屏幕滑动一起动）。 */
html { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.serif {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 50% 5%, #ffe8df 0%, rgba(255, 232, 223, 0) 68%),
    linear-gradient(170deg, #fdf2ec 0%, #fbf6f1 50%, #fff9f5 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #f2e3db;
  border-radius: 24px;
  padding: 42px 30px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.login-card .heart {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  color: var(--rose);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.login-card h1 {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .08em;
  margin: 0 0 8px;
}

.login-card .hint {
  font-size: 13px;
  color: var(--ink2);
  margin: 0 0 26px;
  line-height: 1.9;
}

.login-card input[type=password] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  letter-spacing: .18em;
  text-align: center;
  border: 1px solid #eadbd2;
  border-radius: 14px;
  background: #fffdfb;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.login-card input[type=password]:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(196, 110, 98, .10);
}

.login-card button {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 15px;
  letter-spacing: .12em;
  color: #fff;
  background: linear-gradient(135deg, #cf7d70, #b06056);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .25s;
  box-shadow: 0 8px 20px rgba(176, 96, 86, .26);
}

.login-card button:hover { transform: translateY(-1px); }
.login-card button:active { transform: translateY(1px); }

.login-err {
  margin: 14px 0 0;
  font-size: 13px;
  color: #b2453c;
}

.login-foot {
  margin: 22px 0 0;
  font-size: 12px;
  color: #bda9a0;
  letter-spacing: .06em;
}

/* ---------- 飘落的花瓣 ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.petal {
  position: absolute;
  top: -8vh;
  width: 10px; height: 10px;
  background: radial-gradient(circle at 30% 30%, #f7c4bb, #e09a8e);
  border-radius: 60% 40% 55% 45%;
  opacity: .55;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .5; }
  100% { transform: translate3d(60px, 110vh, 0) rotate(420deg); opacity: 0; }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 22px 100px;
  text-align: center;
  background:
    radial-gradient(1100px 560px at 50% 2%, #ffe7de 0%, rgba(255, 231, 222, 0) 70%),
    linear-gradient(168deg, #fdf2ec 0%, #fbf6f1 46%, #fff9f5 100%);
}

.hero-inner { max-width: 760px; animation: fadeUp .9s cubic-bezier(.2, .7, .3, 1) both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold);
}

.names {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(32px, 6.4vw, 62px);
  font-weight: 500;
  letter-spacing: .05em;
  line-height: 1.35;
  margin: 14px 0 0;
}

.names .amp {
  display: inline-block;
  margin: 0 .12em;
  font-size: .5em;
  color: var(--rose);
  vertical-align: middle;
  transform: translateY(-.12em);
}

.since {
  margin: 12px 0 0;
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--ink2);
}

/* 计时器 · 数字向下滑动 */
.clock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 22px;
  margin: 34px 0 0;
  flex-wrap: wrap;
}

.fc-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.fc-digits { display: flex; gap: 6px; }

.fc-label {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink2);
}

.fc {
  position: relative;
  width: 52px;
  height: 62px;
  overflow: hidden;
  border-radius: 12px;
  background: #fffdfb;
  box-shadow: 0 5px 12px rgba(160, 110, 90, .10),
              inset 0 0 0 1px rgba(185, 142, 122, .14);
}

.fc .roll {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--rose-d);
  font-variant-numeric: tabular-nums;
  will-change: transform;
}

/* 行盒里的数字天然偏上，往下推一点视觉才正中 */
.fc .roll span { display: block; transform: translateY(2px); }

.fc .roll.next { transform: translateY(-100%); }

.fc .roll.cur.out { animation: rollOut .24s cubic-bezier(.4, 0, .2, 1) both; }
.fc .roll.next.in { animation: rollIn .24s cubic-bezier(.4, 0, .2, 1) both; }

@keyframes rollOut {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

@keyframes rollIn {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.intro {
  max-width: 560px;
  margin: 30px auto 0;
  font-size: 15px;
  color: #7a6459;
  line-height: 2;
}

.down {
  display: inline-block;
  margin-top: 42px;
  width: 36px; height: 36px;
  line-height: 34px;
  color: var(--rose);
  border: 1px solid #e8d5cc;
  border-radius: 50%;
  text-decoration: none;
  font-size: 13px;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: .7; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ---------- 区块通用 ---------- */
.sec {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 76px 22px;
}

.sec-title {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: .1em;
  text-align: center;
  margin: 0 0 8px;
}

.sec-sub {
  text-align: center;
  font-size: 11px;
  letter-spacing: .34em;
  color: #c0aa9f;
  text-transform: uppercase;
  margin: 0 0 42px;
}

.empty {
  text-align: center;
  color: #c3afa5;
  font-size: 14px;
  padding: 40px 0;
}

/* ---------- 照片墙 ---------- */
.masonry { column-count: 3; column-gap: 14px; }

.ph {
  margin: 0 0 14px;
  break-inside: avoid;
  border-radius: 16px;
  overflow: hidden;
  background: #f6ede8;
  cursor: zoom-in;
  position: relative;
  transition: transform .35s cubic-bezier(.2, .8, .3, 1), box-shadow .35s;
}

.ph img { display: block; width: 100%; height: auto; }

.ph:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(150, 100, 80, .16);
}

.ph figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 12px 10px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(70, 45, 38, .62), rgba(70, 45, 38, 0));
  opacity: 0;
  transition: opacity .3s;
}

.ph:hover figcaption { opacity: 1; }

/* ---------- 时间轴 ---------- */
.tl { position: relative; padding-left: 30px; }

.tl::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(196, 110, 98, 0), #e5cabe 12%, #e5cabe 88%, rgba(196, 110, 98, 0));
}

.tl-item { position: relative; padding: 0 0 40px 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 9px;
  width: 9px; height: 9px;
  background: #fff;
  border: 2px solid var(--rose);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(196, 110, 98, .10);
}

.tl-date {
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--rose);
}

.tl-item h3 {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  margin: 5px 0 6px;
}

.tl-item p { margin: 0; font-size: 14.5px; color: #6f5a50; white-space: pre-wrap; }

.tl-item img {
  margin-top: 12px;
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  display: block;
}

/* ---------- 悄悄话 ---------- */
.whisper-box {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .8);
  border: 1px solid #f1e2da;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(160, 110, 90, .07);
}

.whisper-box textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid #ecdbd2;
  border-radius: 14px;
  background: #fffdfc;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.8;
  resize: vertical;
  outline: none;
}

.whisper-box textarea:focus { border-color: var(--rose); }

.wrow { display: flex; gap: 10px; margin-top: 10px; align-items: center; }

.wrow input {
  flex: 1;
  max-width: 150px;
  padding: 10px 12px;
  border: 1px solid #ecdbd2;
  border-radius: 12px;
  background: #fffdfc;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--ink);
}

.wrow button {
  margin-left: auto;
  padding: 10px 26px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #cf7d70, #b06056);
  color: #fff;
  font-size: 14px;
  letter-spacing: .1em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(176, 96, 86, .22);
}

.wlist { max-width: 720px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 14px; }

.wcard {
  background: #fff;
  border: 1px solid #f1e4dc;
  border-radius: 16px 16px 16px 4px;
  padding: 16px 18px;
  box-shadow: 0 6px 16px rgba(160, 110, 90, .05);
  max-width: 88%;
  align-self: flex-start;
  animation: fadeUp .5s both;
}

.wcard.me {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, #fdf0ea, #fbebe4);
  border-color: #f2ddd2;
}

.wcard p { margin: 0 0 8px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }

.wmeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #b7a299;
  letter-spacing: .06em;
}

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  padding: 50px 22px 70px;
  font-size: 12px;
  color: #c1aea4;
  letter-spacing: .16em;
  border-top: 1px solid rgba(230, 210, 200, .6);
}

.foot .dot { margin: 0 .6em; opacity: .5; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(38, 26, 22, .90);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.lightbox.on { display: flex; animation: fadeIn .25s both; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lb-close {
  position: fixed;
  top: 20px; right: 26px;
  color: #fff;
  font-size: 26px;
  opacity: .8;
  line-height: 1;
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .masonry { column-count: 2; column-gap: 10px; }
  .ph { margin-bottom: 10px; border-radius: 12px; }
  .sec { padding: 56px 18px; }
  .clock { gap: 16px; margin-top: 28px; }
  .fc { width: 40px; height: 50px; }
  .fc .roll { font-size: 26px; }
  .fc-digits { gap: 4px; }
  .names { font-size: 30px; }
  .tl { padding-left: 26px; }
  .wcard { max-width: 100%; }
}

@media (max-width: 520px) {
  .clock { gap: 16px; }
  .fc-unit { gap: 7px; }
  .fc { width: 34px; height: 44px; }
  .fc .roll { font-size: 22px; }
  .fc-digits { gap: 3px; }
  .fc-label { font-size: 10px; }
}

@media (max-width: 420px) {
  .masonry { column-count: 1; }
  .clock { gap: clamp(14px, 4.8vw, 20px); }
  .fc-unit { gap: 7px; }
  .fc {
    width: clamp(24px, 7.4vw, 29px);
    height: auto;
    aspect-ratio: 26 / 36;
    border-radius: 9px;
  }
  .fc .roll { font-size: clamp(16px, 5vw, 20px); }
  .fc .roll span { transform: translateY(1px); }
  .fc-digits { gap: 3px; }
  .fc-label { font-size: 10px; letter-spacing: .16em; }
}

/* 滚动淡入 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================
   2026-11-23 质感优化层
   参考：纸感相纸 / 流光描边 / 液态按钮 / 像素昼夜开关
   ============================================ */

/* ---------- 1. 夜间主题 ---------- */
body.dark {
  --bg: #171319;
  --bg2: #1c1720;
  --ink: #eee6e8;
  --ink2: #a99aa2;
  --rose: #e5928a;
  --rose-d: #f0a79e;
  --line: #2b2530;
  --card: #211b26;
  --gold: #c8a86a;
  --shadow: 0 14px 40px rgba(0, 0, 0, .45);
  background: var(--bg);
  color: var(--ink);
}

body.dark .hero,
body.dark .login-wrap {
  background:
    radial-gradient(1100px 560px at 50% 2%, #2b2130 0%, rgba(43, 33, 48, 0) 70%),
    linear-gradient(168deg, #17131a 0%, #1a1620 46%, #171319 100%);
}

body.dark .since,
body.dark .intro { color: #b6a8ad; }
body.dark .sec-sub,
body.dark .empty { color: #8d7f88; }
body.dark .foot { color: #7d7178; border-top-color: rgba(255, 255, 255, .06); }

body.dark .whisper-box,
body.dark .login-card {
  background: rgba(33, 27, 38, .86);
  border-color: #332c3a;
}

body.dark .whisper-box textarea,
body.dark .wrow input,
body.dark .login-card input[type=password] {
  background: #241e2a;
  border-color: #3a3242;
  color: #eee6e8;
}

body.dark .wcard {
  background: #241e2a;
  border-color: #3a3242;
  color: #e8dfe2;
}
body.dark .wcard.me {
  background: linear-gradient(135deg, #2c2431, #332a36);
  border-color: #3f3547;
}
body.dark .wmeta { color: #8b7d86; }

body.dark .tl-item p { color: #b8abb0; }
body.dark .tl-date { color: #e5928a; }
body.dark .tl::before {
  background: linear-gradient(to bottom, rgba(229, 146, 138, 0), #4a3f52 12%, #4a3f52 88%, rgba(229, 146, 138, 0));
}
body.dark .tl-item::before { background: #1c1720; border-color: #e5928a; }

body.dark .fc {
  background: #241e2a;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
body.dark .fc .roll { color: #f2b3aa; }
body.dark .down { border-color: #3a3242; }
body.dark .login-card .hint,
body.dark .login-foot { color: #a1939b; }

/* ---------- 2. 像素日/夜开关（Pixel Day–Night Toggle） ---------- */
.pixel-toggle {
  --px-scale: .27;
  --track-top: rgba(222,222,221,1);
  --track-bottom: rgba(235,235,234,1);
  --track-inset: rgba(189,189,186,1);
  --track-light: rgba(255,255,255,1);
  --track-edge: rgba(243,243,242,1);
  --track-shadow: rgba(157,155,150,1);
  --knob-top: rgba(255,255,255,.94);
  --knob-bottom: rgba(238,237,233,.88);
  --knob-rim: rgba(255,255,255,.62);
  --knob-shadow: rgba(124,123,119,.35);
  --focus: #5d3609;
  position: fixed;
  top: 16px; right: 16px;
  z-index: 60;
  width: calc(520px * var(--px-scale));
  height: calc(272px * var(--px-scale));
}

.pixel-stage {
  position: absolute;
  left: 50%; top: 50%;
  width: 520px; height: 272px;
  margin: -136px 0 0 -260px;
  transform: scale(var(--px-scale));
  transform-origin: 50% 50%;
}

.pixel-switch {
  position: relative;
  display: block;
  width: 520px; height: 272px;
  padding: 0;
  border: 0;
  border-radius: 86px;
  background: linear-gradient(180deg, var(--track-top), var(--track-bottom));
  box-shadow:
    inset 0 12px 24px var(--track-inset),
    inset 0 -2px 4px var(--track-light),
    0 1.5px 0 var(--track-edge),
    0 26px 46px -20px var(--track-shadow);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 10px;
}
.pixel-toggle.dragging .pixel-switch { cursor: grabbing; }
.pixel-switch:focus-visible { outline: 2px solid var(--focus); }
.pixel-switch > * { pointer-events: none; }

.pixel-knob {
  position: absolute;
  display: block;
  border-radius: 69px;
  background: linear-gradient(180deg, var(--knob-top), var(--knob-bottom));
  box-shadow:
    inset 0 0 0 1px var(--knob-rim),
    inset 0 0 5px rgba(255, 255, 255, .18),
    0 16px 22px -9px var(--knob-shadow),
    0 4px 9px var(--knob-shadow);
}

.pixel-effects {
  position: absolute;
  display: block;
  width: 800px; height: 552px;
  left: -140px; top: -140px;
}

@media (max-width: 760px) {
  .pixel-toggle { top: 12px; right: 12px; --px-scale: .205; }
}
@media (prefers-reduced-motion: reduce) {
  .pixel-switch { transition: none; }
}
/* ---------- 3. 登录卡：流光描边 ---------- */
.login-card {
  position: relative;
  border-radius: 24px;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(115deg, #ffd9c9, #e2a396, #c46e62, #f7ece5, #b3776d, #ffd9c9);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .58;
  animation: borderflow 13s ease-in-out infinite;
  pointer-events: none;
}
@keyframes borderflow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
body.dark .login-card::before { opacity: .34; }

.login-card input[type=password]:focus {
  box-shadow: 0 0 0 4px rgba(196, 110, 98, .14), 0 0 22px rgba(196, 110, 98, .18);
}

/* ---------- 4. 液态按钮 ---------- */
.btn-liquid {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-family: inherit;
  letter-spacing: .14em;
  background: linear-gradient(135deg, #cf7d70, #b06056);
  box-shadow: 0 10px 24px rgba(176, 96, 86, .26);
  transition: transform .22s cubic-bezier(.34, 1.5, .5, 1), box-shadow .3s;
  cursor: pointer;
}
.btn-liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, #ff9f8a, #c46e62 35%, #8f5f9e 62%, #5c8fb6 100%);
  opacity: 0;
  transition: opacity .35s;
}
.btn-liquid:hover::before { opacity: 1; }
.btn-liquid:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 14px 30px rgba(176, 96, 86, .32); }
.btn-liquid:active { transform: translateY(1px) scale(.992); }

.btn-liquid .shine {
  position: absolute;
  left: var(--lx, 50%); top: var(--ly, 50%);
  width: 70px; height: 70px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.btn-liquid:hover .shine { opacity: 1; }

/* ---------- 5. 照片墙：宝丽来相纸 ---------- */
.masonry { column-gap: 18px; }

.ph {
  position: relative;
  margin: 0 0 18px;
  padding: 9px 9px 34px;
  background: #fffdf9;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(140, 100, 80, .10), 0 10px 22px rgba(140, 100, 80, .13), inset 0 0 0 1px rgba(255, 255, 255, .85);
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.22, 1.2, .36, 1), box-shadow .4s;
  will-change: transform;
}
body.dark .ph {
  background: #f6f0e9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .38);
}

.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 3px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .35s;
}
.ph:hover::after { opacity: 1; }
.ph:hover { box-shadow: 0 2px 3px rgba(140, 100, 80, .12), 0 18px 34px rgba(140, 100, 80, .20); }

.ph img { border-radius: 1px; }

.ph figcaption {
  position: absolute;
  left: 9px; right: 9px; bottom: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: #a08a7e;
  background: none;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .ph figcaption { color: #7b6d74; }

/* ---------- 6. 悄悄话卡片：略加纸感折角 ---------- */
.wcard { position: relative; }
.wcard::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 14px 14px;
  border-color: transparent transparent rgba(214, 190, 178, .5) transparent;
}
body.dark .wcard::after { border-color: transparent transparent rgba(255, 255, 255, .10) transparent; }

/* ---------- 7. 手机端 / 低动效偏好 ---------- */
@media (hover: none) {
  .ph { transform: none !important; }
  .ph::after { display: none; }
}

@media (max-width: 760px) {
  .masonry { column-gap: 12px; }
  .ph { padding: 6px 6px 26px; margin-bottom: 12px; }
  .ph figcaption { left: 6px; right: 6px; height: 26px; font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card::before { animation: none; }
  .ph { transition: none; }
}

/* ---------- 8. 口令输入：OTP 验证码胶囊 ---------- */
.otp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin: 20px 0 2px;
}

.otp-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 244px;
  height: 58px;
  border-radius: 29px;
  background: #ecebe4;
  box-shadow:
    inset 0 1.5px 3px rgba(122, 104, 92, .18),
    0 1px 0 rgba(255, 255, 255, .92);
  overflow: hidden;
  transition:
    width .36s cubic-bezier(.22, 1, .36, 1),
    background-color .3s ease,
    box-shadow .3s ease;
}

.login-card .otp-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .05em;
  color: #6b5f58;
  cursor: pointer;
  transition: opacity .18s ease, filter .18s ease, transform .18s ease;
}
.login-card .otp-label:hover,
.login-card .otp-label:active { transform: none; box-shadow: none; background: none; color: #6b5f58; }
.otp-label svg { width: 17px; height: 17px; flex: none; }

.otp-cells {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scaleX(.78);
  filter: blur(4px);
  transition: opacity .3s ease, transform .36s cubic-bezier(.22, 1, .36, 1), filter .3s ease;
}

/* 胶囊整体可点：收起 / 验证中 / 成功时不拦截点击，点击落到整条胶囊上 */
.otp[data-state="idle"] .otp-cells,
.otp[data-state="verifying"] .otp-cells,
.otp[data-state="success"] .otp-cells { pointer-events: none; }
.otp-shell { cursor: pointer; }
.otp-shell:has(.otp-native:focus) { cursor: text; }

.otp-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 50px;
  border-radius: 8px;
  background: #ecebe4;
  transition: background-color .2s ease;
}

.otp-number {
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  color: #22221d;
  transition: color .2s ease;
}

.otp-focus {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 46px;
  height: 50px;
  border-radius: 9px;
  border: 1.5px solid rgba(196, 110, 98, .8);
  box-shadow: 0 0 0 3px rgba(196, 110, 98, .1);
  opacity: 0;
  pointer-events: none;
  transition: left .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}

.otp-caret {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.5px;
  height: 20px;
  margin: -10px 0 0 -.75px;
  border-radius: 1px;
  background: rgba(196, 110, 98, .9);
  animation: otpBlink 1.05s steps(1, end) infinite;
}
@keyframes otpBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.otp-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  opacity: .02;
  font-size: 16px;
  color: transparent;
  caret-color: transparent;
  outline: none;
  cursor: text;
}

.otp-verifying,
.otp-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  letter-spacing: .05em;
  color: #6b5f58;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, filter .22s ease;
}

.otp-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid rgba(107, 95, 88, .3);
  border-top-color: #6b5f58;
  animation: otpSpin .78s linear infinite;
}
@keyframes otpSpin { to { transform: rotate(360deg); } }

/* —— 状态 —— */
.otp[data-state="input"] .otp-cells,
.otp[data-state="error"] .otp-cells { opacity: 1; transform: scaleX(1); filter: blur(0); }

.otp[data-state="input"] .otp-idle,
.otp[data-state="verifying"] .otp-idle,
.otp[data-state="error"] .otp-idle,
.otp[data-state="success"] .otp-idle {
  opacity: 0;
  filter: blur(5px);
  transform: scale(.86);
  pointer-events: none;
}

.otp[data-state="verifying"] .otp-cells {
  opacity: 0;
  transform: scaleX(.5);
  filter: blur(7px);
}
.otp[data-state="verifying"] .otp-verifying { opacity: 1; }

.otp[data-state="error"] .otp-shell { animation: otpShake .32s cubic-bezier(.36, .07, .19, .97); }
.otp[data-state="error"] .otp-cell { background: #fae3e4; }
.otp[data-state="error"] .otp-number { color: #d32e4d; }
.otp[data-state="error"] .otp-focus { opacity: 0; }
@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.otp[data-state="success"] .otp-shell {
  background: #6ea86b;
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, .16);
}
.otp[data-state="success"] .otp-success { opacity: 1; color: #fff; pointer-events: auto; }
.otp[data-state="success"] .otp-cells { opacity: 0; }

.otp-msg {
  min-height: 17px;
  margin: 0;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: #b4544a;
  opacity: 0;
  transition: opacity .2s ease;
}
.otp-msg.has-text { opacity: 1; }

/* —— 夜间 —— */
body.dark .otp-shell {
  background: #2b262f;
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .05);
}
body.dark .otp-cell { background: #2b262f; }
body.dark .otp-number { color: #f3ece7; }
body.dark .otp-label,
body.dark .otp-verifying { color: #b9abb4; }
body.dark .otp-spinner { border-color: rgba(185, 171, 180, .3); border-top-color: #b9abb4; }
body.dark .otp-focus { border-color: rgba(229, 146, 138, .85); box-shadow: 0 0 0 3px rgba(229, 146, 138, .1); }
body.dark .otp-caret { background: rgba(229, 146, 138, .9); }
body.dark .otp[data-state="error"] .otp-cell { background: #4a2029; }
body.dark .otp[data-state="error"] .otp-number { color: #ff9aa8; }
body.dark .otp-msg { color: #e08b86; }

@media (max-width: 400px) {
  .otp-shell { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .otp-shell { transition-duration: .01s; }
  .otp[data-state="error"] .otp-shell { animation: none; }
  .otp-caret, .otp-spinner { animation: none; }
}

/* ============================================
   2026-11-23 分页层：封面 + 照片 / 时光 / 悄悄话
   ============================================ */

/* ---------- 全局顶部暖光（各页通用） ---------- */
body::before {
  content: "";
  position: fixed;
  left: 0; right: 0; top: 0;
  height: 540px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(900px 430px at 50% -8%, #ffe8dd 0%, rgba(255, 232, 221, 0) 72%);
}
body.dark::before {
  background: radial-gradient(900px 430px at 50% -8%, rgba(46, 34, 52, .9) 0%, rgba(46, 34, 52, 0) 72%);
}

/* ---------- 顶部页签 ---------- */
.pagenav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 58;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 253, 251, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 8px 24px rgba(160, 110, 90, .14),
              inset 0 0 0 1px rgba(185, 142, 122, .16);
}

.pn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .1em;
  color: #8a7268;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s, background .25s, box-shadow .25s;
}

.pn:hover { color: var(--rose-d); background: rgba(196, 110, 98, .09); }

.pn.on {
  color: #fff;
  background: linear-gradient(135deg, #cf7f72 0%, var(--rose) 58%, #b3645a 100%);
  box-shadow: 0 6px 16px rgba(176, 96, 86, .28);
}

/* ---------- 封面（首屏只留名字与计时器） ---------- */
.hero--home {
  min-height: 84vh;
  min-height: 84svh;
  padding-bottom: 54px;
}

/* ---------- 三个入口 ---------- */
.entries {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 6px 22px 104px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 19px 22px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 253, 251, .92);
  box-shadow: 0 1px 2px rgba(150, 100, 80, .06),
              0 10px 26px rgba(150, 100, 80, .10),
              inset 0 0 0 1px rgba(185, 142, 122, .14);
  transition: transform .34s cubic-bezier(.2, .8, .3, 1), box-shadow .34s;
}

.entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(150, 100, 80, .08),
              0 20px 40px rgba(150, 100, 80, .17),
              inset 0 0 0 1px rgba(196, 110, 98, .26);
}

.entry-icon {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--rose-d);
  background: rgba(196, 110, 98, .10);
  box-shadow: inset 0 0 0 1px rgba(196, 110, 98, .14);
}

.entry-icon svg { width: 19px; height: 19px; }

.entry-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.entry-name {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 18.5px;
  font-weight: 500;
  letter-spacing: .09em;
  color: var(--ink);
}

.entry-meta {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #bb9f93;
}

.entry-arrow {
  margin-left: auto;
  font-size: 17px;
  color: #c07a6e;
  transition: transform .3s;
}

.entry:hover .entry-arrow { transform: translateX(5px); }

/* ---------- 内容页页头 ---------- */
.page-head {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 104px 22px 0;
  text-align: center;
  animation: fadeUp .85s cubic-bezier(.2, .7, .3, 1) both;
}

.page-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-title {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(26px, 4.2vw, 36px);
  font-weight: 500;
  letter-spacing: .16em;
  margin: 14px 0 0;
  color: var(--ink);
}

.page-rule {
  width: 40px;
  height: 1px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, rgba(196, 110, 98, 0), rgba(196, 110, 98, .75), rgba(196, 110, 98, 0));
}

.page-lead {
  margin: 18px auto 0;
  max-width: 540px;
  font-size: 13.5px;
  line-height: 1.95;
  color: #8b7368;
}

.page-main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 22px 26px;
}

/* ---------- 页尾跳转 ---------- */
.nextstep {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: 88vw;
  margin: 6px auto 84px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .1em;
  color: #8a6f64;
  text-decoration: none;
  background: rgba(255, 253, 251, .84);
  box-shadow: inset 0 0 0 1px rgba(185, 142, 122, .18),
              0 6px 18px rgba(160, 110, 90, .08);
  transition: color .28s, box-shadow .28s, transform .28s;
}

.nextstep span { transition: transform .3s; }

.nextstep:hover {
  color: var(--rose-d);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(196, 110, 98, .30),
              0 14px 30px rgba(160, 110, 90, .16);
}

.nextstep:hover span { transform: translateX(4px); }

/* ---------- 悄悄话寄出提示 ---------- */
.sent-tip {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--rose-d);
}

/* ---------- 照片墙：尘埃消散过场 ---------- */
.dust-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.ph img { transition: opacity .5s ease; }

/* ---------- 夜间 ---------- */
body.dark .pagenav {
  background: rgba(28, 23, 32, .8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42),
              inset 0 0 0 1px rgba(255, 255, 255, .07);
}

body.dark .pn { color: #a5969f; }
body.dark .pn:hover { color: #f2b3aa; background: rgba(229, 146, 138, .1); }
body.dark .pn.on { color: #fff; }

body.dark .entry {
  background: rgba(35, 29, 40, .8);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .34),
              inset 0 0 0 1px rgba(255, 255, 255, .07);
}
body.dark .entry:hover {
  box-shadow: 0 20px 42px rgba(0, 0, 0, .46),
              inset 0 0 0 1px rgba(229, 146, 138, .24);
}
body.dark .entry-icon {
  color: #f2b3aa;
  background: rgba(229, 146, 138, .12);
  box-shadow: inset 0 0 0 1px rgba(229, 146, 138, .18);
}
body.dark .entry-name { color: #f3ece7; }
body.dark .entry-meta { color: #8d7f88; }
body.dark .entry-arrow { color: #e5928a; }

body.dark .page-lead { color: #a1939b; }
body.dark .nextstep {
  color: #b3a4ac;
  background: rgba(35, 29, 40, .8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08),
              0 6px 18px rgba(0, 0, 0, .3);
}
body.dark .nextstep:hover { color: #f2b3aa; }
body.dark .sent-tip { color: #e5928a; }

/* ---------- 移动端：页签缩到左上角，避开右上角的像素开关 ---------- */
@media (max-width: 760px) {
  .pagenav {
    top: 12px;
    left: 12px;
    transform: none;
    gap: 1px;
    padding: 4px;
  }
  .pn { padding: 7px 12px; font-size: 12px; letter-spacing: .06em; }

  .hero--home { min-height: 78vh; min-height: 78svh; padding-bottom: 40px; }

  .entries { padding: 4px 18px 78px; gap: 11px; }
  .entry { padding: 16px 17px; gap: 13px; border-radius: 17px; }
  .entry-icon { width: 34px; height: 34px; border-radius: 11px; }
  .entry-icon svg { width: 17px; height: 17px; }
  .entry-name { font-size: 16.5px; }
  .entry-meta { font-size: 10px; letter-spacing: .12em; }

  .page-head { padding-top: 76px; }
  .page-main { padding: 30px 18px 18px; }
  .nextstep { margin-bottom: 70px; }
}

/* 计时器：手机上四组必须排在一行，格子按固定小尺寸，不靠 vw */
@media (max-width: 560px) {
  .clock { gap: 8px; margin-top: 28px; }
  .fc-digits { gap: 3px; }
  .fc { width: 32px; height: 38px; border-radius: 8px; }
  .fc .roll { font-size: 21px; }
  .fc-label { font-size: 10px; letter-spacing: .16em; }
}

@media (max-width: 400px) {
  .pn { padding: 6px 9px; font-size: 11px; }
  .entry-meta { letter-spacing: .08em; }
  .pixel-toggle { --px-scale: .17; top: 10px; right: 10px; }

  .clock { gap: 6px; }
  .fc-digits { gap: 2px; }
  .fc { width: 28px; height: 33px; border-radius: 7px; }
  .fc .roll { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry, .nextstep, .entry-arrow, .nextstep span { transition-duration: .01s; }
}



/* ---------- 访客（朋友从朋友圈点进来）看到的首页更紧凑 ---------- */
body.visitor .hero--home {
  min-height: auto;
  padding-bottom: 30px;
}
body.visitor .down { display: none; }
body.visitor .entries { padding-top: 6px; }

/* ---------- 蛋糕压在弹幕上面 ----------
   弹幕层是 fixed + z-index:1；hero 原来带 z-index:1 会自成层叠上下文，
   蛋糕再怎么设 z-index 也爬不上去。首页 hero 改成 auto 放弃上下文，
   蛋糕所在的 .home-bd 提到第 4 层，弹幕就从蛋糕后面穿过去。
   hero-inner 的 fadeUp 动画带 transform，动画期间同样会自成层叠上下文
   锁住蛋糕，所以首页把这段动画去掉。 */
.hero.hero--home { z-index: auto; }
.hero--home .hero-inner { animation: none; transform: none; opacity: 1; }
.home-bd { position: relative; z-index: 4; }
