/* =========================================================
   立冬 · 和你一起走到冬天
   mobile-first · 无外部依赖
   ========================================================= */

:root {
  --night: #050a14;
  --frost: #eef6ff;
  --ice: #a9c8ec;
  --ink: #16263a;
  --warm: #ffca92;
  --cinnabar: #a3433a;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; }

html,
body { margin: 0; padding: 0; }

body {
  background: var(--night);
  color: var(--frost);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(169, 200, 236, .28); color: #fff; }

button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 夜空 ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 72% at 50% -18%, #10233f 0%, #08101f 48%, #050a14 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.glow-a {
  width: 72vw; height: 72vw;
  left: -26vw; top: -12vh;
  background: radial-gradient(circle, rgba(38, 104, 126, .36), transparent 66%);
  animation: driftA 26s ease-in-out infinite alternate;
}

.glow-b {
  width: 82vw; height: 82vw;
  right: -34vw; top: 20vh;
  background: radial-gradient(circle, rgba(76, 60, 116, .26), transparent 68%);
  animation: driftB 32s ease-in-out infinite alternate;
}

.glow-c {
  width: 90vw; height: 60vw;
  left: 10vw; bottom: -30vh;
  background: radial-gradient(circle, rgba(124, 78, 56, .13), transparent 68%);
  animation: driftA 38s ease-in-out infinite alternate-reverse;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

@keyframes driftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}
@keyframes driftB {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-7vw, -4vh, 0) scale(.96); }
}

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}

/* ---------- 顶栏 ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  background: rgba(180, 210, 245, .05);
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(169, 200, 236, .5), #d8eaff 55%, var(--warm));
  box-shadow: 0 0 12px rgba(190, 220, 255, .4);
  transition: width .12s linear;
}

/* ---------- 通用版式 ---------- */

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: clamp(88px, 13vh, 150px) 0;
}

.label {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .3em;
  color: rgba(180, 205, 235, .4);
  text-transform: uppercase;
}

.label span {
  color: var(--warm);
  letter-spacing: .08em;
  opacity: .85;
}

.label::after {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, rgba(190, 215, 240, .22), transparent);
}

.label.center { justify-content: center; text-align: center; }
.label.center::after { display: none; }

.h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(30px, 8.8vw, 46px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: .035em;
  color: var(--frost);
  text-wrap: balance;
}

.h2.center { text-align: center; }

.lede {
  margin: 0;
  max-width: 30em;
  font-size: 12.5px;
  line-height: 2;
  letter-spacing: .05em;
  color: rgba(198, 222, 246, .52);
}

.center { text-align: center; }

/* 滚动出现：由 JS 加上 reveal-ready 才开始隐藏，脚本失败也不会白屏 */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal-ready .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-ready .season-item.reveal { transition-delay: var(--d, 0s); }

/* 首屏加载 */
.js .load {
  opacity: 0;
  animation: loadIn 1.3s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes loadIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(7px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ---------- 00 · 首屏 ---------- */

.hero {
  position: relative;
  min-height: max(640px, 100vh);
  min-height: max(640px, 100svh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 108px 20px 142px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28vh;
  z-index: 0;
  background: linear-gradient(to top, rgba(5, 10, 20, .88), transparent);
  pointer-events: none;
}

.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .9), transparent 100%),
    radial-gradient(1px 1px at 27% 9%, rgba(200, 225, 255, .7), transparent 100%),
    radial-gradient(1.4px 1.4px at 68% 14%, rgba(255, 255, 255, .8), transparent 100%),
    radial-gradient(1px 1px at 84% 27%, rgba(210, 235, 255, .6), transparent 100%),
    radial-gradient(1px 1px at 44% 30%, rgba(255, 255, 255, .5), transparent 100%),
    radial-gradient(1.2px 1.2px at 90% 8%, rgba(255, 255, 255, .7), transparent 100%),
    radial-gradient(1px 1px at 7% 42%, rgba(200, 225, 255, .5), transparent 100%),
    radial-gradient(1px 1px at 58% 6%, rgba(255, 255, 255, .6), transparent 100%);
  animation: twinkle 7s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: .3; }
  to   { opacity: .7; }
}

.hero-moon {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(88vw, 460px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 0;
  border: 1px solid rgba(190, 220, 255, .07);
  background: radial-gradient(circle at 50% 46%,
    rgba(214, 234, 255, .075) 0%,
    rgba(165, 202, 242, .045) 42%,
    rgba(150, 190, 235, .012) 62%,
    transparent 70%);
  box-shadow:
    inset 0 0 90px rgba(185, 218, 255, .07),
    0 0 120px rgba(110, 160, 220, .06);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 700px;
  text-align: center;
  will-change: transform, opacity;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .26em;
  color: rgba(190, 216, 244, .5);
  white-space: nowrap;
}

.eyebrow-line {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 216, 244, .3));
}

.eyebrow-line:last-child { transform: rotate(180deg); }

.hero-title {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .09em;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  font-family: var(--serif);
  font-size: clamp(96px, 30vw, 186px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: .01em;
  filter: drop-shadow(0 0 30px rgba(140, 190, 250, .16));
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 42%, #a8c8ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: charIn 1.6s var(--ease) forwards;
  animation-delay: calc(.3s + var(--i) * .17s);
}

.hero-title .char:nth-child(2) { margin-top: .08em; }

@keyframes charIn {
  0%   { opacity: 0; transform: translateY(.3em) scale(.97); filter: blur(16px); }
  55%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.hero-seal {
  position: absolute;
  right: -16px;
  bottom: 8px;
  width: 30px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .12), transparent 60%),
    linear-gradient(160deg, #ad4a40, #8e302c);
  color: #f7e9d8;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(-4deg);
  box-shadow:
    inset 0 0 0 1px rgba(247, 233, 216, .38),
    inset 0 0 14px rgba(70, 12, 10, .35),
    0 6px 18px rgba(0, 0, 0, .3);
  opacity: .92;
  -webkit-text-fill-color: #f7e9d8;
}

.hero-sub {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: clamp(16px, 4.5vw, 21px);
  letter-spacing: .28em;
  text-indent: .28em;
  color: rgba(232, 243, 255, .82);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: rgba(186, 213, 240, .46);
}

.hero-meta .num { letter-spacing: .05em; }

.hero-sep {
  width: 1px;
  height: 9px;
  background: rgba(186, 213, 240, .22);
}

.today-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 8px 15px 8px 13px;
  border: 1px solid rgba(190, 220, 255, .13);
  border-radius: 99px;
  background: rgba(10, 23, 40, .4);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: rgba(198, 222, 246, .55);
}

.today-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 8px rgba(255, 202, 146, .65);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1.15); }
}

.today-label {
  color: rgba(242, 248, 255, .88);
  white-space: nowrap;
}

.today-sep {
  width: 1px;
  height: 11px;
  background: rgba(198, 222, 246, .18);
}

.today-yi {
  color: var(--warm);
  letter-spacing: .22em;
  text-indent: .22em;
  white-space: nowrap;
}

.hero-foot {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.tap-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 9.5px;
  letter-spacing: .14em;
  color: rgba(194, 219, 244, .42);
  transition: opacity .8s ease, transform .8s ease;
}

.hero.tapped .tap-hint {
  opacity: .18;
  transform: translateY(6px);
}

.tap-dot {
  position: relative;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(214, 236, 255, .7);
}

.tap-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(214, 236, 255, .3);
  animation: tapRing 2.8s ease-out infinite;
}

@keyframes tapRing {
  0%   { transform: scale(.4); opacity: .9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}

.scroll-cue {
  position: relative;
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(200, 226, 252, .04), rgba(200, 226, 252, .24));
  text-decoration: none;
}

.scroll-cue span {
  position: absolute;
  left: -1.5px;
  top: 0;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(226, 241, 255, .8);
  box-shadow: 0 0 8px rgba(190, 220, 255, .65);
  animation: cue 2.6s var(--ease) infinite;
}

@keyframes cue {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(30px); opacity: 0; }
}

/* ---------- 01 · 序 ---------- */

.prologue { padding-top: clamp(100px, 15vh, 170px); }

.lit-text {
  margin: 0 0 38px;
  font-family: var(--serif);
  font-size: clamp(22px, 6.2vw, 34px);
  font-weight: 500;
  line-height: 1.95;
  letter-spacing: .03em;
  color: rgba(238, 246, 255, .95);
}

.lit-line { display: block; }

.lit-text .c {
  color: rgba(174, 202, 232, .13);
  transition: color .5s ease, text-shadow .5s ease;
}

.lit-text .c.on {
  color: #e9f3ff;
  text-shadow: 0 0 26px rgba(150, 200, 255, .17);
}

.lit-text .warm .c.on {
  color: var(--warm);
  text-shadow: 0 0 28px rgba(255, 190, 130, .2);
}

.aside {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(190, 220, 255, .14);
  font-size: 12.5px;
  line-height: 2.15;
  letter-spacing: .05em;
  color: rgba(196, 220, 245, .46);
}

.almanac-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(190, 220, 255, .08);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  color: rgba(190, 215, 240, .4);
}

.almanac-line .num { color: rgba(255, 202, 146, .7); }

.almanac-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(190, 215, 240, .4);
}

/* ---------- 02 · 四季 ---------- */

.season-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.season-item {
  padding: 22px 0 26px;
  border-top: 1px solid rgba(190, 220, 255, .1);
}

.season-item:last-child {
  border-bottom: 1px solid rgba(190, 220, 255, .1);
}

.season-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .22em;
  color: rgba(190, 215, 240, .32);
}

.season-meta .num { color: rgba(255, 202, 146, .55); }

.season-body {
  display: flex;
  align-items: flex-start;
  gap: 19px;
}

.season-name {
  flex: none;
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 500;
  line-height: .92;
  letter-spacing: .02em;
  color: var(--frost);
  text-shadow: 0 0 28px rgba(255, 255, 255, .1);
}

.spring .season-name { color: #a9d7b3; }
.summer .season-name { color: #f0c27f; }
.autumn .season-name { color: #e3a273; }
.winter .season-name { color: #b6d7f5; }

.season-copy {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.season-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  letter-spacing: .26em;
  color: rgba(238, 246, 255, .45);
}

.season-tag::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.season-copy p {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: rgba(238, 246, 255, .72);
}

/* ---------- 03 · 雪地 ---------- */

.snowwrite {
  position: relative;
  z-index: 3;
  width: calc(100% - 16px);
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(54px, 8vh, 78px) 0 clamp(44px, 7vh, 64px);
  border-radius: 32px;
  background:
    radial-gradient(120% 80% at 15% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #f3f8fe 0%, #e7f0fa 52%, #dbe8f6 100%);
  color: var(--ink);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  overflow: hidden;
}

.snowwrite::before {
  content: "雪";
  position: absolute;
  right: 4px;
  top: -26px;
  font-family: var(--serif);
  font-size: 210px;
  line-height: 1;
  color: rgba(120, 155, 195, .05);
  pointer-events: none;
  user-select: none;
}

.snowwrite .wrap { position: relative; z-index: 2; }

.snowwrite .label { color: rgba(70, 96, 124, .5); }
.snowwrite .label span { color: var(--cinnabar); opacity: .85; }
.snowwrite .label::after { background: linear-gradient(90deg, rgba(60, 90, 120, .2), transparent); }

.snowwrite .h2 { color: #13253a; }
.snowwrite .lede { color: #5d748d; }

.snowpad {
  position: relative;
  z-index: 2;
  margin: 30px 16px 0;
  height: clamp(300px, 44vh, 420px);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, .9), transparent 70%),
    linear-gradient(180deg, #fbfdff 0%, #eaf2fb 60%, #dfeaf7 100%);
  box-shadow:
    inset 0 2px 26px rgba(130, 162, 200, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    0 18px 44px rgba(31, 58, 88, .12);
  touch-action: none;
}

.snowpad::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .6;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(255, 255, 255, .8) 0 .8px, transparent 1.1px),
    radial-gradient(circle, rgba(170, 195, 220, .35) 0 .8px, transparent 1.1px);
  background-size: 41px 47px, 67px 73px, 89px 97px;
  background-position: 7px 13px, 31px 41px, 63px 9px;
}

.snowpad canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  /* 让笔触边缘像雪一样软一点 */
  filter: blur(.5px);
}

.snowpad-hint {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  pointer-events: none;
  color: #93a9c0;
  font-size: 10.5px;
  letter-spacing: .22em;
  transition: opacity .7s ease;
}

.snowpad-hint.hide { opacity: 0; }

.hint-flake {
  display: block;
  color: #a9bdd3;
  animation: spin 14s linear infinite;
}

.hint-flake svg { width: 22px; height: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }

.snowpad-tools {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 4;
}

.snowpad-tools button {
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid rgba(110, 145, 180, .24);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #4f687f;
  font-size: 9.5px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

.snowpad-tools button:active {
  transform: scale(.95);
  background: rgba(255, 255, 255, .85);
}

.footnote {
  margin: 18px 0 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .08em;
  color: #71879e;
}

/* ---------- 04 · 信 ---------- */

.letter-section {
  padding-top: clamp(108px, 16vh, 170px);
  position: relative;
}

.letter-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(96vw, 620px);
  height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 190, 130, .075), transparent 66%);
  pointer-events: none;
}

.letter-section .h2 { margin-bottom: 44px; }

.letter-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  transition: height .9s var(--ease);
}

.envelope {
  position: relative;
  display: block;
  width: min(86vw, 382px);
  max-width: 100%;
  aspect-ratio: 1.58;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: floatEnv 6.5s ease-in-out infinite;
  transition: opacity .32s ease .08s, transform .65s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

@keyframes floatEnv {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50%      { transform: translateY(-7px) rotate(.4deg); }
}

.envelope:focus-visible {
  outline: 1px solid rgba(255, 226, 180, .8);
  outline-offset: 10px;
  border-radius: 12px;
}

.env-face {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  border-radius: 9px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 30% 10%, rgba(255, 255, 255, .85), transparent 60%),
    linear-gradient(155deg, #f8f1e5 0%, #efe3d1 48%, #e6d6bf 100%);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .55);
}

.env-face::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: repeating-linear-gradient(115deg, rgba(120, 95, 65, .035) 0 1px, transparent 1px 7px);
}

.env-face::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(140, 112, 78, .16);
  border-radius: 4px;
}

.env-flap {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 100%;
  height: 62%;
  display: block;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, #f6eee1 0%, #eddfcb 78%, #e7d7c0 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  filter: drop-shadow(0 3px 3px rgba(90, 60, 30, .08));
}

.env-to {
  position: absolute;
  z-index: 4;
  left: 20px;
  bottom: 34px;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: #6d5a45;
}

.env-small {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 36px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  color: #9b866c;
}

.env-seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 58%;
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 47% 53% 48% 52%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 210, 195, .22), transparent 46%),
    radial-gradient(circle at 50% 50%, #ab453d 0%, #8e2f2b 72%, #7d2523 100%);
  color: #f8ead8;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(255, 226, 206, .3),
    inset 0 0 14px rgba(70, 12, 10, .3);
}

.env-seal::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(248, 234, 216, .28);
}

.env-open {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 15px;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: .3em;
  color: #8f7a60;
}

.letter-wrap.open .envelope {
  animation: none;
  opacity: 0;
  transform: translateY(-18px) scale(.98);
  pointer-events: none;
}

.paper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0 auto;
  padding: 28px 24px 24px;
  border-radius: 14px;
  background:
    radial-gradient(100% 60% at 20% 0%, rgba(255, 255, 255, .9), transparent 70%),
    linear-gradient(180deg, #fbf6ec 0%, #f4ead9 100%);
  box-shadow:
    0 44px 90px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(255, 255, 255, .6);
  color: #3f3327;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .6s var(--ease) .3s, transform .75s var(--ease) .3s;
}

.paper::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(150, 120, 85, .12);
  border-radius: 8px;
  pointer-events: none;
}

.letter-wrap.open .paper {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.paper:focus { outline: none; }

.paper-date {
  margin: 0 0 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .3em;
  color: #a08a70;
}

.paper-body {
  min-height: 160px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 2.08;
  letter-spacing: .025em;
  color: #42362a;
  white-space: pre-wrap;
  word-break: break-word;
}

.paper-body.typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.16em;
  background: #8a6f55;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.paper-sign {
  margin: 24px 0 0;
  text-align: right;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .1em;
  color: #5b4836;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .9s ease, transform .9s var(--ease);
}

.paper.done .paper-sign {
  opacity: 1;
  transform: translateY(0);
}

.sign-date {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .2em;
  color: #a38c74;
}

.replay {
  display: block;
  margin: 24px auto 0;
  padding: 9px 16px;
  border: 1px solid rgba(196, 222, 248, .16);
  border-radius: 99px;
  background: rgba(12, 25, 42, .34);
  color: rgba(200, 224, 248, .55);
  font-size: 9.5px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}

.replay:hover { color: rgba(235, 245, 255, .85); border-color: rgba(196, 222, 248, .3); }
.replay[hidden] { display: none; }

/* ---------- 05 · 白头 ---------- */

.finale {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: clamp(110px, 16vh, 170px);
  padding-bottom: clamp(90px, 12vh, 130px);
}

.finale-wrap { text-align: center; }

.poem {
  margin: 12px 0 22px;
  font-family: var(--serif);
  font-size: clamp(27px, 7.6vw, 44px);
  font-weight: 500;
  line-height: 2.02;
  letter-spacing: .07em;
  color: var(--frost);
}

.poem-line {
  display: block;
  text-shadow: 0 0 34px rgba(160, 205, 255, .14);
}

.poem-line:last-child { color: #ffe1bd; }

.finale-sub {
  margin: 0 0 34px;
  font-size: 11px;
  letter-spacing: .16em;
  color: rgba(198, 222, 246, .48);
}

.storm-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border: 1px solid rgba(210, 235, 255, .26);
  border-radius: 99px;
  background: rgba(18, 38, 62, .38);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(240, 248, 255, .9);
  font-size: 12.5px;
  letter-spacing: .18em;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s ease, background .3s ease;
}

.storm-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(60% 100% at 50% 120%, rgba(255, 202, 146, .16), transparent 70%);
  opacity: 0;
  transition: opacity .6s ease;
}

.storm-btn:hover::before { opacity: 1; }
.storm-btn:active { transform: scale(.97); }
.storm-btn:disabled { opacity: .55; cursor: default; }

.storm-icon {
  display: flex;
  color: var(--warm);
  animation: spin 10s linear infinite;
}

.storm-icon svg { width: 14px; height: 14px; }

.finale-msg {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 1.2s var(--ease),
    opacity 1s ease .35s,
    margin-top .9s var(--ease);
}

.finale-msg.in {
  max-height: 260px;
  margin-top: 36px;
  opacity: 1;
}

.msg-big {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: clamp(21px, 5.9vw, 30px);
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 30px rgba(200, 225, 255, .2);
}

.msg-small {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: rgba(208, 229, 250, .58);
}

.finale-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.finale-actions button {
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid rgba(196, 222, 248, .16);
  background: none;
  color: rgba(196, 222, 248, .52);
  font-size: 9.5px;
  letter-spacing: .14em;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}

.finale-actions button:hover {
  color: rgba(235, 247, 255, .9);
  border-color: rgba(196, 222, 248, .4);
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: clamp(56px, 9vh, 90px);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  color: rgba(176, 204, 232, .28);
}

.foot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(176, 204, 232, .3);
}

/* ---------- 小物 ---------- */

.tap-wave {
  position: fixed;
  z-index: 35;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  border: 1px solid rgba(215, 236, 255, .55);
  pointer-events: none;
  transform: scale(.1);
  animation: wave .95s var(--ease) forwards;
}

@keyframes wave {
  0%   { opacity: .8; transform: scale(.1); }
  100% { opacity: 0;  transform: scale(1); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 80;
  transform: translate(-50%, 18px);
  padding: 10px 17px;
  border: 1px solid rgba(190, 220, 255, .18);
  border-radius: 99px;
  background: rgba(10, 22, 38, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(238, 246, 255, .9);
  font-size: 10.5px;
  letter-spacing: .1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease, transform .4s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 大屏 ---------- */

@media (min-width: 820px) {
  .wrap {
    max-width: 860px;
    padding: 0 40px;
  }

  .hero { padding-bottom: 160px; }
  .hero-title { font-size: clamp(148px, 19vw, 214px); }
  .hero-moon { width: 520px; }
  .hero-seal { right: -26px; bottom: 14px; width: 34px; height: 48px; font-size: 19px; }

  .season-body { gap: 24px; }
  .season-name { font-size: 60px; }
  .season-copy p { font-size: 15px; }

  .snowwrite { width: min(calc(100% - 32px), 1040px); border-radius: 36px; }
  .snowpad { margin-inline: 40px; height: 400px; }
  .snowwrite .wrap { max-width: 900px; }

  .letter-wrap { max-width: 600px; }
  .paper { padding: 40px 44px 34px; }
  .paper-body { font-size: 15px; line-height: 2.15; }

  .poem { font-size: 46px; }
  .finale-sub { font-size: 12px; }
}

@media (max-width: 358px) {
  .hero-title { font-size: 88px; }
  .hero-seal { right: -10px; width: 26px; height: 36px; font-size: 15px; }
  .eyebrow { font-size: 8px; letter-spacing: .18em; }
  .hero-meta { font-size: 8.5px; }
  .season-name { font-size: 46px; }
  .season-body { gap: 14px; }
  .season-copy p { font-size: 13.5px; }
  .almanac-line { gap: 8px; }
}

/* ---------- 减少动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-title .char { opacity: 1; filter: none; }
  .tap-wave { display: none; }
}
