/* ==========================================================================
   米柚星球 · Alpha 视觉重构层  (miyou-alpha.css)
   追加于 dist/assets/index-GsU08t9R.css 末尾，或作为独立 <link> 在其后加载。
   设计主线：三果栗子喵。奶油纸底 + 暖橙主调 + 星空紫夜色，
   所有卡片微玻璃拟态，拍立得 3D 磁吸，一只猫贯穿宠物 / 游戏 / 光标粒子。
   命名规则：新组件一律 .mya-* 前缀，对既有类只做定向覆盖。
   ========================================================================== */

:root {
  /* 主色 —— 与 bundle 既有 --mikan/--paper-solid 同源，向上扩展 */
  --mya-cream:      #fdfaf3;
  --mya-cream-deep: #f6efe2;
  --mya-mikan:      #ff9d76;
  --mya-mikan-deep: #ff7b44;
  --mya-ink:        #4a3324;
  --mya-ink-soft:   #8a684f;

  /* 星空紫 —— 只用于夜色场景与描边高光，不铺满 */
  --mya-night-1:    #2a1b4a;
  --mya-night-2:    #4b2f7a;
  --mya-night-3:    #7c5cc4;

  /* 三果色 */
  --mya-plum:       #b4548f;   /* 李子 */
  --mya-chestnut:   #a4682f;   /* 栗子 */
  --mya-pear:       #bcd167;   /* 梨子 */

  /* 猫 */
  --mya-cat-fur:    #fff4e2;
  --mya-cat-shade:  #f0d5b4;
  --mya-cat-stripe: #d99a5b;
  --mya-cat-line:   #6b4a33;
  --mya-cat-blush:  #ff9ab0;

  /* 玻璃与投影 */
  --mya-glass:      rgba(255, 252, 245, .62);
  --mya-glass-line: rgba(255, 255, 255, .78);
  --mya-blur:       blur(12px) saturate(1.12);
  --mya-lift:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 10px 22px rgba(150, 96, 52, .13),
    0 26px 54px rgba(120, 74, 40, .12);
  --mya-lift-hi:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 16px 30px rgba(150, 96, 52, .18),
    0 38px 74px rgba(120, 74, 40, .18);

  --mya-ease: cubic-bezier(.2, .82, .2, 1);
}

/* ==========================================================================
   1. 玻璃拟态 —— 覆盖既有卡片外壳
   ========================================================================== */

.sticker-card,
.cartoon-card,
.memory-card,
.timeline-card,
.heart-card,
.profile-card,
.footprint-map-card,
.pet-panel,
.calendar-card,
.daily-panel {
  -webkit-backdrop-filter: var(--mya-blur);
  backdrop-filter: var(--mya-blur);
  background-image: linear-gradient(158deg, rgba(255,255,255,.50), rgba(255,246,232,.16));
  box-shadow: var(--mya-lift);
  transition:
    box-shadow .34s var(--mya-ease),
    transform .34s var(--mya-ease),
    border-color .34s var(--mya-ease);
}

/* 渐变描边：用 mask 挖空，只留 1.5px 的彩色边，不吃性能 */
.sticker-card::after,
.footprint-map-card::after,
.pet-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: linear-gradient(140deg,
    rgba(255, 157, 118, .72),
    rgba(255, 233, 168, .34) 38%,
    rgba(124, 92, 196, .34) 72%,
    rgba(255, 157, 118, .58));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .72;
}

.sticker-card:hover,
.footprint-map-card:hover {
  box-shadow: var(--mya-lift-hi);
}

/* ==========================================================================
   2. 照片墙 —— 拍立得随机倾斜 + 3D 磁吸抬升 + Lomo 滤镜
   真实类名：.photo-wall-grid > .wall-photo-card（bundle 已带 --tilt 变量）
   ========================================================================== */

.photo-wall-grid { perspective: 1200px; }

.photo-wall-grid .wall-photo-card {
  --tilt: 0deg;
  transform-style: preserve-3d;
  transition:
    transform .42s var(--mya-ease),
    rotate .42s var(--mya-ease),
    box-shadow .42s var(--mya-ease),
    filter .42s var(--mya-ease);
  will-change: transform;
}

/* 依次错开倾斜角，落在 -3deg ~ 3deg 之间，不用 JS 随机，刷新后角度稳定 */
.photo-wall-grid .wall-photo-card:nth-child(6n+1) { --tilt: -2.6deg; }
.photo-wall-grid .wall-photo-card:nth-child(6n+2) { --tilt:  1.8deg; }
.photo-wall-grid .wall-photo-card:nth-child(6n+3) { --tilt: -1.2deg; }
.photo-wall-grid .wall-photo-card:nth-child(6n+4) { --tilt:  2.9deg; }
.photo-wall-grid .wall-photo-card:nth-child(6n+5) { --tilt: -3deg;   }
.photo-wall-grid .wall-photo-card:nth-child(6n+6) { --tilt:  1.1deg; }
.photo-wall-grid .wall-photo-card { rotate: var(--tilt); }

.photo-wall-grid .wall-photo-card:hover,
.photo-wall-grid .wall-photo-card:focus-visible {
  transform: translateY(-6px) scale(1.03);
  rotate: 0deg;
  box-shadow:
    0 22px 34px rgba(120, 74, 40, .2),
    0 46px 78px rgba(120, 74, 40, .16);
  filter: saturate(1.06) contrast(1.02);
  z-index: 3;
}

/* Lomo：暗角 + 轻微色偏，只在图片上，不吃相框 */
.photo-wall-grid .wall-photo-card img,
.mini-framed-photo img {
  transition: filter .42s var(--mya-ease), transform .42s var(--mya-ease);
}
.photo-wall-grid .wall-photo-card:hover img { transform: scale(1.035); }

.mya-lomo .photo-wall-grid .wall-photo-card img,
.mya-lomo .photo-lightbox-card img {
  filter: saturate(1.14) contrast(1.08) sepia(.12) brightness(1.02);
}
.mya-lomo .photo-wall-grid .wall-photo-card::after {
  content: "";
  position: absolute;
  inset: 16px 16px 26px;
  z-index: 2;
  border-radius: 12px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 46%, rgba(58, 32, 12, .30) 100%);
  mix-blend-mode: multiply;
}

/* Lightbox 大图：加一枚滤镜开关按钮的落位 */
.photo-lightbox-card { background: rgba(255, 252, 245, .90); }
.mya-lomo-toggle {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  top: clamp(14px, 3vw, 30px);
  z-index: 2700;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--mya-ink);
  background: rgba(255, 250, 240, .92);
  border: 2px solid rgba(255, 157, 118, .5);
  box-shadow: 0 8px 20px rgba(60, 30, 10, .28);
  font-size: .9rem;
}

/* ==========================================================================
   3. 三果栗子喵 —— 纯 CSS 贴在既有 .pet-sprite 上，不改 React DOM
   bundle 的 .pet-sprite 是 8×8 bead 网格，这里在其上叠猫耳 / 果帽 / 尾巴 / 爪
   ========================================================================== */

.pet-scene { position: relative; }

.pet-sprite {
  position: relative;
  overflow: visible;
  transform-origin: 50% 92%;
}

/* 猫耳 —— 两只，用一个伪元素画左耳、阴影投出右耳 */
.pet-sprite::before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 12px;
  top: -13px;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 19px solid var(--mya-cat-fur);
  filter:
    drop-shadow(0 -1px 0 var(--mya-cat-line))
    drop-shadow(58px 0 0 var(--mya-cat-fur));
  transform-origin: 50% 100%;
  transition: transform .3s var(--mya-ease);
}

/* 栗子小帽 —— 戴在头顶正中 */
.pet-sprite::after {
  content: "🌰";
  position: absolute;
  z-index: 4;
  left: 50%;
  top: -26px;
  translate: -50% 0;
  font-size: 22px;
  filter: drop-shadow(0 3px 4px rgba(90, 56, 24, .3));
  animation: mya-hat-bob 3.4s ease-in-out infinite;
}

/* 尾巴 + 三果挂饰，挂在 .pet-scene 上，避免和 sprite 的伪元素抢位 */
.pet-scene::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(50% + 44px);
  top: 30px;
  width: 40px;
  height: 44px;
  border: 7px solid var(--mya-cat-stripe);
  border-color: var(--mya-cat-stripe) transparent transparent var(--mya-cat-stripe);
  border-radius: 60% 0 0 0;
  transform-origin: 0 100%;
  animation: mya-tail-sway 2.6s ease-in-out infinite;
}
.pet-scene::after {
  content: "🍑 🌰 🍐";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 6px;
  translate: -50% 0;
  letter-spacing: .5em;
  font-size: .78rem;
  opacity: .34;
  pointer-events: none;
}

/* 开心：伸爪 + 眯眼 + 冒小红心 */
.pet-sprite.is-happy { animation: mya-cat-happy .72s var(--mya-ease); }
.pet-sprite.is-happy::before { transform: rotate(-6deg) scaleY(1.14); }

.pet-panel .mya-cat-hearts,
.pet-panel .mya-cat-paw {
  position: absolute;
  pointer-events: none;
  z-index: 6;
}
.mya-cat-hearts {
  left: 50%;
  top: 24%;
  translate: -50% 0;
  font-size: 1.3rem;
  animation: mya-hearts-float 1.15s var(--mya-ease) forwards;
}
.mya-cat-paw {
  left: 50%;
  top: 40%;
  margin-left: 26px;
  font-size: 1.5rem;
  animation: mya-paw-swipe .62s var(--mya-ease) forwards;
}

/* 拒绝：耳朵耷拉 + 推盘子 */
.pet-sprite.is-refusing::before {
  transform: rotate(-30deg) translateY(6px) scaleY(.7);
}
.pet-sprite.is-refusing { animation: mya-cat-refuse .9s var(--mya-ease); }

@keyframes mya-hat-bob   { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(5deg); } }
@keyframes mya-tail-sway { 0%,100% { transform: rotate(-14deg); } 50% { transform: rotate(18deg); } }
@keyframes mya-cat-happy {
  0%   { transform: translateY(0) scale(1); }
  35%  { transform: translateY(-9px) scale(1.07) rotate(-3deg); }
  65%  { transform: translateY(-3px) scale(1.03) rotate(3deg); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes mya-cat-refuse {
  0%,100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-4deg); }
  45% { transform: translateX(6px)  rotate(3deg); }
  70% { transform: translateX(-4px) rotate(-2deg); }
}
@keyframes mya-hearts-float {
  0%   { opacity: 0; transform: translateY(6px) scale(.5); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-52px) scale(1.25); }
}
@keyframes mya-paw-swipe {
  0%   { opacity: 0; transform: translateX(-14px) rotate(-30deg) scale(.6); }
  40%  { opacity: 1; transform: translateX(6px) rotate(12deg) scale(1.1); }
  100% { opacity: 0; transform: translateX(22px) rotate(26deg) scale(.85); }
}

/* ==========================================================================
   4. 足迹地图 —— 路线脉冲流动 + 已去/梦想城市分级
   真实类名：.map-canvas / .map-links line / .map-dot / .map-dot.is-dream
   ========================================================================== */

.map-canvas { overflow: hidden; }

.map-links line {
  stroke: url(#myaRouteGradient, rgba(255, 157, 118, .85));
  stroke: rgba(255, 140, 92, .85);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 2.4 3.2;
  filter: drop-shadow(0 0 2px rgba(255, 140, 92, .8));
  animation: mya-route-flow 2.4s linear infinite;
}
@keyframes mya-route-flow { to { stroke-dashoffset: -22; } }

/* 已去过的城市：暖橙实心 + 呼吸光晕 */
.map-dot:not(.is-dream) .map-dot-icon {
  background: linear-gradient(145deg, #ffd9a8, var(--mya-mikan));
  box-shadow:
    inset 0 -4px 0 rgba(196, 96, 44, .3),
    0 0 0 0 rgba(255, 157, 118, .5),
    0 4px 0 rgba(196, 96, 44, .24);
  animation: mya-city-pulse 3.2s ease-in-out infinite;
}
.map-dot.main:not(.is-dream) .map-dot-icon {
  animation-duration: 2.2s;
  box-shadow:
    inset 0 -4px 0 rgba(196, 96, 44, .34),
    0 0 0 6px rgba(255, 157, 118, .2),
    0 4px 0 rgba(196, 96, 44, .28);
}
@keyframes mya-city-pulse {
  0%, 100% { box-shadow: inset 0 -4px 0 rgba(196,96,44,.3), 0 0 0 0 rgba(255,157,118,.55), 0 4px 0 rgba(196,96,44,.24); }
  60%      { box-shadow: inset 0 -4px 0 rgba(196,96,44,.3), 0 0 0 14px rgba(255,157,118,0), 0 4px 0 rgba(196,96,44,.24); }
}

/* 梦想城市：虚线描边 + 紫色微光，明确"还没去" */
.map-dot.is-dream .map-dot-icon {
  border: 2px dashed rgba(124, 92, 196, .66);
  background: rgba(250, 246, 255, .86);
  box-shadow: 0 0 14px rgba(124, 92, 196, .28);
  animation: mya-dream-glow 4.6s ease-in-out infinite;
}
.map-dot.is-dream small { color: var(--mya-night-3); }
@keyframes mya-dream-glow {
  0%, 100% { opacity: .74; }
  50%      { opacity: 1; }
}

.map-dot small {
  background: rgba(255, 252, 245, .92);
  box-shadow: 0 2px 6px rgba(120, 74, 40, .14);
  font-weight: 700;
}

/* ==========================================================================
   5. 猫爪与三果粒子
   ========================================================================== */

.mya-particle-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.mya-particle {
  position: fixed;
  display: inline-grid;
  place-items: center;
  font-size: var(--s, 15px);
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 220, 180, .9));
  animation: mya-particle-drift var(--dur, 1s) var(--mya-ease) forwards;
}
@keyframes mya-particle-drift {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0); }
  16%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(var(--rot, 180deg)); }
}

/* ==========================================================================
   6. 霸道邀请信 overlay（不触碰原信 DOM，原「点名字解锁」逻辑完全保留）
   ========================================================================== */

.mya-invite {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 44px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 226, 176, .5), transparent 46%),
    radial-gradient(circle at 82% 84%, rgba(124, 92, 196, .3), transparent 48%),
    rgba(38, 22, 12, .58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: mya-fade-in .4s var(--mya-ease) both;
}
.mya-invite.is-leaving { animation: mya-fade-out .5s var(--mya-ease) both; }

.mya-invite-paper {
  position: relative;
  width: min(720px, 100%);
  margin: auto;
  padding: clamp(28px, 5.5vw, 56px) clamp(22px, 5vw, 52px) clamp(26px, 5vw, 44px);
  border-radius: 26px;
  color: var(--mya-ink);
  background:
    linear-gradient(90deg, rgba(150, 90, 50, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(#fffdf8, #fff6e8 58%, #ffeed9);
  border: 1px solid rgba(150, 100, 60, .2);
  box-shadow: 0 34px 90px rgba(60, 34, 18, .34), inset 0 0 0 9px rgba(255,255,255,.42);
  animation: mya-paper-in .68s var(--mya-ease) both;
}
.mya-invite-paper::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 46px;
  width: 116px;
  height: 32px;
  rotate: -5deg;
  border-radius: 7px;
  background: repeating-linear-gradient(45deg, rgba(226,194,137,.62) 0 9px, rgba(255,245,210,.62) 9px 18px);
  border: 1px solid rgba(115, 82, 48, .14);
}

.mya-invite-seal {
  position: absolute;
  right: clamp(16px, 4vw, 34px);
  top: clamp(16px, 4vw, 30px);
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  gap: 1px;
  border-radius: 50%;
  rotate: 9deg;
  color: #fff6ea;
  text-align: center;
  line-height: 1.1;
  font-size: .74rem;
  background: radial-gradient(circle at 34% 24%, #ffb98a, #c05a38 62%, #8e3829);
  box-shadow: inset -6px -6px 14px rgba(85, 30, 20, .3), 0 8px 20px rgba(120, 55, 40, .3);
}
.mya-invite-seal b { font-size: 1.15rem; }

.mya-invite-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #9a5a33;
  background: rgba(255, 240, 210, .9);
  border: 1px dashed rgba(154, 90, 51, .34);
  letter-spacing: .14em;
  font-size: .78rem;
}
.mya-invite-paper h2 {
  margin: 0 0 18px;
  color: #4a2f20;
  font-size: clamp(1.9rem, 5.6vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: .02em;
}
.mya-invite-body p {
  margin: 0 0 1.05em;
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  line-height: 2.02;
  color: #4f382a;
  opacity: 0;
  animation: mya-rise .56s calc(.2s + var(--i, 0) * .11s) var(--mya-ease) both;
}
.mya-invite-body em {
  font-style: normal;
  padding: 1px 5px;
  border-radius: 6px;
  background: linear-gradient(transparent 62%, rgba(255, 157, 118, .42) 62%);
  font-weight: 700;
}
.mya-invite-sign {
  margin-top: 1.4em !important;
  text-align: right;
  color: #8a4d2c;
  font-size: 1.06rem;
}

.mya-invite-ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 22px 0 4px;
  padding: 16px 18px;
  border-radius: 18px;
  color: #ffeec4;
  background:
    radial-gradient(circle at 76% 16%, rgba(255, 222, 100, .5), transparent 34%),
    linear-gradient(135deg, #5f1819, #9b3723 52%, #3b201d);
  box-shadow: inset 0 0 0 2px rgba(255, 222, 142, .22), 0 12px 26px rgba(70, 30, 22, .32);
  opacity: 0;
  animation: mya-rise .6s .9s var(--mya-ease) both;
}
.mya-invite-ticket b { display: block; font-size: 1.24rem; color: #fff3c4; margin-bottom: 4px; }
.mya-invite-ticket small { display: block; opacity: .88; line-height: 1.6; }
.mya-invite-ticket i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 222, 142, .16);
  border: 1px dashed rgba(255, 222, 142, .4);
  font-size: 1.7rem;
}

.mya-invite-enter {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 1.06rem;
  background: linear-gradient(135deg, var(--mya-mikan-deep), #ff7fa3 66%, #ffc84d);
  box-shadow: 0 9px 0 rgba(200, 88, 56, .26), 0 18px 34px rgba(255, 123, 68, .3);
  opacity: 0;
  animation: mya-rise .6s 1.05s var(--mya-ease) both;
}
.mya-invite-note {
  margin: 12px 0 0;
  text-align: center;
  color: #9c6a41;
  font-size: .84rem;
  opacity: 0;
  animation: mya-rise .6s 1.2s var(--mya-ease) both;
}

@keyframes mya-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes mya-fade-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes mya-paper-in {
  from { opacity: 0; transform: translateY(26px) rotateX(7deg) scale(.96); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes mya-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   7. 星轨版块（回忆 / 纪念日 / 心动 / 足迹的扩充展示）
   ========================================================================== */

.mya-orbit { width: min(1160px, 100%); margin: 0 auto; padding: 10px 0 48px; }

.mya-orbit-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 26px;
  text-align: center;
}
.mya-orbit-head span {
  padding: 5px 13px;
  border-radius: 999px;
  color: #9a5a33;
  background: rgba(255, 240, 210, .8);
  border: 1px dashed rgba(154, 90, 51, .3);
  letter-spacing: .16em;
  font-size: .8rem;
}
.mya-orbit-head h3 {
  margin: 6px 0 0;
  color: var(--mya-mikan-deep);
  font-size: clamp(1.9rem, 5.4vw, 3.2rem);
  text-shadow: 0 3px 0 rgba(255, 226, 109, .8);
}
.mya-orbit-head p { margin: 4px 0 0; color: var(--mya-ink-soft); max-width: 680px; }

.mya-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 22px;
}
.mya-tabs button {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--mya-ink);
  background: rgba(255, 252, 245, .8);
  border: 2px solid rgba(255, 255, 255, .74);
  box-shadow: 0 5px 0 rgba(255, 211, 87, .22);
  font-size: .95rem;
}
.mya-tabs button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--mya-mikan-deep), #ff9d76);
  box-shadow: 0 6px 0 rgba(200, 88, 56, .24);
}

.mya-panel[hidden] { display: none; }

/* 时间轴：左侧一条脉冲光带，节点按顺序点亮 */
.mya-timeline {
  position: relative;
  display: grid;
  gap: 16px;
  padding-left: clamp(26px, 5vw, 44px);
}
.mya-timeline::before {
  content: "";
  position: absolute;
  left: clamp(9px, 2vw, 18px);
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--mya-mikan), rgba(124, 92, 196, .5), var(--mya-pear));
  opacity: .5;
}

.mya-node {
  position: relative;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--mya-glass);
  -webkit-backdrop-filter: var(--mya-blur);
  backdrop-filter: var(--mya-blur);
  border: 1.5px solid var(--mya-glass-line);
  box-shadow: var(--mya-lift);
  transition: transform .3s var(--mya-ease), box-shadow .3s var(--mya-ease);
}
.mya-node:hover { transform: translateX(4px); box-shadow: var(--mya-lift-hi); }
.mya-node::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(21px, 4.1vw, 34px));
  top: 24px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mya-mikan);
  box-shadow: 0 0 0 4px rgba(255, 157, 118, .24);
}
.mya-node.is-star::before { background: var(--mya-plum); box-shadow: 0 0 0 5px rgba(180, 84, 143, .26); }

.mya-node-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.mya-node-date {
  padding: 3px 10px;
  border-radius: 999px;
  color: #8a4d2c;
  background: rgba(255, 233, 168, .6);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.mya-node-place { color: var(--mya-ink-soft); font-size: .84rem; }
.mya-node h4 { margin: 0 0 6px; color: #b4562c; font-size: 1.22rem; }
.mya-node p  { margin: 0; color: #6a5140; line-height: 1.9; }

.mya-node-shots {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.mya-node-shots::-webkit-scrollbar { display: none; }
.mya-node-shots img {
  flex: 0 0 auto;
  width: 108px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(120, 74, 40, .2);
  cursor: zoom-in;
  transition: transform .28s var(--mya-ease);
}
.mya-node-shots img:hover { transform: translateY(-3px) scale(1.05); }

/* 纪念日 / 心动 网格 */
.mya-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.mya-chip {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: var(--mya-glass);
  -webkit-backdrop-filter: var(--mya-blur);
  backdrop-filter: var(--mya-blur);
  border: 1.5px solid var(--mya-glass-line);
  box-shadow: var(--mya-lift);
  transition: transform .3s var(--mya-ease), box-shadow .3s var(--mya-ease);
}
.mya-chip:hover { transform: translateY(-5px); box-shadow: var(--mya-lift-hi); }
.mya-chip span  { font-size: 2rem; }
.mya-chip b     { display: block; margin: 6px 0 3px; color: #b4562c; font-size: 1.08rem; }
.mya-chip small { display: block; color: var(--mya-ink-soft); line-height: 1.7; }
.mya-chip i {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 233, 168, .7);
  color: #8a4d2c;
  font-style: normal;
  font-size: .78rem;
  font-weight: 700;
}

/* ==========================================================================
   8. 栗子猫大作战（接果小游戏）
   ========================================================================== */

.mya-arcade {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: var(--mya-glass);
  -webkit-backdrop-filter: var(--mya-blur);
  backdrop-filter: var(--mya-blur);
  border: 1.5px solid var(--mya-glass-line);
  box-shadow: var(--mya-lift);
}
.mya-arcade-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  color: #8a4d2c;
  font-weight: 700;
}
.mya-arcade-top span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 233, 168, .66);
  font-size: .9rem;
}

.mya-stage {
  position: relative;
  height: clamp(300px, 52vh, 440px);
  border-radius: 20px;
  overflow: hidden;
  touch-action: none;
  cursor: none;
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 240, 190, .8), transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(124, 92, 196, .18), transparent 40%),
    linear-gradient(180deg, #fffaf0, #ffeedd 62%, #ffe3ea);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .74), inset 0 -18px 34px rgba(255, 180, 120, .18);
}
.mya-stage:focus-visible { outline: 3px solid rgba(255, 157, 118, .8); outline-offset: 3px; }

.mya-stage .mya-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(255, 210, 160, .28), rgba(255, 180, 120, .5));
  border-top: 2px dashed rgba(196, 120, 70, .34);
}

.mya-fall {
  position: absolute;
  top: -34px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 24px;
  will-change: transform;
  filter: drop-shadow(0 3px 5px rgba(140, 90, 50, .26));
}
.mya-fall.is-bad { filter: drop-shadow(0 3px 5px rgba(90, 120, 50, .3)) saturate(.85); }

/* 舞台上的猫：CSS 手绘，和宠物区同一只 */
.mya-cat {
  position: absolute;
  bottom: 30px;
  width: 66px;
  height: 58px;
  transform: translateX(-50%);
  transition: transform .07s linear;
  will-change: transform;
}
.mya-cat-head {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 56px;
  height: 48px;
  translate: -50% 0;
  border-radius: 48% 48% 46% 46% / 52% 52% 48% 48%;
  background: linear-gradient(160deg, var(--mya-cat-fur), var(--mya-cat-shade));
  border: 2.5px solid var(--mya-cat-line);
}
.mya-cat-head::before,
.mya-cat-head::after {
  content: "";
  position: absolute;
  top: -14px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid var(--mya-cat-fur);
  filter: drop-shadow(0 -2px 0 var(--mya-cat-line));
}
.mya-cat-head::before { left: 2px;  rotate: -8deg; }
.mya-cat-head::after  { right: 2px; rotate:  8deg; }

.mya-cat-face {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 40px;
  translate: -50% 0;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.mya-cat-face i {
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: var(--mya-cat-line);
  transition: height .16s ease, border-radius .16s ease;
}
.mya-cat.is-squint .mya-cat-face i { height: 3px; border-radius: 3px; }
.mya-cat-blush {
  position: absolute;
  z-index: 2;
  top: 27px;
  width: 11px;
  height: 6px;
  border-radius: 50%;
  background: var(--mya-cat-blush);
  opacity: .74;
}
.mya-cat-blush.l { left: 6px; }
.mya-cat-blush.r { right: 6px; }
.mya-cat-hat {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -22px;
  translate: -50% 0;
  font-size: 19px;
  filter: drop-shadow(0 2px 3px rgba(90, 56, 24, .3));
}
.mya-cat.is-catch { animation: mya-cat-hop .34s var(--mya-ease); }
@keyframes mya-cat-hop {
  0%,100% { transform: translateX(-50%) translateY(0) scale(1); }
  45%     { transform: translateX(-50%) translateY(-11px) scale(1.08, .94); }
}

.mya-pop {
  position: absolute;
  z-index: 5;
  color: #b4562c;
  font-weight: 900;
  font-size: 1rem;
  pointer-events: none;
  text-shadow: 0 2px 0 #fff;
  animation: mya-pop-up .78s var(--mya-ease) forwards;
}
.mya-pop.is-bad { color: #7c8b3d; }
@keyframes mya-pop-up {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  25%  { opacity: 1; transform: translate(-50%, -14px) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(.9); }
}

.mya-arcade-mask {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: rgba(255, 250, 240, .84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mya-arcade-mask strong { color: #b4562c; font-size: clamp(1.3rem, 4vw, 1.9rem); }
.mya-arcade-mask p { margin: 0; max-width: 380px; color: var(--mya-ink-soft); line-height: 1.85; }
.mya-arcade-mask button {
  padding: 12px 26px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--mya-mikan-deep), #ff7fa3 68%, #ffc84d);
  box-shadow: 0 8px 0 rgba(200, 88, 56, .24);
}

/* ==========================================================================
   9. 霸道心愿卡池
   ========================================================================== */

.mya-wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
  gap: 14px;
}
.mya-wish {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 18px 16px 16px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 252, 245, .92), rgba(255, 236, 214, .74));
  border: 1.5px solid var(--mya-glass-line);
  box-shadow: var(--mya-lift);
  transition: transform .3s var(--mya-ease), box-shadow .3s var(--mya-ease), filter .3s var(--mya-ease);
}
.mya-wish::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--mya-mikan), var(--mya-plum));
}
.mya-wish:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: var(--mya-lift-hi); }
.mya-wish span  { font-size: 1.9rem; }
.mya-wish b     { color: #b4562c; font-size: 1.05rem; }
.mya-wish small { color: var(--mya-ink-soft); line-height: 1.75; }
.mya-wish.is-locked { filter: grayscale(.6) opacity(.62); }
.mya-wish.is-locked::after {
  content: "🔒 接住 " attr(data-need) " 颗解锁";
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(80, 56, 36, .7);
  color: #fff6e8;
  font-size: .72rem;
}
.mya-wish-use {
  justify-self: start;
  margin-top: 4px;
  padding: 7px 15px;
  border-radius: 999px;
  color: #fff;
  font-size: .86rem;
  background: linear-gradient(135deg, var(--mya-mikan-deep), #ff9d76);
  box-shadow: 0 5px 0 rgba(200, 88, 56, .22);
}
.mya-wish.is-used .mya-wish-use { filter: grayscale(1); opacity: .6; }

/* ==========================================================================
   10. 移动端：彻底堵住横向溢出 + 触控回弹
   ========================================================================== */

html, body { max-width: 100%; }
body { overflow-x: hidden; overscroll-behavior-y: contain; }

@media (max-width: 860px) {
  /* bundle 里若干绝对定位元素在窄屏会顶出视口，这里统一收回 */
  .film-strip,
  .floating-letter-decor,
  .soft-cloud { display: none !important; }

  .page-shell { padding-inline: clamp(10px, 3.4vw, 16px); }

  .mya-orbit,
  .content-section,
  .hero-section { max-width: 100%; }

  .mya-node-shots img { width: 92px; height: 72px; }

  .pet-scene::before { left: calc(50% + 38px); }
}

@media (max-width: 560px) {
  .mya-invite-paper { padding: 26px 18px 22px; border-radius: 20px; }
  .mya-invite-seal { position: static; margin: 0 0 12px auto; width: 62px; height: 62px; }
  .mya-invite-ticket { grid-template-columns: 1fr; }
  .mya-invite-ticket i { width: 46px; height: 46px; font-size: 1.4rem; }

  .mya-grid,
  .mya-wish-grid { grid-template-columns: 1fr; }

  .mya-stage { height: clamp(280px, 46vh, 360px); }
  .mya-tabs button { padding: 8px 13px; font-size: .88rem; }

  /* 图片与卡片一律不许超出 */
  img, video, svg, canvas, iframe { max-width: 100%; height: auto; }
  .sticker-card, .cartoon-card, .mya-node, .mya-chip { max-width: 100%; }
}

/* 触控回弹：按下时轻微内陷，抬手回位 */
@media (hover: none) {
  .mya-tabs button:active,
  .mya-wish-use:active,
  .mya-arcade-mask button:active,
  .mya-invite-enter:active,
  .pet-feed-button:active { transform: scale(.955); }
  .mya-tabs button,
  .mya-wish-use,
  .mya-arcade-mask button,
  .mya-invite-enter,
  .pet-feed-button { transition: transform .14s var(--mya-ease); }
}

/* ==========================================================================
   11. 无障碍与降级
   ========================================================================== */

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

:where(.mya-tabs button, .mya-wish-use, .mya-invite-enter, .mya-arcade-mask button):focus-visible {
  outline: 3px solid rgba(255, 123, 68, .7);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mya-particle-layer { display: none; }
  .map-links line,
  .map-dot .map-dot-icon,
  .pet-sprite::after,
  .pet-scene::before { animation: none !important; }
  .mya-invite-body p,
  .mya-invite-ticket,
  .mya-invite-enter,
  .mya-invite-note { opacity: 1; animation: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* 不支持 backdrop-filter 时退回实色，避免糊成一片 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sticker-card, .mya-node, .mya-chip, .mya-arcade, .mya-invite {
    background-color: rgba(255, 252, 245, .96);
  }
}

/* ==========================================================================
   12. 我们的数字
   ========================================================================== */

.mya-stats-lead,
.mya-stats-tail {
  max-width: 720px;
  margin: 0 auto 20px;
  text-align: center;
  color: var(--mya-ink-soft);
  line-height: 2;
}
.mya-stats-tail { margin: 24px auto 0; font-size: .96rem; }

.mya-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 14px;
}

.mya-stat {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 22px 16px 18px;
  text-align: center;
  border-radius: 22px;
  overflow: hidden;
  background: var(--mya-glass);
  -webkit-backdrop-filter: var(--mya-blur);
  backdrop-filter: var(--mya-blur);
  border: 1.5px solid var(--mya-glass-line);
  box-shadow: var(--mya-lift);
  animation: mya-rise .5s calc(var(--i, 0) * .07s) var(--mya-ease) both;
  transition: transform .3s var(--mya-ease), box-shadow .3s var(--mya-ease);
}
.mya-stat:hover { transform: translateY(-5px); box-shadow: var(--mya-lift-hi); }
.mya-stat::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 72px;
  height: 3px;
  translate: -50% 0;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--mya-mikan), var(--mya-plum));
}

.mya-stat-icon  { font-size: 1.7rem; }
.mya-stat-value {
  color: var(--mya-mikan-deep);
  font-size: clamp(1.9rem, 5.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 0 rgba(255, 226, 109, .7);
}
.mya-stat-label {
  font-style: normal;
  color: #8a4d2c;
  font-size: .94rem;
  font-weight: 700;
}
.mya-stat small {
  margin-top: 6px;
  color: var(--mya-ink-soft);
  font-size: .84rem;
  line-height: 1.75;
}

/* ==========================================================================
   13. 给你的信 —— 做成一张真的信纸
   ========================================================================== */

.mya-letter {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(30px, 5.4vw, 54px) clamp(22px, 5vw, 52px) clamp(26px, 4.6vw, 44px);
  border-radius: 22px;
  color: #4f382a;
  background:
    /* 信纸横格 */
    repeating-linear-gradient(180deg,
      transparent 0 37px,
      rgba(150, 100, 60, .085) 37px 38px),
    linear-gradient(#fffdf8, #fff8ec 62%, #fff2e0);
  border: 1px solid rgba(150, 100, 60, .18);
  box-shadow:
    0 20px 46px rgba(120, 74, 40, .16),
    inset 0 0 0 8px rgba(255, 255, 255, .5);
}
/* 左侧装订红线 */
.mya-letter::before {
  content: "";
  position: absolute;
  left: clamp(14px, 3.4vw, 30px);
  top: 14px;
  bottom: 14px;
  width: 1.5px;
  background: rgba(214, 122, 122, .28);
}
/* 右上角胶带 */
.mya-letter::after {
  content: "";
  position: absolute;
  right: 34px;
  top: -13px;
  width: 92px;
  height: 28px;
  rotate: 4deg;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg,
    rgba(226, 194, 137, .58) 0 8px, rgba(255, 245, 210, .58) 8px 16px);
  border: 1px solid rgba(115, 82, 48, .12);
}

.mya-letter-head {
  display: grid;
  gap: 3px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(150, 100, 60, .26);
}
.mya-letter-head b {
  color: #b4562c;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
}
.mya-letter-head small { color: var(--mya-ink-soft); letter-spacing: .06em; }

.mya-letter-body p {
  margin: 0 0 1.15em;
  font-size: clamp(1rem, 2.2vw, 1.07rem);
  line-height: 2.28;         /* 对齐横格 */
  text-indent: 2em;
  opacity: 0;
  animation: mya-rise .5s calc(.1s + var(--i, 0) * .08s) var(--mya-ease) both;
}
.mya-letter-salute {
  text-indent: 0 !important;
  color: #b4562c;
  font-size: 1.14rem !important;
  font-weight: 700;
}

.mya-letter-sign {
  margin: 1.6em 0 .2em;
  text-align: right;
  color: #8a4d2c;
  font-size: 1.12rem;
  opacity: 0;
  animation: mya-rise .5s .95s var(--mya-ease) both;
}
.mya-letter-sign::before { content: "—— "; opacity: .6; }

.mya-letter-ps {
  margin: 18px 0 0;
  padding: 12px 15px;
  border-radius: 14px;
  color: #9a5a33;
  background: rgba(255, 240, 210, .66);
  border: 1px dashed rgba(154, 90, 51, .3);
  font-size: .92rem;
  line-height: 1.85;
  opacity: 0;
  animation: mya-rise .5s 1.05s var(--mya-ease) both;
}

@media (max-width: 560px) {
  .mya-letter { padding: 26px 18px 22px; border-radius: 18px; }
  .mya-letter::before { left: 10px; }
  .mya-letter::after  { right: 18px; width: 72px; }
  .mya-letter-body p  { text-indent: 2em; line-height: 2.1; }
  .mya-stats-grid     { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mya-stat           { padding: 16px 10px 14px; }
  .mya-stat small     { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mya-stat,
  .mya-letter-body p,
  .mya-letter-sign,
  .mya-letter-ps { opacity: 1; animation: none !important; }
}
