/* ============================================================================
   叙永家 · 手写样式（不要放进 design.css —— 那是 Tailwind 构建产物）
   命名约定：.yx-*  （yx = 叙永），避免和 Tailwind 工具类冲突
   ============================================================================ */

/* ---------------------------------------------------------------------------
   纪念时刻 · 5 张卡：桌面 3+2 居中、平板 2 列、手机 1 列
   为什么手写：build 里没有这组工具类，临时写 Tailwind 类不会生效。
   --------------------------------------------------------------------------- */
.yx-moment-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.yx-moment-card {
  flex: 0 0 calc((100% - 2rem) / 3);
}

@media (max-width: 1023px) {
  .yx-moment-card { flex: 0 0 calc((100% - 1rem) / 2); }
}

@media (max-width: 639px) {
  .yx-moment-card { flex: 0 0 100%; }
}

/* 将来（倒计时）卡：虚线边 + 淡底，和"已发生"的白底实卡区分开 */
.yx-moment-card.is-future {
  border: 1px dashed rgba(154, 113, 54, 0.38);
  background: rgba(154, 113, 54, 0.035);
}

.yx-moment-card.is-future .yx-moment-label {
  color: #7a5a2b;
}

/* 数字与单位分开：单位恒为 24px，数字用 36px ── 避免"天/年"跟着数字缩放 */
.yx-moment-value {
  font-family: var(--font-serif, serif);
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 600;
  color: var(--color-primary, #a23a33);
  font-variant-numeric: tabular-nums;
}

.yx-moment-unit {
  font-family: var(--font-serif, serif);
  font-size: 1.5rem;
  color: var(--color-secondary, #9a7136);
}

/* 印章天数：等宽数字，滚动递增时不会左右抖动 */
.yx-countup {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------------------
   首页副文案 · 打字机效果
   做法：文案先正常渲染（无 JS / 减少动效时直接看全文），JS 取走文字后逐字打出。
   --------------------------------------------------------------------------- */
.yx-typer {
  min-height: 3.5em; /* 两行，避免打字过程中页面跳动 */
}

/* 已武装（JS 决定要打字）但还没开始：先隐藏，避免"全文 → 清空 → 重打"的闪烁 */
.yx-typer.is-armed {
  opacity: 0;
}

.yx-typer .yx-typer-line::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: currentColor;
  opacity: 0;
}

.yx-typer.is-typing .yx-typer-line:last-child::after {
  opacity: 0.6;
  animation: yx-caret 0.9s steps(2, start) infinite;
}

@keyframes yx-caret {
  0%, 50% { opacity: 0.6; }
  50.01%, 100% { opacity: 0; }
}

/* 尊重系统"减少动效"设置：打字机直接给结果 */
@media (prefers-reduced-motion: reduce) {
  .yx-typer .yx-typer-line::after { display: none; }
}


/* ============================================================================
   以下原在 design.css 尾部、与 Tailwind 构建无关的**手写样式**，
   于 2026-10-18 搬到本文件（P739）：这样重新构建 design.css 不会把它们冲掉。
   顺序改动不影响表现：custom.css 在 design.css 之后加载。
   ============================================================================ */

.font-serif{font-family:var(--font-serif)}.font-hand{font-family:var(--font-hand)}@keyframes fadeUp{0%{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.anim-fade-up{animation:.8s cubic-bezier(.22,.7,.33,1) both fadeUp}.ann-switch{background:var(--color-surface-container-high);cursor:pointer;border:none;border-radius:9999px;width:36px;height:20px;padding:0;transition:background .25s;position:relative}.ann-switch:after{content:"";background:#fff;border-radius:9999px;width:16px;height:16px;transition:transform .25s;position:absolute;top:2px;left:2px;box-shadow:0 1px 3px #00000040}.ann-switch.on{background:var(--color-primary)}.ann-switch.on:after{transform:translate(16px)}.photo-item{transition:transform .4s cubic-bezier(.22,.7,.33,1),box-shadow .4s}.photo-item:hover{box-shadow:var(--shadow-float);transform:translateY(-4px)scale(1.02)}.photo-item img{transition:transform .7s cubic-bezier(.22,.7,.33,1)}.photo-item:hover img{transform:scale(1.05)}@keyframes pulseBeat{0%,to{opacity:1}50%{opacity:.45}}.num-tick{animation:1.6s ease-in-out infinite pulseBeat}@keyframes jumpCount{0%,to{transform:translateY(0)}40%{transform:translateY(-6px)}}.anim-jump span.digit{display:inline-block}.anim-jump.play span.digit{animation:.5s jumpCount}@keyframes floatSeal{0%,to{transform:translateY(0)rotate(0)}50%{transform:translateY(-6px)rotate(2deg)}}.anim-float-seal{animation:4s ease-in-out infinite floatSeal}body{font-family:Source Han Serif SC,Noto Serif SC,serif}.anim-fade-in{animation:.6s both fadeIn}.check-done .check-label{color:var(--color-on-surface-variant);opacity:.7;text-decoration:line-through}@keyframes popIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}.anim-pop-in{animation:.28s cubic-bezier(.22,.7,.33,1) both popIn}@keyframes growUp{0%{height:0}to{height:var(--bar-h)}}.bar-grow{height:var(--bar-h);transform-origin:bottom;animation:1s cubic-bezier(.22,.7,.33,1) both growUp}.anim-fade-up,.anim-fade-in{animation:none!important}.anim-fade-up[style*=animation-delay],.anim-fade-in[style*=animation-delay]{animation-delay:0s!important}@font-face{font-family:Ma Shan Zheng;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/mashanzheng-subset.woff2)format("woff2")}