/* =========================================================
   Shabby Chic × 复古鹅黄 × 旧纸米白 × 鼠尾草绿
   ========================================================= */
:root {
  --bg-parchment: #faf5eb;
  --bg-cream: #f3ead9;
  --bg-ivory: #fffdf8;
  --bg-butter-soft: #f7e8b8;
  --accent-butter: #d9ac4a;
  --accent-butter-deep: #b58425;
  --accent-sage: #6e846a;
  --accent-sage-soft: #96aa91;
  --accent-sage-pale: #e2eadf;
  --accent-sage-dark: #455942;
  --ink-primary: #2f2a22;
  --ink-secondary: #5c5346;
  --ink-muted: #7d7364;
  --border-paper: #dcd0ba;
  --shadow-paper: 0 12px 32px -12px rgba(72, 58, 36, 0.16);
  --shadow-card: 0 6px 18px -8px rgba(72, 58, 36, 0.14);

  --font-hand-en: "Bradley Hand", "Segoe Script", "Apple Chancery", "Snell Roundhand", "Brush Script MT", cursive;
  --font-note-en: "Bradley Hand", "Segoe Script", "Comic Sans MS", cursive;
  --font-serif-num: "Georgia", "Times New Roman", "Songti SC", serif;
  --font-typewriter: "Courier New", "Consolas", "STZhongsong", "华文中宋", "Noto Serif SC", "Kaiti SC", "Microsoft YaHei", monospace, serif;
  --font-zh-craft: "Kaiti SC", "STKaiti", "KaiTi", "FangSong", "Noto Serif SC", serif;
  --font-zh-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-parchment);
  color: var(--ink-primary);
}

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

body {
  margin: 0;
  font-family: var(--font-zh-body);
  background-color: var(--bg-parchment);
  color: var(--ink-primary);
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 与开屏信封同源的暖亚麻桌面底纸 + 右上自然日光影（全面统一底色，消除接缝） */
.paper-texture-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #eee7d6;
  background-image:
    radial-gradient(ellipse 68% 62% at 50% 50%, rgba(247, 241, 227, 0.62) 0%, rgba(239, 231, 214, 0.35) 60%, rgba(218, 206, 182, 0.34) 100%),
    linear-gradient(124deg, rgba(255, 253, 248, 0.52) 0%, rgba(248, 242, 228, 0.16) 48%, rgba(196, 180, 150, 0.14) 100%),
    url("assets/desk_paper_tile.jpg");
  background-size: cover, cover, 240px auto;
  background-repeat: no-repeat, no-repeat, repeat;
}

.hand-en {
  font-family: var(--font-hand-en);
}

.type-font {
  font-family: var(--font-typewriter);
}

/* =========================================================
   页面上下通用精致蕾丝花边（开屏 & 主页面对称呼应）
   ========================================================= */
.page-lace-band {
  position: fixed;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
  z-index: 12;
  opacity: 0.92;
  background-image: url("assets/lace_band.webp");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 30px;
}

.page-lace-band.lace-top {
  top: 0;
}

.page-lace-band.lace-bottom {
  bottom: 0;
  transform: scaleY(-1);
}

.main-lace-band {
  max-width: 980px;
  margin: 12px auto 0;
  height: 30px;
  opacity: 0.9;
  background-image: url("assets/lace_band.webp");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 30px;
}

/* =========================================================
   STAGE 0: 立体信封开屏
   ========================================================= */
.envelope-stage {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(16px, 4vw, 40px) 44px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.envelope-stage[hidden] {
  display: none;
}

.stage-bunting {
  position: fixed;
  top: 72px;
  width: clamp(136px, 19vw, 240px);
  height: auto;
  pointer-events: none;
  z-index: 4;
  opacity: 0.92;
}

.stage-bunting-left {
  left: 0;
}

.stage-bunting-right {
  right: 0;
}

@media (max-width: 640px) {
  .stage-bunting {
    top: 64px;
    width: 112px;
    opacity: 0.78;
  }
}

.envelope-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 8;
}

.envelope-to {
  margin: 0;
  font-family: var(--font-typewriter);
  font-size: clamp(0.92rem, 2vw, 1.08rem);
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
}

.envelope-to .hand-en {
  color: var(--accent-sage-dark);
  font-size: 1.15em;
  margin-right: 4px;
}

.ghost-doodle-btn {
  appearance: none;
  background: rgba(255, 253, 248, 0.55);
  border: 1px dashed var(--border-paper);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-zh-body);
  font-size: 0.85rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ghost-doodle-btn:hover,
.ghost-doodle-btn:focus-visible {
  background-color: var(--bg-butter-soft);
  border-color: var(--accent-butter);
  color: var(--ink-primary);
  outline: 2px solid var(--accent-sage);
  outline-offset: 2px;
}

.envelope-scene {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 8px;
  perspective: 1600px;
}

/* 实拍级手工信封主舞台（扁平层级配合透视变换，杜绝 3D 深度斜切） */
.envelope-card {
  position: relative;
  width: min(920px, 98vw);
  aspect-ratio: 1280 / 714;
}

@media (prefers-reduced-motion: no-preference) {
  .envelope-card {
    animation: float-envelope 5.5s ease-in-out infinite alternate;
  }
  .envelope-card.is-opening {
    animation: envelope-card-open 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  @keyframes float-envelope {
    from { transform: translateY(0px); }
    to { transform: translateY(-4px); }
  }
  @keyframes envelope-card-open {
    0% { transform: scale(1) translateY(0); }
    22% { transform: scale(0.99) translateY(2px); }
    100% { transform: scale(1.01) translateY(24px); }
  }
  .envelope-card.is-opening + .envelope-hint-pill {
    transform: translateY(22px);
    transition: transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* 边缘柔化羽化遮罩（真实四边向内羽化，彻底消除矩形画像边缘） */
.envelope-scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

/* 拆信完整动态装配层（严格对齐原图信封主体 left:20.6%, top:12.3%, w:59%, h:75.5%） */
.envelope-open-assembly {
  position: absolute;
  left: 20.6%;
  top: 12.3%;
  width: 59%;
  height: 75.5%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.envelope-flap-open-back {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 54%;
  z-index: 1;
  opacity: 0;
  transform-origin: 50% 100%;
  transform: perspective(1200px) rotateX(-89deg);
  clip-path: polygon(0 100%, 7% 50%, 24% 20%, 50% 0%, 76% 20%, 93% 50%, 100% 100%);
  background-color: #f3ede0;
  background-image:
    linear-gradient(180deg, rgba(255, 253, 248, 0.52) 0%, rgba(226, 215, 194, 0.58) 100%),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 180px auto;
  filter: drop-shadow(0 -6px 10px rgba(72, 56, 32, 0.14));
}

.envelope-cavity {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, #cfc2aa 0%, #dfd3bc 45%, #eee5d4 100%);
  border-radius: 2px;
  box-shadow: inset 0 18px 28px -12px rgba(68, 52, 28, 0.34);
}

.envelope-rising-letter {
  position: absolute;
  left: 6%;
  top: 8%;
  width: 88%;
  height: 82%;
  z-index: 3;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transform: translateY(32%) scale(0.95);
  background-color: #fcf9f2;
  background-image:
    linear-gradient(150deg, rgba(255, 253, 248, 0.72), rgba(246, 239, 224, 0.45)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  border: 1px solid #d9cbb0;
  border-radius: 4px;
  box-shadow:
    0 16px 34px -10px rgba(62, 48, 26, 0.28),
    inset 0 0 0 8px rgba(255, 253, 248, 0.5),
    inset 0 0 0 9px rgba(198, 168, 108, 0.32);
  padding: clamp(14px, 2.2vw, 24px) clamp(16px, 2.8vw, 28px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.rising-letter-inner {
  width: 100%;
  padding-top: 2px;
}

.rising-cake-emblem {
  width: 34px;
  height: 30px;
  display: block;
  margin: 0 auto 3px;
}

.rising-eyebrow {
  display: block;
  font-family: var(--font-typewriter);
  font-size: clamp(0.6rem, 1.05vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-secondary);
  min-height: 1.25em;
}

.rising-title {
  margin: 6px 0 4px;
  font-family: var(--font-typewriter);
  font-size: clamp(0.9rem, 1.78vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-sage-dark);
  min-height: 1.35em;
}

.rising-zh {
  margin: 0 0 10px;
  font-family: var(--font-typewriter);
  font-size: clamp(0.94rem, 1.72vw, 1.18rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-primary);
  min-height: 1.35em;
}

.rising-rule {
  display: block;
  width: 48%;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(196, 159, 86, 0.72), transparent);
}

.tw-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.14em;
  background-color: var(--accent-butter-deep);
  animation: tw-caret-blink 0.68s steps(2, start) infinite;
}

@keyframes tw-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.envelope-front-pocket {
  position: absolute;
  inset: 0;
  z-index: 4;
  clip-path: polygon(0 0, 50% 44%, 100% 0, 100% 100%, 0 100%);
  background-color: #f3ede0;
  background-image:
    linear-gradient(155deg, rgba(255, 253, 248, 0.5) 0%, rgba(236, 227, 208, 0.36) 100%),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  box-shadow: inset 0 12px 20px -10px rgba(84, 66, 38, 0.18);
}

.pocket-lace-trim {
  position: absolute;
  left: 0;
  right: 0;
  top: 43%;
  height: 15%;
  opacity: 0.88;
  background-image: url("assets/lace_band.webp");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 100%;
}

.envelope-flap-closing-face {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  clip-path: polygon(20.4% 12%, 79.8% 12%, 79.8% 28%, 70% 47%, 58% 60%, 50% 65.5%, 42% 60%, 30% 47%, 20.4% 28%);
  transform-origin: 50% 12.2%;
}

.envelope-flap-closing-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 立体鼠尾草火漆印章按钮（精确对齐原图 x:584..802, y:398..616） */
.wax-seal-btn {
  position: absolute;
  left: 42.442%;
  top: 51.823%;
  width: 15.843%;
  height: 28.385%;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 6;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), filter 0.34s ease;
}

.wax-seal-btn:hover,
.wax-seal-btn:focus-visible {
  transform: scale(1.06) translateY(-2px);
  filter: drop-shadow(0 0 16px rgba(228, 191, 99, 0.72));
  outline: none;
}

.wax-seal-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-sage);
}

.wax-seal-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* 真·两段式信封掀盖 → 信笺抽出 → 页面渐入动效（全程无深度切边） */
@media (prefers-reduced-motion: no-preference) {
  .envelope-card.is-opening .wax-seal-btn {
    animation: seal-pop-off 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .envelope-card.is-opening .envelope-open-assembly {
    animation: assembly-appear 0.14s ease forwards;
  }
  .envelope-card.is-opening .envelope-flap-closing-face {
    animation: flap-fold-up-front 0.32s cubic-bezier(0.4, 0, 0.7, 0.6) forwards;
  }
  .envelope-card.is-opening .envelope-flap-open-back {
    animation: flap-unfold-up-back 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
  }
  .envelope-card.is-opening .envelope-rising-letter {
    animation: letter-glide-out 0.74s cubic-bezier(0.22, 1, 0.36, 1) 0.34s forwards;
  }
  .envelope-stage.is-leaving {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    background: transparent;
    animation: stage-dissolve-out 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
}

@keyframes seal-pop-off {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  30% {
    opacity: 1;
    transform: scale(0.9) translateY(2px);
  }
  100% {
    opacity: 0;
    transform: scale(1.14) translateY(-24px);
  }
}

@keyframes assembly-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flap-fold-up-front {
  0% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg);
  }
  90% {
    opacity: 1;
    transform: perspective(1200px) rotateX(85deg);
  }
  100% {
    opacity: 0;
    transform: perspective(1200px) rotateX(90deg);
  }
}

@keyframes flap-unfold-up-back {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateX(-89deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg);
  }
}

@keyframes letter-glide-out {
  0% {
    opacity: 0;
    transform: translateY(32%) scale(0.95);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(-41%) scale(1.03);
  }
}

@keyframes stage-dissolve-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.05);
  }
}

.envelope-hint-pill {
  position: relative;
  z-index: 8;
  margin: 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background-color: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--border-paper);
  font-size: 0.88rem;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-card);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-butter);
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-dot {
    animation: soft-pulse 1.8s ease-in-out infinite;
  }
  @keyframes soft-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.45; }
  }
}

/* =========================================================
   MAIN SITE: 展开后的手账长卷结构
   ========================================================= */
.main-site {
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}

.main-site[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .main-site.is-entering {
    animation: apple-page-reveal 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes apple-page-reveal {
    from {
      opacity: 0;
      transform: scale(0.978) translateY(18px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}

/* 顶部导航栏（移除高耗能全宽 backdrop-filter，保证手机/浏览器 60fps 顺滑滚动） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(250, 245, 235, 0.96);
  border-bottom: 1px solid var(--border-paper);
}

#sec-offline,
#sec-events,
#sec-music,
#sec-fanart,
#sec-poster {
  content-visibility: auto;
  contain-intrinsic-size: auto 560px;
}

.header-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.back-to-envelope-btn {
  flex: none;
  appearance: none;
  border: 1px dashed var(--accent-sage);
  background-color: var(--accent-sage-pale);
  color: var(--accent-sage-dark);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-family: var(--font-zh-body);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.back-to-envelope-btn:hover,
.back-to-envelope-btn:focus-visible {
  background-color: #d3e1cf;
  outline: 2px solid var(--accent-sage);
  outline-offset: 2px;
}

.site-nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  padding: 4px 2px 6px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink-primary);
  font-weight: 600;
}

/* 手绘波浪下划线指示当前板块 */
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='6' viewBox='0 0 60 6' preserveAspectRatio='none'%3E%3Cpath d='M1,4 Q15,1 30,4 T59,3' fill='none' stroke='%23D9AC4A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* 通用板块容器 */
.section-block {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 68px) 20px;
}

.section-header {
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-serif-num);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sage-dark);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 10px;
  font-family: var(--font-zh-craft);
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-primary);
}

.title-accent {
  color: var(--accent-butter-deep);
  font-style: italic;
  position: relative;
  display: inline-block;
}

.title-accent::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 8px;
  background-color: rgba(232, 200, 114, 0.35);
  z-index: -1;
  transform: rotate(-1deg);
}

.section-subtitle {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.96rem;
  max-width: 640px;
}

/* 实拍棉麻手工蕾丝横条分隔带（提取自封面信封真品蕾丝） */
.lace-divider {
  max-width: 940px;
  margin: 0 auto;
  height: 36px;
  opacity: 0.94;
  background-image: url("assets/lace_band.webp");
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 34px;
}

/* 复古半透明硫酸纸 / 羊皮纸胶带（纯渐变渲染，无 blur 合成卡顿） */
.washi-tape {
  position: absolute;
  width: 78px;
  height: 22px;
  z-index: 5;
  pointer-events: none;
  opacity: 0.88;
  box-shadow: 0 2px 5px rgba(68, 53, 30, 0.08);
  border-left: 1px dashed rgba(255, 253, 248, 0.6);
  border-right: 1px dashed rgba(255, 253, 248, 0.6);
}

.tape-sage {
  background: linear-gradient(180deg, rgba(168, 184, 162, 0.42), rgba(146, 165, 140, 0.36));
}

.tape-butter {
  background: linear-gradient(180deg, rgba(242, 224, 172, 0.56), rgba(232, 209, 146, 0.44));
}

.tape-floral {
  background: linear-gradient(180deg, rgba(247, 238, 212, 0.68), rgba(238, 226, 192, 0.54));
}

.tape-tl { top: -10px; left: 20px; transform: rotate(-11deg); }
.tape-tr { top: -10px; right: 20px; transform: rotate(10deg); }
.tape-br { bottom: -10px; right: 22px; transform: rotate(-8deg); }
.tape-top-center { top: -11px; left: 50%; transform: translateX(-50%) rotate(-2deg); }

/* =========================================================
   00 / 拆开后的主视觉信笺区（棉麻信纸 × 邮票邮戳 × 压花 × 火漆）
   ========================================================= */
.torn-letter-sheet {
  position: relative;
  background-color: #fbf7ef;
  background-image:
    linear-gradient(132deg, rgba(255, 253, 248, 0.62) 0%, rgba(251, 246, 236, 0.36) 55%, rgba(226, 214, 192, 0.28) 100%),
    url("assets/cotton_paper_tile.jpg");
  background-size: cover, 220px auto;
  border: 1px solid #dfd2bb;
  border-radius: 4px;
  padding: clamp(28px, 4.5vw, 48px);
  box-shadow:
    0 24px 52px -18px rgba(68, 53, 30, 0.22),
    0 6px 16px -4px rgba(68, 53, 30, 0.1),
    inset 0 0 0 10px rgba(255, 253, 248, 0.36),
    inset 0 0 0 11px rgba(206, 190, 162, 0.42);
}

/* 桌面散落压花（与开屏信封同源，轻搭在信纸外缘角隅，不遮挡文字与倒计时） */
.letter-botanical-tl {
  position: absolute;
  top: -26px;
  left: -32px;
  width: clamp(58px, 7.5vw, 82px);
  height: auto;
  pointer-events: none;
  z-index: 6;
  transform: rotate(-14deg);
  filter: drop-shadow(3px 6px 8px rgba(68, 53, 30, 0.18));
}

.letter-botanical-br {
  position: absolute;
  bottom: -26px;
  left: -28px;
  width: clamp(56px, 7vw, 76px);
  height: auto;
  pointer-events: none;
  z-index: 6;
  transform: rotate(16deg);
  filter: drop-shadow(3px 6px 8px rgba(68, 53, 30, 0.18));
}

/* 右上角植物邮票 + 12.28 邮戳 */
.letter-postal-corner {
  position: absolute;
  top: 16px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.94;
}

.postal-ring-ink {
  width: 64px;
  height: 64px;
  margin-right: -16px;
  border-radius: 50%;
  border: 1.8px solid rgba(64, 57, 52, 0.66);
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px rgba(64, 57, 52, 0.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(64, 57, 52, 0.85);
  transform: rotate(-10deg);
  z-index: 2;
}

.postal-ring-arc {
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.postal-ring-ink strong {
  font-family: var(--font-serif-num);
  font-size: 0.88rem;
  line-height: 1;
}

.postal-stamp-img {
  width: 68px;
  height: auto;
  transform: rotate(3deg);
  filter: drop-shadow(1px 3px 5px rgba(68, 53, 30, 0.18));
}

@media (max-width: 760px) {
  .letter-postal-corner {
    top: 14px;
    right: 14px;
    transform: scale(0.8);
    transform-origin: top right;
  }
  .letter-botanical-tl {
    left: -12px;
    top: -14px;
  }
}

.letter-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  padding-right: 130px;
  border-bottom: 1px dashed #d8cab2;
  margin-bottom: 24px;
}

.stamp-badge {
  font-size: 0.76rem;
  padding: 2px 10px;
  border-radius: 3px;
  border: 1px dashed var(--accent-sage);
  color: var(--accent-sage-dark);
  background-color: rgba(226, 234, 223, 0.72);
}

.hero-letter-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.92fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}

@media (max-width: 760px) {
  .hero-letter-grid {
    grid-template-columns: 1fr;
  }
  .letter-meta-row {
    padding-right: 88px;
  }
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-typewriter);
  font-size: clamp(1.68rem, 3.8vw, 2.34rem);
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hand-highlight {
  position: relative;
  display: inline-block;
  color: var(--accent-sage-dark);
}

.hand-underline {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 14px;
}

.hero-body {
  margin: 0 0 24px;
  font-family: var(--font-typewriter);
  color: var(--ink-primary);
  font-size: 1.03rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    rgba(205, 189, 162, 0.42) 32px
  );
  line-height: 32px;
}

.hero-body strong {
  font-weight: 700;
  color: var(--ink-primary);
}

.hero-celebrate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
}

/* 复古活版邮票票根倒计时 */
.countdown-box {
  background-color: #f6edd4;
  background-image:
    linear-gradient(180deg, rgba(250, 241, 214, 0.85), rgba(242, 228, 186, 0.78)),
    url("assets/cotton_paper_tile.jpg");
  border: 1px solid #d7be79;
  border-radius: 6px;
  padding: 14px 18px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  box-shadow:
    inset 0 0 0 4px rgba(255, 253, 248, 0.45),
    inset 0 0 0 5px rgba(196, 165, 92, 0.35),
    0 6px 14px -8px rgba(72, 58, 36, 0.18);
}

/* 互动生日蜡烛许愿小组件 */
.candle-wish-box {
  background-color: #fbf7ec;
  background-image:
    linear-gradient(160deg, rgba(255, 253, 248, 0.72), rgba(235, 242, 232, 0.45)),
    url("assets/cotton_paper_tile.jpg");
  border: 1px solid #cdd8c9;
  border-radius: 6px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    inset 0 0 0 4px rgba(255, 253, 248, 0.45),
    inset 0 0 0 5px rgba(110, 132, 106, 0.25),
    0 6px 14px -8px rgba(72, 58, 36, 0.14);
}

.wish-cake-svg {
  width: 60px;
  height: 50px;
  flex: none;
}

.candle-flame,
.candle-glow {
  transform-origin: center bottom;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .candle-flame {
    animation: candle-flicker 1.4s ease-in-out infinite alternate;
  }
  .candle-glow {
    animation: glow-pulse 1.4s ease-in-out infinite alternate;
  }
  @keyframes candle-flicker {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(1.12) scaleX(0.92); }
  }
  @keyframes glow-pulse {
    0% { opacity: 0.72; }
    100% { opacity: 1; }
  }
}

.candle-wish-box.is-blown .candle-flame,
.candle-wish-box.is-blown .candle-glow {
  animation: none;
  opacity: 0;
  transform: scale(0.3) translateY(-4px);
}

.wish-cake-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wish-cake-sub {
  font-size: 0.76rem;
  color: var(--accent-sage-dark);
}

.wish-candle-btn {
  appearance: none;
  border: 1px solid #d5ba72;
  background-color: #f6e7ba;
  color: var(--ink-primary);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-zh-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wish-candle-btn:hover,
.wish-candle-btn:focus-visible {
  background-color: #edd797;
  transform: translateY(-1px);
  outline: 2px solid var(--accent-sage);
  outline-offset: 2px;
}

.candle-wish-box.is-blown .wish-candle-btn {
  background-color: var(--accent-sage-pale);
  border-color: var(--accent-sage);
  color: var(--accent-sage-dark);
}

.countdown-caption {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.countdown-grid {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cd-item {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.cd-item strong {
  font-family: var(--font-serif-num);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--ink-primary);
}

.cd-item span {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.cd-sep {
  font-family: var(--font-serif-num);
  font-size: 1.3rem;
  color: var(--accent-butter-deep);
}

/* 右侧真品蕾丝框 × 拍立得 */
.hero-polaroid-wrap {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lace-frame-outer {
  padding: 16px 16px 26px;
  border-radius: 6px;
  background-color: #fbf8f1;
  background-image:
    linear-gradient(to bottom, #fbf8f1 76%, rgba(251, 248, 241, 0.3) 100%),
    url("assets/lace_band.webp");
  background-repeat: no-repeat, repeat-x;
  background-position: top, bottom center;
  background-size: cover, auto 32px;
  border: 1px solid #dfd3bd;
  box-shadow:
    0 18px 36px -14px rgba(68, 53, 30, 0.22),
    0 4px 10px -4px rgba(68, 53, 30, 0.1);
  transform: rotate(1.4deg);
}

.polaroid-card {
  position: relative;
  background-color: #fffdf9;
  padding: 10px 10px 14px;
  border: 1px solid #e4d9c3;
  width: min(264px, 72vw);
}

.polaroid-photo {
  aspect-ratio: 4 / 5;
  background-color: #f4eee1;
  overflow: hidden;
  border: 1px solid #e8dec9;
}

.polaroid-photo img,
.polaroid-photo svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.polaroid-photo .hero-bae-photo {
  object-position: 50% 24%;
  filter: saturate(0.96) contrast(1.02) sepia(0.05);
}

.polaroid-caption {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-secondary);
}

.polaroid-caption .hand-en {
  font-size: 0.78rem;
  color: var(--accent-butter-deep);
}

.letter-signoff-seal {
  position: absolute;
  right: -14px;
  bottom: 12px;
  width: 68px;
  height: 68px;
  object-fit: contain;
  pointer-events: none;
  z-index: 7;
  filter: drop-shadow(2px 6px 10px rgba(48, 42, 32, 0.25));
}

.doodle-margin-note {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-sage-dark);
  font-size: 0.78rem;
}

/* =========================================================
   筛选胶囊 & 2x2 杂志宫格
   ========================================================= */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.pill-btn {
  appearance: none;
  border: 1px solid var(--border-paper);
  background-color: var(--bg-ivory);
  color: var(--ink-secondary);
  border-radius: 999px;
  padding: 7px 18px;
  font-family: var(--font-zh-body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill-btn:hover {
  border-color: var(--accent-butter);
  background-color: var(--bg-butter-soft);
}

.pill-btn.is-active {
  background-color: var(--accent-sage-dark);
  border-color: var(--accent-sage-dark);
  color: #fffdf8;
}

/* 参考图同款 2x2 区域切换格（棉麻信纸档案目录） */
.region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid #ddd0b9;
  background-color: #fbf7ef;
  background-image:
    linear-gradient(180deg, rgba(255, 253, 248, 0.56), rgba(248, 242, 230, 0.44)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  box-shadow: 0 10px 26px -14px rgba(68, 53, 30, 0.16);
  margin-bottom: 28px;
}

.region-cell {
  appearance: none;
  border: none;
  border-right: 1px solid var(--border-paper);
  border-bottom: 1px solid var(--border-paper);
  background: transparent;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: background-color 0.2s ease;
}

.region-cell:nth-child(2n) {
  border-right: none;
}

.region-cell:nth-child(n + 3) {
  border-bottom: none;
}

.region-cell:hover {
  background-color: rgba(247, 232, 184, 0.32);
}

.region-cell.is-active {
  background-color: rgba(247, 232, 184, 0.48);
}

.region-cell.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: var(--accent-butter-deep);
}

.region-code {
  font-family: var(--font-serif-num);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.region-name {
  font-size: 1.08rem;
  color: var(--ink-primary);
}

.region-count {
  font-size: 0.82rem;
  color: var(--accent-sage-dark);
}

/* 线下点位卡片 */
.offline-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.offline-card {
  position: relative;
  background-color: #fcf9f2;
  background-image:
    linear-gradient(145deg, rgba(255, 253, 248, 0.65), rgba(246, 239, 224, 0.45)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 180px auto;
  border: 1px solid #dfd2bb;
  border-radius: 4px;
  padding: 24px 20px 20px;
  box-shadow:
    0 12px 26px -14px rgba(68, 53, 30, 0.18),
    inset 0 0 0 6px rgba(255, 253, 248, 0.42),
    inset 0 0 0 7px rgba(212, 198, 173, 0.36);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.offline-type-tag {
  font-size: 0.76rem;
  padding: 2px 10px;
  border-radius: 999px;
  background-color: var(--bg-butter-soft);
  color: #6f4e10;
  border: 1px solid #e3c97b;
}

.postmark-status {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px dashed var(--accent-sage);
  color: var(--accent-sage-dark);
  transform: rotate(-4deg);
}

.offline-card h3 {
  margin: 2px 0 0;
  font-size: 1.08rem;
  font-family: var(--font-zh-craft);
}

.offline-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.offline-perk {
  margin: 2px 0 6px;
  padding: 8px 10px;
  background-color: var(--bg-parchment);
  border-left: 3px solid var(--accent-sage);
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.offline-actions {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border-paper);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-btn {
  appearance: none;
  border: 1px solid var(--border-paper);
  background-color: #ffffff;
  color: var(--ink-primary);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mini-btn:hover {
  background-color: var(--bg-butter-soft);
  border-color: var(--accent-butter);
}

.mini-btn.sage {
  background-color: var(--accent-sage-pale);
  border-color: var(--accent-sage-soft);
  color: var(--accent-sage-dark);
}

/* =========================================================
   02 / 生日活动时间轴（参考图一：大号数字 + 撕纸便签）
   ========================================================= */
.events-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.event-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 600px) {
  .event-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.event-date-col {
  padding-top: 8px;
}

.event-big-date {
  display: block;
  font-family: var(--font-serif-num);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-butter-deep);
}

.event-year-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.event-note-card {
  position: relative;
  background-color: #fcf9f2;
  background-image:
    linear-gradient(145deg, rgba(255, 253, 248, 0.64), rgba(247, 240, 226, 0.44)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 180px auto;
  border: 1px solid #dfd2bb;
  border-radius: 4px;
  padding: 20px 24px;
  box-shadow:
    0 12px 28px -14px rgba(68, 53, 30, 0.18),
    inset 0 0 0 6px rgba(255, 253, 248, 0.42),
    inset 0 0 0 7px rgba(212, 198, 173, 0.34);
}

/* 复古曲别针 SVG 装饰 */
.paperclip-pin {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 24px;
  height: 36px;
  pointer-events: none;
}

.event-note-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-zh-craft);
  font-size: 1.1rem;
  padding-right: 28px;
}

.event-note-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.event-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-host {
  font-size: 0.82rem;
  color: var(--accent-sage-dark);
}

.event-note-layout {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.event-card-body {
  flex: 1;
  min-width: 0;
}

/* 活动 01：许愿屋主题插画渐变融入卡片 */
.event-note-card.has-banner-blend {
  overflow: hidden;
  min-height: 178px;
}

.event-banner-blend-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.event-banner-blend-bg img {
  position: absolute;
  top: 0;
  right: 0;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: 86% center;
  opacity: 0.94;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.84) 40%, rgba(0, 0, 0, 0.28) 72%, transparent 100%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.84) 40%, rgba(0, 0, 0, 0.28) 72%, transparent 100%);
}

.event-banner-blend-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(96deg, rgba(252, 249, 242, 0.98) 0%, rgba(252, 249, 242, 0.9) 46%, rgba(252, 249, 242, 0.26) 72%, rgba(252, 249, 242, 0.04) 100%);
}

.event-note-card.has-banner-blend .event-card-body {
  max-width: 60%;
}

/* 活动 02 & 03：统一倾斜角度 + 黄铜曲别针挂扣海报卡片 */
.event-note-card.has-pinned-thumb {
  overflow: visible;
}

.event-note-card.has-pinned-thumb h3 {
  padding-right: 0;
}

.event-pinned-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 172px;
  padding: 6px 6px 8px;
  background-color: #fffdf8;
  border: 1px solid #dcccb0;
  border-radius: 3px;
  box-shadow:
    0 12px 24px -12px rgba(62, 46, 22, 0.34),
    0 3px 8px rgba(62, 46, 22, 0.1);
  transform: rotate(3.8deg);
  transform-origin: 50% 8%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
  z-index: 3;
}

.event-note-card.has-pinned-thumb:hover .event-pinned-thumb {
  transform: rotate(1.8deg) translateY(-2px);
  box-shadow:
    0 16px 28px -12px rgba(62, 46, 22, 0.38),
    0 4px 10px rgba(62, 46, 22, 0.12);
}

.event-pinned-thumb::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  background: rgba(138, 97, 20, 0.28);
  border-radius: 2px;
}

.event-pinned-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid rgba(220, 204, 176, 0.55);
}

.thumb-paperclip {
  position: absolute;
  top: -19px;
  left: 50%;
  width: 26px;
  height: 44px;
  transform: translateX(-50%) rotate(-3deg);
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(1px 3px 3px rgba(58, 42, 18, 0.32));
}

@media (max-width: 720px) {
  .event-note-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .event-note-card.has-banner-blend .event-card-body {
    max-width: 100%;
  }
  .event-banner-blend-bg img {
    width: 100%;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
  }
  .event-banner-blend-bg::after {
    background: linear-gradient(180deg, rgba(252, 249, 242, 0.72) 0%, rgba(252, 249, 242, 0.94) 65%, rgba(252, 249, 242, 0.98) 100%);
  }
  .event-pinned-thumb {
    width: 152px;
    align-self: flex-end;
    margin-top: 6px;
  }
}

/* =========================================================
   03 / 音乐视频安利（黑胶抽拉互动）
   ========================================================= */
.music-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 22px;
}

@media (max-width: 500px) {
  .music-list {
    grid-template-columns: 1fr;
  }
}

.music-card {
  background-color: #fcf9f2;
  background-image:
    linear-gradient(140deg, rgba(255, 253, 248, 0.65), rgba(246, 239, 224, 0.42)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 180px auto;
  border: 1px solid #dfd2bb;
  border-radius: 6px;
  padding: 18px;
  box-shadow:
    0 12px 26px -14px rgba(68, 53, 30, 0.18),
    inset 0 0 0 5px rgba(255, 253, 248, 0.38),
    inset 0 0 0 6px rgba(212, 198, 173, 0.32);
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 480px) {
  .music-card {
    grid-template-columns: 1fr;
  }
}

.vinyl-sleeve-wrap {
  position: relative;
  width: 136px;
  height: 136px;
}

.vinyl-disc {
  position: absolute;
  top: 7px;
  right: -8px;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f7e8b8 0 15%, #2f2a22 16% 18%, #24201a 19% 65%, #3d362d 66% 68%, #1e1b16 69% 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.album-cover-box {
  position: relative;
  width: 136px;
  height: 136px;
  padding: 4px;
  background-color: #fffdf8;
  border-radius: 6px;
  border: 1px solid #dcd0ba;
  overflow: hidden;
  z-index: 2;
  box-shadow: 2px 6px 14px rgba(68, 53, 30, 0.16);
}

.album-cover-box img,
.album-cover-box svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 3px;
}

.music-card:hover .vinyl-disc,
.music-card.is-playing .vinyl-disc {
  transform: translateX(22px);
}

@media (prefers-reduced-motion: no-preference) {
  .music-card.is-playing .vinyl-disc {
    animation: vinyl-spin 4s linear infinite;
  }
  @keyframes vinyl-spin {
    from { transform: translateX(22px) rotate(0deg); }
    to { transform: translateX(22px) rotate(360deg); }
  }
}

.music-info h3 {
  margin: 2px 0 4px;
  font-family: var(--font-zh-craft);
  font-size: 1.08rem;
}

.music-tag {
  font-family: var(--font-serif-num);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--accent-sage-dark);
}

.music-quote {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  font-style: italic;
}

.music-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-sample-btn {
  appearance: none;
  border: 1px solid var(--accent-butter);
  background-color: var(--bg-butter-soft);
  color: #5e420b;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.play-sample-btn.is-active {
  background-color: var(--accent-sage-dark);
  border-color: var(--accent-sage-dark);
  color: #fffdf8;
}

/* =========================================================
   04 / 粉丝二创双列画廊
   ========================================================= */
.fanart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 28px);
}

@media (max-width: 560px) {
  .fanart-grid {
    gap: 14px;
  }
}

.fanart-card {
  position: relative;
  appearance: none;
  border: 1px solid #dfd2bb;
  background-color: #fffdf8;
  padding: 14px 14px 20px;
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 14px 28px -14px rgba(68, 53, 30, 0.2),
    0 4px 10px -4px rgba(68, 53, 30, 0.08);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.fanart-card:hover,
.fanart-card:focus-visible {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-paper);
  outline: 2px solid var(--accent-sage);
  outline-offset: 2px;
}

.fanart-thumb {
  aspect-ratio: 3 / 4;
  background-color: var(--bg-cream);
  overflow: hidden;
  border: 1px solid #ede4d4;
}

.fanart-thumb img,
.fanart-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.fanart-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fanart-code {
  font-family: var(--font-serif-num);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.fanart-author {
  font-size: 0.84rem;
  color: var(--accent-sage-dark);
  font-weight: 600;
}

/* =========================================================
   05 / 手账海报生成器工作台
   ========================================================= */
.studio-workspace {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(22px, 4vw, 38px);
  align-items: start;
}

@media (max-width: 820px) {
  .studio-workspace {
    grid-template-columns: 1fr;
  }
}

.studio-canvas-frame {
  position: relative;
  background-color: #fcf9f2;
  background-image:
    linear-gradient(150deg, rgba(255, 253, 248, 0.62), rgba(246, 239, 224, 0.42)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  border: 1px solid #dfd2bb;
  padding: 16px;
  box-shadow: var(--shadow-paper);
}

#poster-canvas {
  width: 100%;
  height: auto;
  display: block;
  background-color: var(--bg-parchment);
  border: 1px solid #e6dac4;
}

.canvas-tip {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.studio-controls-col {
  background-color: #fcf9f2;
  background-image:
    linear-gradient(150deg, rgba(255, 253, 248, 0.68), rgba(246, 239, 224, 0.44)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  border: 1px solid #dfd2bb;
  border-radius: 6px;
  padding: 24px;
  box-shadow:
    0 12px 26px -14px rgba(68, 53, 30, 0.18),
    inset 0 0 0 6px rgba(255, 253, 248, 0.4),
    inset 0 0 0 7px rgba(212, 198, 173, 0.34);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--ink-primary);
  font-family: var(--font-zh-craft);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tpl-btn,
.preset-photo-btn,
.sticker-chip,
.upload-photo-btn {
  appearance: none;
  border: 1px solid var(--border-paper);
  background-color: var(--bg-parchment);
  color: var(--ink-primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-family: var(--font-zh-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tpl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid;
  flex: none;
}

.tpl-btn.is-active,
.preset-photo-btn.is-active {
  background-color: var(--bg-butter-soft);
  border-color: var(--accent-butter);
  font-weight: 600;
}

.photo-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-photo-btn {
  background-color: var(--accent-sage-pale);
  border-style: dashed;
  border-color: var(--accent-sage);
  color: var(--accent-sage-dark);
  font-weight: 600;
}

.sticker-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sticker-chip {
  border-radius: 999px;
}

.sticker-chip.is-active {
  background-color: var(--accent-sage-dark);
  border-color: var(--accent-sage-dark);
  color: #fffdf8;
}

.input-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.field-label input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-paper);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--ink-primary);
  font-family: var(--font-zh-body);
  font-size: 0.92rem;
}

.field-label input:focus {
  outline: 2px solid var(--accent-butter);
  border-color: var(--accent-butter);
}

.primary-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent-sage-dark), var(--accent-sage));
  color: #fffdf8;
  font-family: var(--font-zh-body);
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(69, 89, 66, 0.45);
  transition: transform 0.2s ease;
}

.primary-export-btn:hover {
  transform: translateY(-2px);
}

/* 页脚 */
.site-footer {
  max-width: 980px;
  margin: 20px auto 0;
  padding: 0 20px 24px;
  text-align: center;
}

.footer-lace-top {
  height: 30px;
  margin-bottom: 18px;
  opacity: 0.9;
  background-image: url("assets/lace_band.webp");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 30px;
  transform: scaleY(-1);
}

.footer-hand {
  margin: 0 0 6px;
  color: var(--accent-butter-deep);
  font-size: 0.95rem;
}

.footer-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-credit-link {
  color: var(--accent-sage-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(129, 151, 125, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-credit-link:hover {
  color: var(--accent-butter-deep);
  text-decoration-color: var(--accent-butter-deep);
}

/* =========================================================
   原生模态框 <dialog> + Toast
   ========================================================= */
.craft-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(500px, 92vw);
  width: 100%;
  margin: auto;
  overflow: visible;
}

.craft-dialog::backdrop {
  background-color: rgba(47, 42, 34, 0.64);
}

.dialog-paper-body {
  position: relative;
  background-color: #fcf9f2;
  background-image:
    linear-gradient(150deg, rgba(255, 253, 248, 0.72), rgba(247, 240, 226, 0.48)),
    url("assets/cotton_paper_tile.jpg");
  background-size: auto, 200px auto;
  border: 1px solid #dfd2bb;
  border-radius: 8px;
  padding: 28px 24px 24px;
  box-shadow:
    0 24px 52px rgba(42, 34, 22, 0.28),
    inset 0 0 0 6px rgba(255, 253, 248, 0.4),
    inset 0 0 0 7px rgba(212, 198, 173, 0.35);
  text-align: center;
}

.dialog-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-paper);
  background-color: var(--bg-parchment);
  color: var(--ink-primary);
  cursor: pointer;
  font-size: 0.95rem;
}

.dialog-art-stage {
  max-width: 320px;
  margin: 0 auto 14px;
  border: 1px solid var(--border-paper);
  background-color: var(--bg-cream);
}

.dialog-art-stage img,
.dialog-art-stage svg {
  width: 100%;
  height: auto;
  display: block;
}

.dialog-title {
  margin: 0 0 6px;
  font-family: var(--font-zh-craft);
  font-size: 1.15rem;
}

.dialog-author {
  margin: 0 0 6px;
  color: var(--accent-sage-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.dialog-note {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.dialog-copyright {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.generated-poster-wrap img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-paper);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.toast-msg {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  background-color: var(--ink-primary);
  color: var(--bg-ivory);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.toast-msg[hidden] {
  display: none;
}
