/* ============================================================
   小岛时光 · 我们的爱情树
   独立页面样式，仅作用于 growth.html
   ============================================================ */
:root {
  color-scheme: light;
  --pri: #d9566f;
  --pri-deep: #c94a64;
  --pri-soft: rgba(217, 86, 111, .08);
  --pl: #f3b9c5;
  --tx: #2f2a2e;
  --tl: #8a8088;
  --bg: #faf7f4;
  --card: #ffffff;
  --soft: #f4efeb;
  --line: rgba(47, 42, 46, .08);
  --line2: rgba(47, 42, 46, .05);
  --shadow: 0 4px 18px rgba(47, 42, 46, .06);
  --shadow-lg: 0 16px 40px rgba(47, 42, 46, .12);
  --gold: #c99a3a;
  --gold-soft: rgba(201, 154, 58, .12);
  --green: #4f9d7a;
  --sky-1: #fff9f3;
  --sky-2: #f7f3ea;
  --hill: #e8f1e5;
  --tree-1: #9ac79a;
  --tree-2: #7bb184;
  --tree-3: #5c956b;
  --trunk: #a97854;
  --trunk-2: #8a5f43;
}
[data-theme="dark"] {
  color-scheme: dark;
  --pri: #ee7f95;
  --pri-deep: #f093a5;
  --pri-soft: rgba(238, 127, 149, .14);
  --pl: #b5736c;
  --tx: #f1ecea;
  --tl: #a39a9f;
  --bg: #1d1a1c;
  --card: #272326;
  --soft: #302b2f;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .05);
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  --gold: #dcb35a;
  --gold-soft: rgba(220, 179, 90, .14);
  --green: #74c0a0;
  --sky-1: #2a2528;
  --sky-2: #252a26;
  --hill: #2d3a30;
  --tree-1: #6c9d76;
  --tree-2: #558363;
  --tree-3: #3f6c51;
  --trunk: #8f6549;
  --trunk-2: #6f4c37;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 36% at 50% -6%, rgba(255, 199, 216, .34), transparent 72%),
    radial-gradient(44% 28% at 100% 20%, rgba(255, 230, 214, .22), transparent 70%),
    radial-gradient(40% 26% at 0% 74%, rgba(210, 235, 215, .24), transparent 70%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(70% 36% at 50% -6%, rgba(238, 127, 149, .1), transparent 72%),
    radial-gradient(44% 28% at 100% 20%, rgba(201, 154, 58, .05), transparent 70%),
    radial-gradient(40% 26% at 0% 74%, rgba(116, 192, 160, .06), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: -24%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 20% 26%, rgba(255, 199, 216, .2), transparent 70%),
    radial-gradient(34% 30% at 80% 64%, rgba(210, 235, 215, .2), transparent 72%),
    radial-gradient(30% 26% at 64% 16%, rgba(255, 226, 178, .18), transparent 70%);
  background-size: 140% 140%;
  animation: ambientDrift 24s ease-in-out infinite alternate;
}
[data-theme="dark"] body::after {
  background:
    radial-gradient(38% 34% at 20% 26%, rgba(238, 127, 149, .07), transparent 70%),
    radial-gradient(34% 30% at 80% 64%, rgba(116, 192, 160, .05), transparent 72%),
    radial-gradient(30% 26% at 64% 16%, rgba(201, 154, 58, .05), transparent 70%);
  background-size: 140% 140%;
}
.bg-deco .bg-petal {
  position: absolute;
  top: -10%;
  color: var(--pri);
  opacity: 0;
  line-height: 1;
  pointer-events: none;
  animation: petalFall var(--dur, 16s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
body.locked { overflow: hidden; }
button, a { font-family: inherit; }
button { color: inherit; }
svg { display: block; }
a { color: inherit; }

.bg-deco { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-deco span {
  position: absolute;
  color: var(--pri);
  opacity: .1;
  font-size: 16px;
  animation: bgFloat var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes bgFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .05; }
  50% { transform: translateY(-18px) rotate(12deg); opacity: .15; }
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px calc(26px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; gap: 8px; padding: 2px 0 12px; }
.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--tx);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--pri); border-color: var(--pl); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }
.top-actions { display: flex; gap: 6px; }
.brand { flex: 1; min-width: 0; text-align: center; }
.brand-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: var(--tl);
  margin-bottom: 2px;
  white-space: nowrap;
}
.brand h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.25;
  color: var(--tx);
  white-space: nowrap;
}
.couple {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--pri);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.couple .x { color: var(--pl); margin: 0 3px; font-weight: 400; }

.theme-sun, .sound-off { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-sound="off"] .sound-on { display: none; }
[data-sound="off"] .sound-off { display: block; }

.panel {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* 双人头部：头像 + 在一起的天数 + 树名胶囊 */
.hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px 14px 16px;
  text-align: center;
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background:
    radial-gradient(84% 56% at 50% -12%, rgba(255, 199, 216, .42), transparent 72%),
    var(--card);
}
[data-theme="dark"] .hero-card {
  background:
    radial-gradient(84% 56% at 50% -12%, rgba(238, 127, 149, .12), transparent 72%),
    var(--card);
}
.hero-couple { display: flex; align-items: center; justify-content: center; gap: 16px; }
.hero-avatar { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.hero-avatar img {
  position: absolute; inset: 6px;
  width: calc(100% - 12px); height: calc(100% - 12px);
  border-radius: 50%; object-fit: cover; background: var(--soft);
}
.hero-avatar b {
  width: calc(100% - 12px); height: calc(100% - 12px);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 20px; font-weight: 800;
}
.hero-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--pl);
  animation: heroRing 16s linear infinite;
}
.hero-ring.b { animation-direction: reverse; }
@keyframes heroRing { to { transform: rotate(360deg); } }
.hero-heart { color: var(--pri); font-size: 17px; line-height: 1; animation: heroHeart 1.8s ease-in-out infinite; }
@keyframes heroHeart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.hero-names { display: flex; justify-content: center; gap: 30px; margin-top: 3px; font-size: 12px; font-weight: 800; color: var(--pri); }
.hero-names b { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-days { margin-top: 10px; }
.hero-days span { display: block; font-size: 11px; color: var(--tl); letter-spacing: .5px; }
.hero-days b { display: block; margin-top: 2px; font-size: 17px; font-weight: 800; color: var(--tx); font-variant-numeric: tabular-nums; }
.hero-tree-pill {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 12px; padding: 5px 12px;
  border-radius: 999px;
  background: var(--pri-soft);
  font-size: 11px; font-weight: 700; color: var(--pri-deep);
}
.hero-tree-pill em { font-style: normal; font-weight: 600; font-size: 10px; opacity: .72; }

/* 樱花树与永恒之树：树冠转为粉色 */
.tree-scene[data-level="7"], .tree-scene[data-level="8"] {
  --tree-1: #f8cdd9;
  --tree-2: #f2adc2;
  --tree-3: #e183a2;
}

/* 钱包 */
.wallet-card { padding: 12px 13px 12px; margin-bottom: 12px; }
.wallet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wallet-title { font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--tl); }
.wallet-hint { font-size: 8.5px; color: var(--tl); opacity: .76; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wallet-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px 6px;
  border-radius: 11px;
  background: var(--soft);
  border: 1px solid var(--line2);
}
.wallet-chip i { font-size: 14px; line-height: 1.1; font-style: normal; }
.wallet-chip b { font-size: 14px; line-height: 1.2; color: var(--tx); font-variant-numeric: tabular-nums; }
.wallet-chip span { font-size: 8px; color: var(--tl); }
.wallet-chip.sun { background: linear-gradient(155deg, #fffaf0, #fff3df); border-color: rgba(201, 154, 58, .16); }
.wallet-chip.heart { background: linear-gradient(155deg, #fff7f9, #fdeef2); border-color: rgba(217, 86, 111, .12); }
.wallet-chip.star { background: linear-gradient(155deg, #fffdf4, #fbf4df); border-color: rgba(201, 154, 58, .12); }
.wallet-chip.fragment { background: linear-gradient(155deg, #f8fbfa, #edf6f1); border-color: rgba(79, 157, 122, .12); }
[data-theme="dark"] .wallet-chip.sun { background: linear-gradient(155deg, #332c25, #2b2521); }
[data-theme="dark"] .wallet-chip.heart { background: linear-gradient(155deg, #3a2a2f, #2f2428); }
[data-theme="dark"] .wallet-chip.star { background: linear-gradient(155deg, #332f24, #2b2821); }
[data-theme="dark"] .wallet-chip.fragment { background: linear-gradient(155deg, #26302b, #222a26); }
.wallet-chip.pulse b { animation: walletPulse .45s ease; }
@keyframes walletPulse {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.22); color: var(--pri); }
}

/* 爱情树 */
.tree-card { overflow: hidden; margin-bottom: 12px; }
.tree-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 280;
  overflow: hidden;
  border-bottom: 1px solid var(--line2);
  background:
    radial-gradient(64% 54% at 78% 14%, rgba(255, 224, 172, .46), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 64%, var(--hill) 100%);
}
[data-theme="dark"] .tree-scene {
  background:
    radial-gradient(64% 54% at 78% 14%, rgba(220, 179, 90, .1), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 64%, var(--hill) 100%);
}
.tree-svg { display: block; width: 100%; height: 100%; }
.tree-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(58% 48% at 82% 14%, rgba(255, 228, 174, .3), transparent 68%);
  animation: sceneGlow 7s ease-in-out infinite;
}
[data-theme="dark"] .tree-scene::after {
  background: radial-gradient(58% 48% at 82% 14%, rgba(220, 179, 90, .12), transparent 68%);
}
.tree-svg .scene-sun { transform-box: fill-box; transform-origin: center; animation: sunPulse 6s ease-in-out infinite; }
.tree-svg .clouds { animation: cloudFloat 14s ease-in-out infinite; }
.tree-svg .canopy-group { transform-box: fill-box; transform-origin: 50% 100%; animation: treeSway 7s ease-in-out infinite; }
.tree-svg .flower { transform-box: fill-box; transform-origin: center; animation: flowerPop 4.5s ease-in-out infinite; }
.tree-svg .tree-star { transform-box: fill-box; transform-origin: center; animation: starTwinkle 2.6s ease-in-out infinite; }
.tree-svg .swing-seat { transform-box: fill-box; transform-origin: 50% 0; animation: swingSway 4.6s ease-in-out infinite; }
.tree-svg .starlight-bulb { animation: bulbGlow 3.2s ease-in-out infinite; }
.scene-floats { position: absolute; inset: 0; pointer-events: none; }
.scene-floats span {
  position: absolute;
  font-family: Georgia, serif;
  color: var(--pri);
  opacity: .28;
  animation: sceneFloat 8s ease-in-out infinite;
}
.scene-floats span:nth-child(1) { left: 14%; top: 24%; font-size: 13px; animation-delay: 0s; }
.scene-floats span:nth-child(2) { left: 82%; top: 34%; font-size: 17px; animation-delay: 1.4s; }
.scene-floats span:nth-child(3) { left: 72%; top: 64%; font-size: 10px; animation-delay: 2.6s; }
.scene-floats span:nth-child(4) { left: 24%; top: 68%; font-size: 15px; animation-delay: .8s; }
.scene-petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.scene-petals span {
  position: absolute;
  top: -8%;
  color: var(--pri);
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  animation: scenePetal var(--dur, 10s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.scene-petals span:nth-child(1) { left: 12%; --dur: 9s; --delay: 0s; }
.scene-petals span:nth-child(2) { left: 28%; --dur: 12s; --delay: 2.2s; font-size: 8px; }
.scene-petals span:nth-child(3) { left: 46%; --dur: 10s; --delay: 4.6s; }
.scene-petals span:nth-child(4) { left: 64%; --dur: 13s; --delay: 1.4s; font-size: 8px; }
.scene-petals span:nth-child(5) { left: 80%; --dur: 11s; --delay: 5.2s; }
.scene-petals span:nth-child(6) { left: 92%; --dur: 14s; --delay: 3.2s; font-size: 7px; }
.tree-scene.level-up { animation: treeLevelUp 1.1s cubic-bezier(.2, .9, .3, 1.15); }

.tree-info { padding: 14px 16px 16px; }
.tree-heading { display: flex; align-items: center; gap: 10px; }
.tree-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
}
.tree-name-wrap { flex: 1; min-width: 0; }
.tree-name-wrap b { display: block; font-size: 17px; font-weight: 800; color: var(--tx); letter-spacing: .5px; }
.tree-name-wrap em { display: block; margin-top: 1px; font-size: 9.5px; font-style: normal; color: var(--tl); }
.tree-progress { margin-top: 12px; }
.tree-progress-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9px; color: var(--tl); }
.tree-progress-label span:last-child { color: var(--pri); font-weight: 700; font-variant-numeric: tabular-nums; }
.tree-progress-bar { height: 7px; margin-top: 5px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.tree-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0c97e, var(--gold));
  transition: width .45s ease;
}
.tree-upgrade {
  position: relative;
  width: 100%;
  margin-top: 11px;
  padding: 12px 14px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--pri);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(217, 86, 111, .25);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.tree-upgrade:not(.is-locked)::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
  animation: upgradeShine 3.2s ease-in-out infinite;
}
.tree-upgrade:hover { filter: brightness(1.03); }
.tree-upgrade:active { transform: scale(.98); }
.tree-upgrade.is-locked { border: 1px dashed var(--line); background: var(--soft); color: var(--tl); box-shadow: none; }
.tree-upgrade[disabled] { opacity: .72; cursor: default; }
.tree-note { margin-top: 7px; text-align: center; font-size: 8.5px; line-height: 1.6; color: var(--tl); opacity: .86; }

/* 小岛时光 */
.care-card { padding: 14px 14px 13px; margin-bottom: 14px; }
.care-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.care-kicker { font-size: 8px; font-weight: 800; letter-spacing: 2px; color: var(--pri); }
.care-head h2 { margin-top: 2px; font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.care-timer {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.care-desc { margin-top: 6px; font-size: 10px; line-height: 1.7; color: var(--tl); }
.care-caps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.care-cap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line2);
  font-size: 8.5px;
  color: var(--tl);
}
.care-cap b { font-size: 10px; color: var(--tx); font-variant-numeric: tabular-nums; }
.care-cap.done { opacity: .48; }
.care-cap i { font-style: normal; font-size: 11px; }

.catch-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 190px;
  max-height: 260px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(217, 86, 111, .12);
  background: linear-gradient(180deg, var(--sky-1) 0%, #fdf0f2 54%, var(--hill) 100%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
[data-theme="dark"] .catch-stage {
  background: linear-gradient(180deg, #262a2c 0%, #2b2528 54%, #2d3a30 100%);
  border-color: rgba(238, 127, 149, .14);
}
.stage-sun {
  position: absolute;
  left: 78%;
  top: 15%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff5cf, #ffd98d 58%, #f4b85c);
  box-shadow: 0 0 0 10px rgba(255, 217, 141, .14), 0 0 34px rgba(244, 184, 92, .4);
  opacity: .9;
}
.stage-cloud {
  position: absolute;
  width: 58px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 16px 6px 0 -3px rgba(255, 255, 255, .55), -13px 5px 0 -4px rgba(255, 255, 255, .5);
  opacity: .8;
  animation: cloudDrift 12s ease-in-out infinite;
}
.stage-cloud.c1 { left: 10%; top: 22%; }
.stage-cloud.c2 { left: 48%; top: 10%; transform: scale(.72); animation-delay: -4s; opacity: .62; }
[data-theme="dark"] .stage-cloud { background: rgba(255, 255, 255, .1); box-shadow: 16px 6px 0 -3px rgba(255, 255, 255, .08), -13px 5px 0 -4px rgba(255, 255, 255, .07); }
.stage-island {
  position: absolute;
  left: 50%;
  bottom: -34%;
  width: 118%;
  height: 58%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(60% 70% at 50% 20%, rgba(255, 255, 255, .28), transparent 70%), var(--hill);
  opacity: .95;
}
.stage-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(210, 235, 235, .24), rgba(167, 207, 208, .24));
}
.stage-water::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 8px;
  background: radial-gradient(50% 100% at 50% 100%, rgba(255, 255, 255, .55), transparent 70%);
  opacity: .55;
}
[data-theme="dark"] .stage-water { background: linear-gradient(180deg, rgba(116, 192, 160, .05), rgba(60, 100, 96, .14)); }
.catch-tokens { position: absolute; inset: 0; pointer-events: none; }
.catch-token {
  position: absolute;
  font-size: 24px;
  line-height: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 5px rgba(47, 42, 46, .18));
  will-change: top, left;
  animation: tokenTilt 2.4s ease-in-out infinite;
}
.catch-token.star { font-size: 21px; }
.catch-token.heart { font-size: 22px; }
.catch-basket {
  position: absolute;
  left: 50%;
  bottom: 5%;
  z-index: 5;
  font-size: 32px;
  line-height: 1;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 5px rgba(47, 42, 46, .18));
  transition: left .05s linear;
  will-change: left;
}
.catch-basket::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 42px;
  height: 8px;
  border-radius: 50%;
  background: rgba(47, 42, 46, .1);
  transform: translateX(-50%);
  z-index: -1;
}
.catch-basket.bounce { animation: basketBounce .32s cubic-bezier(.2, 1.4, .4, 1); }
.catch-stage.playing { animation: catchGlow 2.6s ease-in-out infinite; }
.catch-stage.playing .stage-sun { animation: sunPulse 2.8s ease-in-out infinite; }
.stage-water::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .34) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: waterShimmer 4.6s ease-in-out infinite;
}
.catch-ring {
  position: absolute;
  z-index: 6;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--rc, var(--gold));
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: catchRing .55s ease-out forwards;
}
.care-timer.urgent { animation: urgentPulse .8s ease-in-out infinite; }
.catch-float {
  position: absolute;
  z-index: 7;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 1px 3px rgba(255, 255, 255, .7);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: catchFloat .75s ease-out forwards;
}
[data-theme="dark"] .catch-float { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.catch-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  background: rgba(255, 255, 255, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility .25s ease;
}
[data-theme="dark"] .catch-overlay { background: rgba(29, 26, 28, .58); }
.catch-overlay.hide { opacity: 0; visibility: hidden; }
.catch-overlay-title { font-size: 11px; font-weight: 700; color: var(--tx); }
.catch-play {
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--pri);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(217, 86, 111, .28);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.catch-play:hover { filter: brightness(1.04); }
.catch-play:active { transform: scale(.97); }
.catch-play[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.catch-overlay-hint { font-size: 8.5px; color: var(--tl); }
.care-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 8.5px; color: var(--tl); }
.care-play-link { padding: 0; border: 0; background: transparent; color: var(--pri); font-size: 9.5px; font-weight: 700; cursor: pointer; }
.care-play-link[disabled] { color: var(--tl); opacity: .6; cursor: default; }

/* 树下装饰 */
.decor-section { margin-bottom: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.section-head h2 { font-size: 13px; font-weight: 800; letter-spacing: .4px; }
.section-head span { font-size: 8.5px; color: var(--tl); }
.decor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.decor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 7px 9px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  text-align: center;
}
.decor-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--pri);
}
.decor-art svg { width: 21px; height: 21px; }
.decor-name { font-size: 10.5px; font-weight: 800; color: var(--tx); }
.decor-desc { min-height: 23px; font-size: 8px; line-height: 1.45; color: var(--tl); }
.decor-cost { font-size: 8px; color: var(--gold); font-weight: 700; }
.decor-btn {
  width: 100%;
  margin-top: 2px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--tx);
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.decor-btn:hover { border-color: var(--pl); color: var(--pri); }
.decor-btn:active { transform: scale(.97); }
.decor-btn.primary { border-color: transparent; background: var(--pri); color: #fff; }
.decor-btn[disabled] { opacity: .55; cursor: default; }
.decor-card.owned { border-color: rgba(201, 154, 58, .24); background: linear-gradient(155deg, #fffdf7, #fff8ed); }
.decor-card.owned .decor-art { animation: decorGlow 3.2s ease-in-out infinite; }
[data-theme="dark"] .decor-card.owned { background: linear-gradient(155deg, #332f24, #2b2821); }
.decor-card.locked { opacity: .68; }
.decor-owned { font-size: 8px; color: var(--gold); font-weight: 700; }

.growth-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 18px; font-size: 8.5px; color: var(--tl); }
.growth-foot a { color: var(--pri); text-decoration: none; font-size: 10px; font-weight: 600; }
.growth-foot a:hover { text-decoration: underline; }

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(47, 42, 46, .42);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.overlay.show { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  width: 100%;
  max-width: 410px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 22px 20px 20px;
  border: 1px solid var(--line2);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  transform: translateY(14px) scale(.98);
  transition: transform .3s cubic-bezier(.2, 1, .3, 1);
}
.overlay.show .modal { transform: none; }
.modal::-webkit-scrollbar { display: none; }
.modal { scrollbar-width: none; }

.care-result-emoji { text-align: center; font-size: 42px; line-height: 1; }
.care-result-title { margin-top: 7px; text-align: center; font-size: 21px; font-weight: 800; letter-spacing: .8px; }
.care-result-sub { margin-top: 6px; text-align: center; font-size: 11.5px; line-height: 1.75; color: var(--tl); }
.care-result-rewards {
  margin: 14px 0 4px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(201, 154, 58, .16);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(253, 242, 229, .7), rgba(253, 233, 238, .5));
}
[data-theme="dark"] .care-result-rewards { background: linear-gradient(155deg, rgba(201, 154, 58, .1), rgba(238, 127, 149, .07)); border-color: rgba(201, 154, 58, .22); }
.care-result-rewards-head { text-align: center; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; color: var(--gold); }
.care-reward-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 7px; }
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(47, 42, 46, .05);
  font-size: 9px;
  color: var(--tl);
}
.reward-chip i { font-style: normal; font-size: 12px; line-height: 1; }
.reward-chip b { font-size: 11px; font-weight: 800; color: var(--tx); font-variant-numeric: tabular-nums; }
.reward-chip em { font-style: normal; }
.care-result-note { margin-top: 7px; text-align: center; font-size: 8.5px; line-height: 1.55; color: var(--tl); }
.care-daily { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; }
.care-daily span { padding: 3px 8px; border-radius: 999px; background: var(--soft); font-size: 8.5px; color: var(--tl); }
.care-daily b { color: var(--tx); }
.care-result-actions { display: flex; gap: 8px; margin-top: 14px; }
.care-result-actions button {
  flex: 1;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--tx);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.care-result-actions button:active { transform: scale(.97); }
.care-result-actions button.primary {
  border-color: transparent;
  background: var(--pri);
  color: #fff;
  box-shadow: 0 6px 16px rgba(217, 86, 111, .25);
}
.care-result-actions button[disabled] { opacity: .55; cursor: default; }
.care-result-links { display: flex; justify-content: center; gap: 14px; margin-top: 11px; }
.care-result-links a { font-size: 10px; color: var(--tl); text-decoration: none; }
.care-result-links a:hover { color: var(--pri); }
.care-result-links a.growth { color: var(--pri); font-weight: 600; }

/* 提示与特效 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 200;
  max-width: 86vw;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 42, 46, .9);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .25s ease, transform .25s ease;
}
[data-theme="dark"] .toast { background: rgba(241, 236, 234, .92); color: #2f2a2e; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.fx { position: fixed; inset: 0; z-index: 150; overflow: hidden; pointer-events: none; }
.fx-heart {
  position: absolute;
  font-size: 16px;
  line-height: 1;
  animation: heartFloat .95s ease-out forwards;
  filter: drop-shadow(0 2px 4px rgba(217, 86, 111, .3));
}
.fx-confetti {
  position: absolute;
  top: -24px;
  font-size: 16px;
  animation: confettiFall var(--dur, 3s) linear forwards;
  opacity: .92;
}

@keyframes treeSway {
  0%, 100% { transform: rotate(-.5deg); }
  50% { transform: rotate(.7deg); }
}
@keyframes flowerPop {
  0%, 100% { transform: scale(.92); opacity: .82; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes starTwinkle {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes swingSway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}
@keyframes bulbGlow {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
@keyframes sceneFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .18; }
  50% { transform: translateY(-14px) rotate(9deg); opacity: .42; }
}
@keyframes cloudDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}
@keyframes tokenTilt {
  0%, 100% { rotate: -7deg; }
  50% { rotate: 7deg; }
}
@keyframes catchFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(1.08); }
}
@keyframes heartFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), calc(-50% - 74px)) scale(1.25) rotate(var(--rot, 0deg)); }
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  8% { opacity: .95; }
  100% { transform: translateY(112vh) rotate(360deg); opacity: 0; }
}

/* ===== 动态增强 ===== */
@keyframes ambientDrift {
  0% { background-position: 0 0, 100% 100%, 50% 0; }
  100% { background-position: 100% 100%, 0 0, 60% 100%; }
}
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0) rotate(0deg); }
  8% { opacity: .16; }
  88% { opacity: .1; }
  100% { opacity: 0; transform: translate3d(var(--sway, 40px), 112vh, 0) rotate(320deg); }
}
@keyframes sceneGlow {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}
@keyframes scenePetal {
  0% { opacity: 0; transform: translate3d(0, -18px, 0) rotate(0deg); }
  12% { opacity: .42; }
  85% { opacity: .22; }
  100% { opacity: 0; transform: translate3d(var(--sway, 26px), 320px, 0) rotate(300deg); }
}
@keyframes treeLevelUp {
  0% { filter: brightness(1); transform: scale(1); }
  32% { filter: brightness(1.12) saturate(1.1); transform: scale(1.012); }
  100% { filter: brightness(1); transform: scale(1); }
}
@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes cloudFloat {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(7px); }
}
@keyframes basketBounce {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  38% { transform: translateX(-50%) translateY(-5px) scale(1.12); }
  70% { transform: translateX(-50%) translateY(1px) scale(.96); }
}
@keyframes catchGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 86, 111, 0), inset 0 0 18px rgba(217, 86, 111, .02); }
  50% { box-shadow: 0 0 0 3px rgba(217, 86, 111, .07), inset 0 0 30px rgba(255, 217, 141, .12); }
}
@keyframes waterShimmer {
  0%, 45% { transform: translateX(-110%); opacity: 0; }
  58% { opacity: .8; }
  88%, 100% { transform: translateX(110%); opacity: 0; }
}
@keyframes catchRing {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.4); }
}
@keyframes urgentPulse {
  0%, 100% { color: var(--pri); background: var(--pri-soft); transform: scale(1); }
  50% { color: #fff; background: var(--pri); transform: scale(1.06); }
}
@keyframes decorGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 154, 58, 0); }
  50% { box-shadow: 0 0 0 3px rgba(201, 154, 58, .08), 0 4px 12px rgba(201, 154, 58, .12); }
}
@keyframes upgradeShine {
  0%, 55% { transform: translateX(-170%) skewX(-18deg); }
  78%, 100% { transform: translateX(520%) skewX(-18deg); }
}

@media (max-width: 360px) {
  .app { padding-left: 11px; padding-right: 11px; }
  .brand h1 { font-size: 17px; }
  .brand-eyebrow { letter-spacing: 1.8px; }
  .wallet-hint { display: none; }
  .tree-info { padding: 12px 13px 14px; }
  .care-card { padding: 12px 12px 11px; }
  .decor-grid { gap: 5px; }
  .decor-card { padding: 9px 5px 8px; }
  .decor-desc { font-size: 7.5px; }
  .catch-stage { min-height: 170px; }
}
@media (min-width: 560px) {
  .app { padding-top: 22px; }
  .brand h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

