.ui-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.ui-layer > * { pointer-events: auto; }
.fx-canvas { position: absolute; inset: 0; z-index: 110; pointer-events: none !important; }

/* ---------- 首页 ---------- */
.home {
  position: absolute;
  inset: 0;
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 18px) 22px calc(var(--safe-b) + 20px);
  background: var(--ink);
}
.home.leaving { animation: homeOut 0.45s var(--ease-out) both; }
@keyframes homeOut { to { opacity: 0; transform: scale(1.06); filter: blur(6px); } }
.blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.55; animation: drift 14s ease-in-out infinite alternate; }
.blobs i:nth-child(1) { width: 260px; height: 260px; left: -80px; top: -40px; background: var(--lime); opacity: 0.32; }
.blobs i:nth-child(2) { width: 220px; height: 220px; right: -90px; top: 160px; background: var(--blue); opacity: 0.22; animation-duration: 17s; }
.blobs i:nth-child(3) { width: 240px; height: 240px; left: 20%; bottom: -100px; background: var(--pink); opacity: 0.2; animation-duration: 19s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, 30px) scale(1.15); } }

.home-top { position: relative; display: flex; align-items: center; justify-content: space-between; animation: riseIn 0.6s var(--ease-out) both; }
.home-top img { height: 22px; }
.home-chip { font-size: 11px; color: var(--t2); padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }

.hero { position: relative; margin: 16px auto 0; width: 184px; height: 172px; animation: popIn 0.8s 0.1s var(--ease-spring) both; }
.hero-phone {
  position: absolute;
  left: 50%;
  top: 0;
  width: 112px;
  height: 188px;
  margin-left: -56px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--ink-2) center / cover no-repeat;
  box-shadow: 0 0 0 4px #20290f, 0 0 0 5px rgba(218, 252, 169, 0.25), 0 30px 60px -10px rgba(184, 237, 110, 0.35);
  transform: rotate(-8deg);
  animation: phoneFloat 4.5s ease-in-out infinite;
}
@keyframes phoneFloat { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-8px); } }
.hero-phone::after { content: "跳过 3"; position: absolute; top: 9px; right: 8px; font-size: 8px; padding: 2px 6px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); }
.hero-mascot { position: absolute; right: -6px; bottom: -6px; width: 92px; animation: mascotBob 2.8s ease-in-out infinite; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); }
.hero-mascot .eyes { transform-origin: 50% 40%; animation: blink 4.2s infinite; }
@keyframes mascotBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(5deg); } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
.hero-hand {
  position: absolute;
  left: 4px;
  top: 92px;
  font-size: 34px;
  animation: handTap 2.4s ease-in-out infinite;
}
@keyframes handTap { 0%, 100% { transform: translate(0, 0) rotate(-10deg); } 40% { transform: translate(26px, -18px) rotate(-10deg); } 50% { transform: translate(26px, -14px) scale(0.9) rotate(-10deg); } }

.home-title { position: relative; margin: 18px 0 0; text-align: center; font-size: 38px; line-height: 1.08; font-weight: 900; letter-spacing: -1px; }
.home-title span { display: inline-block; animation: charIn 0.7s var(--ease-spring) both; }
.home-title em { font-style: normal; color: var(--lime); }
@keyframes charIn { from { opacity: 0; transform: translateY(24px) scale(0.8) rotate(-6deg); } to { opacity: 1; transform: none; } }
.home-sub { position: relative; margin: 10px 0 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--t2); animation: riseIn 0.6s 0.55s var(--ease-out) both; }

.home-rules { position: relative; margin: 14px 0 0; padding: 2px 14px; border-radius: 18px; background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); animation: riseIn 0.6s 0.75s var(--ease-out) both; }
.rule { display: flex; gap: 10px; padding: 10px 0; font-size: 12.5px; line-height: 1.55; color: var(--t2); }
.rule + .rule { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.rule i { flex: 0 0 auto; font-style: normal; font-size: 15px; }
.rule b { color: var(--t1); font-weight: 600; }
.home-actions { position: relative; margin-top: auto; padding-top: 20px; display: grid; gap: 10px; animation: riseIn 0.6s 0.85s var(--ease-out) both; }
.home-user { position: relative; margin-top: 12px; min-height: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11.5px; color: var(--t3); }
.home-user img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

/* 内容超高时滚动，不压缩各区块 */
.home > * { flex-shrink: 0; }
@media (max-height: 760px) {
  .home { padding-top: calc(var(--safe-t) + 10px); }
  .hero { margin-top: 8px; width: 158px; height: 138px; }
  .hero-phone { width: 84px; height: 138px; margin-left: -42px; border-radius: 18px; }
  .hero-mascot { width: 66px; }
  .hero-hand { top: 62px; font-size: 26px; }
  .home-title { margin-top: 12px; font-size: 29px; }
  .home-sub { margin-top: 8px; font-size: 12px; line-height: 1.55; }
  .home-rules { margin-top: 12px; }
  .rule { padding: 8px 0; font-size: 12px; }
  .home-actions { padding-top: 12px; gap: 9px; }
  .btn { height: 48px; }
  .home-user { margin-top: 9px; }
}
@media (max-height: 660px) {
  .hero { width: 132px; height: 112px; }
  .hero-phone { width: 66px; height: 112px; margin-left: -33px; }
  .hero-mascot { width: 54px; bottom: -4px; }
  .hero-hand { top: 48px; font-size: 22px; }
  .home-title { font-size: 25px; }
  .home-sub { display: none; }
  .rule { padding: 6px 0; font-size: 11.5px; }
  .home-actions { padding-top: 10px; }
  .btn { height: 44px; font-size: 15px; }
}
