/* FriendTree 的主题（夜空蓝 + 圣诞红）和圣诞树画面 */
:root {
  --bg1: #0a1730;
  --bg2: #1a3f78;
  --panel: #141d38;
  --ink: #f4f7ff;
  --muted: #b9c6e2;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.16);
  --accent: #d8392f;
  --accent-2: #ff6f5e;
  --on-accent: #fff;
  --gold: #f6c453;
}

/* ---------- 背景：飘雪 ---------- */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.flake {
  position: absolute; top: -4vh; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff; opacity: .7;
  animation: fall var(--t) linear infinite; animation-delay: calc(var(--t) * var(--p) * -1);
}
@keyframes fall { to { transform: translate3d(6vw, 108vh, 0); } }

/* ---------- 首页的示例树 ---------- */
.hero-tree svg.tree { width: min(68vw, 230px); }

/* ---------- 圣诞树 ---------- */
.stage svg.tree { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; overflow: visible; }
.swing {
  transform-box: fill-box; transform-origin: 50% 0;
  animation: swing 2.8s ease-in-out infinite alternate; animation-delay: var(--d, 0s);
}
@keyframes swing { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes swing-lit { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.orn { cursor: pointer; outline: none; }
.orn-string { stroke: #e9d9a6; stroke-width: 1.2; }
.orn-emoji { font-size: 21px; pointer-events: none; }
.hit { fill: transparent; }
.orn-name {
  font-size: 9.5px; fill: #fff; pointer-events: none;
  paint-order: stroke; stroke: rgba(0, 0, 0, .55); stroke-width: 2.5px; stroke-linejoin: round;
}
.orn:hover .swing, .orn:focus-visible .swing { filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 255, 255, .6)); }
.is-open .orn-emoji { filter: drop-shadow(0 0 7px rgba(246, 196, 83, .9)); }
.is-open .swing { animation-name: swing-lit; }
.orn.is-new .swing { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both, swing 2.8s ease-in-out .5s infinite alternate; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.garland { fill: none; stroke: #e9d9a6; stroke-width: 1; opacity: .45; }
.light { fill: #ffe08a; animation: blink 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
#star { transform-box: fill-box; transform-origin: center; animation: star-pulse 1.8s ease-in-out infinite; }
@keyframes star-pulse { 0%, 100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.12); opacity: 1; } }

/* 树上放不下的，排到树下当礼物 */
.presents { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 4px; }
.gift { display: grid; justify-items: center; gap: 1px; padding: 0; border: 0; background: none; }
.gift span { font-size: 26px; }
.gift b { font-size: 11px; font-weight: 500; color: var(--muted); }
.gift.is-new { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
