/* 休闲乐园 · Q 版糖果风（乐园总览 + 六个玩法页共用）
   CSP 禁止内联 style 属性，动态样式统一由外链脚本通过 CSSOM 设置。 */
:root {
  --ink: #3a2f45;
  --muted: #8a7c8f;
  --leaf: #23653b;
  --pink: #ff6fa5;
  --lemon: #ffc53a;
  --mint: #22c3a3;
  --sky: #3b9cf3;
  --grape: #9b7af2;
  --coral: #ff7a55;
  --orange: #ff9b2f;
  --orange-deep: #e06a12;
  --card: #fffdf8;
  --line: #efe3f2;
  --shadow: 0 6px 0 rgba(120, 70, 140, .1), 0 16px 32px -14px rgba(120, 70, 140, .4);
  --shadow-lg: 0 10px 0 rgba(120, 70, 140, .1), 0 26px 44px -16px rgba(120, 70, 140, .45);
  --font-title: "ZCOOL KuaiLe", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-body: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --jelly: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* 手机防闪屏：去掉点击高亮、关闭双击缩放（连点不再让页面缩放跳动） */
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  background: linear-gradient(180deg, #8fd3f7 0%, #c9e8ff 28%, #e8dcff 62%, #ffe1ef 100%) fixed;
  overflow-x: clip;
}
img { max-width: 100%; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.px { image-rendering: pixelated; }

/* 飘动的白云背景 */
.fun-clouds { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fun-clouds i {
  --s: 1;
  position: absolute;
  left: var(--x);
  width: 150px;
  height: 46px;
  background: #fff;
  border-radius: 999px;
  opacity: .85;
  animation: fun-cloud linear infinite;
}
.fun-clouds i::before, .fun-clouds i::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.fun-clouds i::before { top: -32px; left: 26px; width: 66px; height: 66px; }
.fun-clouds i::after { top: -20px; right: 26px; width: 46px; height: 46px; }
.fun-clouds i:nth-child(1) { --x: 6vw; top: 120px; animation-duration: 110s; animation-delay: -30s; }
.fun-clouds i:nth-child(2) { --x: 58vw; --s: .7; top: 260px; opacity: .7; animation-duration: 140s; animation-delay: -90s; }
.fun-clouds i:nth-child(3) { --x: 30vw; --s: .5; top: 420px; opacity: .6; animation-duration: 160s; animation-delay: -10s; }
@keyframes fun-cloud {
  from { transform: translateX(calc(-1 * var(--x) - 260px)) scale(var(--s)); }
  to { transform: translateX(calc(100vw - var(--x) + 60px)) scale(var(--s)); }
}
.fx-canvas { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; pointer-events: none; }

/* ================= 顶栏 ================= */
.fun-top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100% - 24px, 1120px);
  min-height: 60px;
  margin: 12px auto 0;
  padding: 6px 12px 6px 8px;
  background: rgba(255, 255, 255, .9);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.fun-top::after {
  content: "";
  position: absolute;
  right: 40px;
  bottom: -3px;
  left: 40px;
  height: 4px;
  background: linear-gradient(90deg, #ff6fa5, #ffc53a 28%, #7fcf55 52%, #3b9cf3 76%, #9b7af2);
  border-radius: 4px;
}
.fun-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  color: var(--leaf);
  background: #fff;
  border: 2px solid #d7ebcf;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .3s var(--jelly), background .2s ease, color .2s ease;
}
.fun-title { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 auto 0 4px; }
.fun-title img { flex: none; width: 40px; height: 40px; }
.fun-title h1 {
  margin: 0;
  overflow: hidden;
  color: #ff9a2a;
  background: linear-gradient(180deg, #ffe37d, #ffb43a 50%, #ff8a1f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(1.5px 0 0 #6b3a14) drop-shadow(-1.5px 0 0 #6b3a14) drop-shadow(0 1.5px 0 #6b3a14)
    drop-shadow(0 -1.5px 0 #6b3a14) drop-shadow(0 3px 0 #4a2610);
  font-family: var(--font-title);
  font-size: 23px;
  letter-spacing: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fun-who { display: flex; flex: none; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fun-who select {
  max-width: 140px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

/* ================= 通用容器 ================= */
.fun-main { position: relative; z-index: 1; width: min(100% - 24px, 1120px); margin: 0 auto; padding: 22px 0 60px; }
.panel {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.panel h2 small { color: var(--muted); font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.muted { color: var(--muted); }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* ================= 按钮 ================= */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  overflow: hidden;
  color: #5a2c05;
  background: linear-gradient(180deg, #ffd65e, #ff9f2e);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 5px 0 #d8701b, 0 12px 22px -10px rgba(224, 106, 18, .7);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s var(--jelly), filter .2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  bottom: -30%;
  left: -70%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-20deg);
  animation: fun-shine 3.6s ease-in-out infinite;
}
.btn:active { transform: translateY(2px) scale(.96); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.6); opacity: .6; transform: none; }
.btn-big { height: 56px; padding: 0 30px; font-size: 18px; }
.btn-sm { height: 36px; padding: 0 14px; border-width: 2px; font-size: 13px; }
.btn-pink { color: #fff; background: linear-gradient(180deg, #ff8fbc, #ff5c98); box-shadow: 0 5px 0 #d4437a, 0 12px 22px -10px rgba(212, 67, 122, .6); }
.btn-mint { color: #fff; background: linear-gradient(180deg, #45dcbc, #1fb394); box-shadow: 0 5px 0 #148a72, 0 12px 22px -10px rgba(20, 138, 114, .6); }
.btn-sky { color: #fff; background: linear-gradient(180deg, #6ab8ff, #3b8fe8); box-shadow: 0 5px 0 #2a6cbd, 0 12px 22px -10px rgba(42, 108, 189, .6); }
.btn-grape { color: #fff; background: linear-gradient(180deg, #b69cff, #8a68ee); box-shadow: 0 5px 0 #6a48c9, 0 12px 22px -10px rgba(106, 72, 201, .6); }
.btn-ghost { color: var(--ink); background: #fff; box-shadow: 0 4px 0 rgba(120, 70, 140, .15); }
.btn-ghost::after, .btn:disabled::after { display: none; }

/* ================= 登录 ================= */
.login-panel { max-width: 420px; margin: 0 auto 18px; }
.login-panel form { display: grid; gap: 12px; }
.login-panel label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--leaf); }
.login-panel input {
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
}
.login-panel input:focus { border-color: var(--lemon); box-shadow: 0 0 0 4px rgba(255, 197, 58, .25); }
.captcha-line { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: end; }
.captcha-line img { width: 120px; height: 44px; background: #f4eef6; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.form-msg { min-height: 20px; margin: 0; color: #d0413b; font-size: 13px; }

/* ================= 奖励展示 ================= */
.rewards { display: flex; flex-wrap: wrap; gap: 8px; }
.reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.reward img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; background: #fff5dd; border-radius: 50%; }
.reward b { color: var(--orange-deep); }
.tier-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tier-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.tier-list .rank-tag { min-width: 64px; padding: 2px 10px; color: #fff; background: var(--grape); border-radius: 999px; text-align: center; }

/* ================= 排行榜 ================= */
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rank-head h2 { margin: 0; }
.seg { display: inline-flex; padding: 3px; background: #f3ecf7; border-radius: 999px; }
.seg button {
  padding: 5px 14px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.seg button.active { color: #fff; background: var(--grape); box-shadow: 0 2px 0 #6a48c9; }
.rank-list { display: grid; gap: 4px; max-height: 360px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.rank-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: #fff;
  border-radius: 12px;
  font-size: 13px;
}
.rank-list .no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: #f3ecf7;
  border-radius: 50%;
  font-weight: 800;
}
.rank-list li:nth-child(1) .no { color: #fff; background: linear-gradient(180deg, #ffd65e, #f0a20c); }
.rank-list li:nth-child(2) .no { color: #fff; background: linear-gradient(180deg, #d9e3ee, #9fb0c2); }
.rank-list li:nth-child(3) .no { color: #fff; background: linear-gradient(180deg, #f6c39a, #d08a52); }
.rank-list .nm { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .sc { color: var(--orange-deep); font-weight: 800; }
.rank-me { margin-top: 8px; padding: 8px 12px; color: #6a48c9; background: #f1ebff; border-radius: 12px; font-size: 13px; font-weight: 700; }
.rank-empty { padding: 14px; color: var(--muted); text-align: center; font-size: 13px; }

/* ================= 弹窗与提示 ================= */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(58, 47, 69, .45); }
.modal-card {
  width: min(100%, 440px);
  max-height: 88vh;
  padding: 22px 20px 18px;
  overflow: auto;
  text-align: center;
  background: var(--card);
  border: 4px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  animation: fun-pop .5s var(--jelly) both;
}
.modal-card h2 { margin: 0 0 10px; color: var(--ink); font-family: var(--font-title); font-size: 24px; letter-spacing: 2px; }
.modal-body { color: var(--ink); font-size: 14px; }
.modal-body .rewards { justify-content: center; margin: 10px 0; }
.modal-body > img { display: block; margin: 0 auto 8px; image-rendering: pixelated; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 95;
  max-width: calc(100% - 32px);
  padding: 10px 20px;
  color: #fff;
  background: rgba(58, 47, 69, .92);
  border: 3px solid #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transform: translateX(-50%);
  animation: fun-rise .35s var(--jelly) both;
}
.rules { margin: 0; padding-left: 20px; text-align: left; font-size: 13.5px; line-height: 1.8; }
.pop-num {
  position: fixed;
  z-index: 85;
  color: #fff;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 700;
  text-shadow: 0 2px 0 #b3403c, 2px 0 0 #b3403c, -2px 0 0 #b3403c, 0 -2px 0 #b3403c, 0 5px 8px rgba(0, 0, 0, .25);
  pointer-events: none;
  animation: fun-float-up 1.2s var(--out) forwards;
}
.pop-num.big { font-size: 46px; color: #ffe37d; }

/* ================= 乐园总览 ================= */
.hub-hero { padding: 20px 0 8px; text-align: center; }
.hub-hero h2 {
  margin: 0;
  color: #ff9a2a;
  background: linear-gradient(180deg, #fff09a, #ffc542 45%, #ff8a1f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 0 0 #6b3a14) drop-shadow(-2px 0 0 #6b3a14) drop-shadow(0 2px 0 #6b3a14)
    drop-shadow(0 -2px 0 #6b3a14) drop-shadow(0 6px 0 #4a2610);
  font-family: var(--font-title);
  font-size: clamp(42px, 8vw, 72px);
  letter-spacing: 6px;
  animation: fun-drop .9s var(--jelly) both;
}
.hub-hero p { margin: 10px 0 0; color: #5b4a6b; font-size: 15px; font-weight: 700; }
.boss-banner {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 16px 22px;
  color: #fff;
  background: linear-gradient(135deg, #4b2a7a, #7a3a9a 55%, #c2447a);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
a.boss-banner { text-decoration: none; transition: transform .35s var(--jelly), box-shadow .25s ease; }
.boss-banner .boss-art { position: relative; display: grid; place-items: center; height: 130px; }
.boss-banner .boss-art::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(255, 120, 150, .55), transparent 68%);
  border-radius: 50%;
  animation: fun-halo 2.6s ease-in-out infinite;
}
.boss-banner .boss-art img { position: relative; max-height: 128px; width: auto; animation: fun-hop 2.4s ease-in-out infinite; }
.boss-banner h3 { margin: 0 0 6px; font-family: var(--font-title); font-size: 24px; letter-spacing: 2px; }
.hp-bar {
  position: relative;
  height: 22px;
  overflow: hidden;
  background: rgba(0, 0, 0, .3);
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: 999px;
}
.hp-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--hp, 100%);
  background: repeating-linear-gradient(135deg, #ff5a6e 0 12px, #ff7a8a 12px 24px);
  border-radius: 999px;
  transition: width .9s var(--out);
  animation: fun-stripes 1.2s linear infinite;
}
.hp-bar span { position: relative; display: block; color: #fff; font-size: 12px; font-weight: 800; line-height: 16px; text-align: center; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.boss-banner .meta { margin: 6px 0 0; color: rgba(255, 255, 255, .85); font-size: 13px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.game-card {
  --tone: #ff7a55;
  --tone-2: #ffb199;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 230px;
  padding: 16px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform .35s var(--jelly), box-shadow .25s ease;
  animation: fun-rise .6s var(--jelly) backwards;
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 96px;
  background: linear-gradient(135deg, var(--tone), var(--tone-2));
  border-radius: 0 0 50% 50% / 0 0 24px 24px;
}
.game-card .art { display: grid; place-items: center; height: 96px; margin: -6px 0 2px; }
.game-card .art img { max-height: 92px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .12)); transition: transform .4s var(--jelly); }
.game-card strong { font-family: var(--font-title); font-size: 20px; letter-spacing: 1.5px; }
.game-card small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.game-card .status {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 12px;
  color: var(--tone);
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}
.game-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 10px;
  color: #fff;
  background: #ff4d6d;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  animation: fun-wiggle 2.4s ease-in-out infinite;
}
.gc-evo { --tone: #ff9b2f; --tone-2: #ffd36a; }
.gc-quiz { --tone: #3b9cf3; --tone-2: #8fd3ff; }
.gc-boss { --tone: #c2447a; --tone-2: #ff8fb3; }
.gc-cards { --tone: #9b7af2; --tone-2: #d2c2ff; }
.gc-egg { --tone: #22c3a3; --tone-2: #9fedd6; }
.gc-race { --tone: #ff6b5a; --tone-2: #ffb08a; }
.gc-shile { --tone: #6cc23c; --tone-2: #c6ec86; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
}
.checklist li i {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #e2d6ea;
  border-radius: 50%;
  font-style: normal;
  font-size: 13px;
}
.checklist li.done { color: var(--muted); }
.checklist li.done i { background: var(--mint); }
.checklist li a { margin-left: auto; color: var(--sky); font-size: 12px; text-decoration: none; }

/* ================= 宠物进化 2048 ================= */
.evo-layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 18px; align-items: start; }
.evo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.evo-stat {
  min-width: 0;
  padding: 8px 12px;
  text-align: center;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(120, 70, 140, .1);
}
.evo-stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.evo-stat b { color: var(--orange-deep); font-size: 22px; font-weight: 800; }
.board {
  --gap: 10px;
  --cell: calc((100% - var(--gap) * 5) / 4);
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #c6a4e8, #a98ad6);
  border: 4px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  touch-action: none;
  user-select: none;
}
.board .cell, .board .tile {
  position: absolute;
  width: var(--cell);
  height: var(--cell);
  border-radius: 16px;
}
.board .cell { background: rgba(255, 255, 255, .35); }
.board .tile {
  --tone: #fff6dc;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, var(--tone) 70%);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(90, 50, 120, .25);
  transition: left .11s ease-out, top .11s ease-out;
}
.board .tile img { width: 78%; height: 78%; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.board .tile em {
  position: absolute;
  right: 4px;
  bottom: 2px;
  min-width: 20px;
  padding: 0 5px;
  color: #fff;
  background: rgba(90, 50, 120, .75);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.board .tile.spawn { animation: fun-spawn .22s var(--jelly) both; }
.board .tile.merge { animation: fun-merge .28s var(--jelly) both; }
.board .tile.t1 { --tone: #fff6dc; } .board .tile.t2 { --tone: #ffe9b8; }
.board .tile.t3 { --tone: #ffd9a0; } .board .tile.t4 { --tone: #ffc38a; }
.board .tile.t5 { --tone: #ffb0b8; } .board .tile.t6 { --tone: #ff9ec7; }
.board .tile.t7 { --tone: #d8b4ff; } .board .tile.t8 { --tone: #b9c6ff; }
.board .tile.t9 { --tone: #9fe3ff; } .board .tile.t10 { --tone: #9ff0cf; }
.board .tile.t11 { --tone: #ffe066; box-shadow: 0 4px 0 rgba(90, 50, 120, .25), 0 0 20px 4px rgba(255, 214, 90, .8); }
.board-over {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: rgba(255, 253, 248, .88);
  border-radius: 20px;
  animation: fun-rise .4s var(--jelly) both;
}
.board-over h3 { margin: 0; font-family: var(--font-title); font-size: 30px; }
.board-over img { max-height: 110px; width: auto; image-rendering: pixelated; }
.evo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ladder li {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 6px 4px;
  text-align: center;
  background: #f5eef8;
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  transition: transform .3s var(--jelly), background .3s ease;
}
.ladder li img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; filter: grayscale(1) brightness(.6) opacity(.5); }
.ladder li.got { color: var(--ink); background: #fff; }
.ladder li.got img { filter: none; }
.ladder li.goal { border-color: var(--lemon); }
.ladder li.goal::after { content: "目标"; position: absolute; top: -8px; right: -4px; padding: 0 6px; color: #5a2c05; background: var(--lemon); border-radius: 999px; font-size: 10px; }
.ladder li.flash { animation: fun-pop .5s var(--jelly); }

/* ================= 剪影竞猜 ================= */
.quiz-stage { display: grid; justify-items: center; gap: 14px; text-align: center; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; width: 100%; font-weight: 800; }
.quiz-dots { display: flex; gap: 6px; }
.quiz-dots i { width: 14px; height: 14px; background: #e6dcef; border: 2px solid #fff; border-radius: 50%; }
.quiz-dots i.ok { background: var(--mint); }
.quiz-dots i.bad { background: #ff6b6b; }
.quiz-dots i.cur { background: var(--lemon); animation: fun-pulse 1s ease-in-out infinite; }
.spot {
  position: relative;
  display: grid;
  place-items: center;
  width: min(80vw, 280px);
  aspect-ratio: 1;
  background: radial-gradient(circle, #fffbe8 0%, #ffe7a8 45%, #ffc86a 70%, #f0a44a 100%);
  border: 6px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-lg), inset 0 0 40px rgba(255, 255, 255, .8);
}
.spot img { position: absolute; max-width: 62%; max-height: 62%; image-rendering: pixelated; transition: opacity .5s ease, transform .5s var(--jelly); }
.spot .real { opacity: 0; transform: scale(.6); }
.spot.revealed .sil { opacity: 0; transform: scale(1.3); }
.spot.revealed .real { opacity: 1; transform: scale(1.35); }
.spot .q {
  position: absolute;
  top: 16%;
  right: 20%;
  color: #fff;
  font-family: var(--font-title);
  font-size: 44px;
  text-shadow: 0 3px 0 #e06a12;
  animation: fun-hop 1.4s ease-in-out infinite;
}
.spot.revealed .q { display: none; }
.timer { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 8; }
.timer .bg { stroke: rgba(255, 255, 255, .5); }
.timer .fg { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s ease; }
.timer .fg.warn { stroke: #ff4d4d; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 520px); }
.opt {
  min-height: 54px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 18px;
  box-shadow: 0 5px 0 rgba(120, 70, 140, .18);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .25s var(--jelly), background .2s ease, color .2s ease;
}
.opt:nth-child(1) { border-color: #ffd6e6; } .opt:nth-child(2) { border-color: #d6ecff; }
.opt:nth-child(3) { border-color: #d6f5ea; } .opt:nth-child(4) { border-color: #ece2ff; }
.opt:disabled { cursor: default; }
.opt.right { color: #fff; background: var(--mint); border-color: #fff; animation: fun-pop .5s var(--jelly); }
.opt.wrong { color: #fff; background: #ff6b6b; border-color: #fff; animation: fun-shake .45s ease; }
.quiz-result { font-size: 18px; font-weight: 800; min-height: 28px; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; color: #fff; background: linear-gradient(180deg, #ff9f5a, #ff6a3d); border-radius: 999px; font-weight: 800; }
.summary-big { font-family: var(--font-title); font-size: 46px; color: var(--orange-deep); }

/* ================= 世界 Boss ================= */
.boss-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 20px 20px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 50% 38%, #8a4ab3 0%, #4b2a7a 55%, #2c1850 100%);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.boss-stage h2 { margin: 0; color: #fff; font-family: var(--font-title); font-size: 30px; letter-spacing: 3px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.boss-body { position: relative; display: grid; place-items: center; width: 100%; height: 300px; }
.boss-body::before {
  content: "";
  position: absolute;
  bottom: 18px;
  width: 260px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .45), transparent 70%);
  border-radius: 50%;
}
.boss-body img { position: relative; width: auto; height: 270px; image-rendering: pixelated; animation: fun-breathe 3s ease-in-out infinite; cursor: pointer; }
.boss-body.hit img { animation: fun-hit .35s ease; }
.boss-body.dead img { animation: fun-defeat 1.4s var(--out) forwards; }
.boss-dead-tag {
  position: absolute;
  top: 40%;
  padding: 6px 20px;
  color: #5a2c05;
  background: linear-gradient(180deg, #ffe37d, #ffb43a);
  border: 3px solid #fff;
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: 26px;
  transform: rotate(-8deg);
  animation: fun-pop .6s var(--jelly) both;
}
.boss-stage .hp-bar { width: min(100%, 560px); height: 28px; }
.boss-stage .hp-bar span { font-size: 13px; line-height: 22px; }
.boss-stage .meta { margin: 0; color: rgba(255, 255, 255, .8); font-size: 12.5px; }
.boss-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 13.5px; color: rgba(255, 255, 255, .9); }
.boss-info b { color: #ffe37d; }
.feed { display: grid; gap: 4px; max-height: 320px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.feed li { padding: 6px 10px; background: #fff; border-radius: 12px; font-size: 12.8px; animation: fun-rise .4s var(--jelly) backwards; }
.feed li b { color: #c2447a; }
.feed li.kill { color: #5a2c05; background: linear-gradient(90deg, #fff1c2, #ffe08a); font-weight: 800; }
.src-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.src-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 7px 10px; background: #fff; border-radius: 12px; font-size: 13px; }
.src-list li small { display: block; color: var(--muted); font-size: 11.5px; }
.src-list li b { align-self: center; color: #c2447a; }

/* ================= 宠物卡册 ================= */
.draw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.draw-bar .left { font-size: 15px; font-weight: 800; }
.draw-bar .left b { color: var(--grape); font-size: 24px; }
.pity { flex: 1; min-width: 180px; }
.pity .bar { height: 12px; overflow: hidden; background: #efe6f7; border-radius: 999px; }
.pity .bar i { display: block; width: var(--p, 0%); height: 100%; background: linear-gradient(90deg, #b69cff, #ff8fbc); border-radius: 999px; transition: width .5s var(--out); }
.pity span { color: var(--muted); font-size: 12px; font-weight: 700; }
.dust { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; color: #6a48c9; background: #f1ebff; border-radius: 999px; font-weight: 800; }
.draw-show { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; min-height: 10px; margin: 14px 0 4px; perspective: 900px; }
.pcard {
  --glow: #fff;
  position: relative;
  width: 118px;
  height: 162px;
  transform-style: preserve-3d;
  transition: transform .7s var(--jelly);
  animation: fun-deal .45s var(--jelly) backwards;
}
.pcard.flip { transform: rotateY(180deg); }
.pcard .face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 16px;
  backface-visibility: hidden;
  box-shadow: 0 6px 0 rgba(90, 50, 120, .2);
}
.pcard .back {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .5) 2px, transparent 2.5px) 0 0 / 14px 14px,
    linear-gradient(135deg, #8a68ee, #ff6fa5);
}
.pcard .back::after { content: "?"; color: #fff; font-family: var(--font-title); font-size: 48px; text-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.pcard .front {
  grid-template-rows: auto 1fr auto;
  padding: 6px;
  background: linear-gradient(180deg, #fff, #fff6e8);
  transform: rotateY(180deg);
  box-shadow: 0 6px 0 rgba(90, 50, 120, .2), 0 0 22px 4px var(--glow);
}
.pcard .front img { max-width: 90px; max-height: 84px; image-rendering: pixelated; }
.pcard .front b { font-size: 12.5px; }
.pcard .rar { justify-self: start; padding: 0 8px; color: #fff; background: #9aa6b8; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pcard .new { position: absolute; top: -10px; right: -10px; padding: 1px 8px; color: #fff; background: #ff4d6d; border: 2px solid #fff; border-radius: 999px; font-size: 11px; font-weight: 800; transform: rotateY(180deg); backface-visibility: hidden; }
.pcard.r-R { --glow: rgba(59, 156, 243, .55); } .pcard.r-R .rar { background: var(--sky); }
.pcard.r-SR { --glow: rgba(155, 122, 242, .7); } .pcard.r-SR .rar { background: var(--grape); }
.pcard.r-SSR { --glow: rgba(255, 197, 58, .95); } .pcard.r-SSR .rar { background: linear-gradient(90deg, #ff6fa5, #ffc53a, #3b9cf3); }
.pcard.r-SSR .front { background: linear-gradient(160deg, #fff7d6, #ffe7f2 50%, #e4f3ff); }
.series { margin-top: 14px; }
.series h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-title); font-size: 18px; letter-spacing: 1px; }
.series h3 .prog { color: var(--muted); font-family: var(--font-body); font-size: 12.5px; font-weight: 800; }
.series h3 .done { padding: 1px 10px; color: #fff; background: var(--mint); border-radius: 999px; font-family: var(--font-body); font-size: 12px; }
.album { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 4px 4px;
  background: #fff;
  border: 3px solid #eee6f3;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .25s var(--jelly);
}
.slot img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; }
.slot.no img { filter: brightness(0) opacity(.25); }
.slot span { max-width: 100%; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.slot em { position: absolute; top: 3px; right: 5px; color: var(--muted); font-size: 10.5px; font-style: normal; font-weight: 800; }
.slot.r-R { border-color: #cfe5ff; } .slot.r-SR { border-color: #ddd0ff; }
.slot.r-SSR { border-color: #ffe08a; background: linear-gradient(160deg, #fffaf0, #fff0f6); }
.rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rates div { padding: 8px; text-align: center; background: #fff; border-radius: 14px; font-size: 12px; font-weight: 700; }
.rates b { display: block; font-size: 20px; }
.rates .r-N b { color: #8a96a8; } .rates .r-R b { color: var(--sky); }
.rates .r-SR b { color: var(--grape); } .rates .r-SSR b { color: #f0a20c; }

/* ================= 宠物孵蛋 ================= */
.nest {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 16px 18px;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle at 50% 62%, #fff6d8 0%, #ffe6b0 40%, #ffd1e6 100%);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.egg-wrap { position: relative; display: grid; place-items: center; width: 220px; height: 240px; }
.egg-wrap::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 210px;
  height: 56px;
  background:
    radial-gradient(ellipse at 50% 30%, #d8a56a 0 40%, transparent 42%),
    repeating-linear-gradient(20deg, #b9824a 0 6px, #d7a066 6px 12px);
  border-radius: 50%;
  z-index: 0;
}
.egg {
  --c1: #fff7e6;
  --c2: #ffd9a6;
  --spot: #ff9f68;
  position: relative;
  z-index: 1;
  width: 140px;
  height: 180px;
  background:
    radial-gradient(circle at 30% 40%, var(--spot) 0 9px, transparent 10px),
    radial-gradient(circle at 68% 30%, var(--spot) 0 12px, transparent 13px),
    radial-gradient(circle at 58% 68%, var(--spot) 0 10px, transparent 11px),
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .9) 0 14px, transparent 30px),
    linear-gradient(160deg, var(--c1), var(--c2));
  border: 4px solid #fff;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  box-shadow: inset -10px -14px 0 rgba(0, 0, 0, .06), 0 8px 0 rgba(120, 70, 40, .15);
  transform-origin: 50% 90%;
  animation: fun-wobble 3s ease-in-out infinite;
  cursor: pointer;
}
.egg.c1 { --c1: #f2fbff; --c2: #bfe6ff; --spot: #5aa9f0; }
.egg.c2 { --c1: #fff3fa; --c2: #ffc6e0; --spot: #ff6fa5; }
.egg.c3 { --c1: #f4fff6; --c2: #c2f0cf; --spot: #3fbf74; }
.egg.c4 { --c1: #f7f2ff; --c2: #d8c6ff; --spot: #9b7af2; }
.egg.c5 { --c1: #fffbe6; --c2: #ffe68a; --spot: #f0a20c; }
.egg .crack { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.egg .crack::before {
  content: "";
  position: absolute;
  top: 34%;
  left: 18%;
  width: 64%;
  height: 16px;
  background: linear-gradient(90deg, transparent 0 4%, #8a5a2b 4% 9%, transparent 9% 18%, #8a5a2b 18% 23%, transparent 23% 34%,
    #8a5a2b 34% 39%, transparent 39% 52%, #8a5a2b 52% 57%, transparent 57% 70%, #8a5a2b 70% 75%, transparent 75%);
  clip-path: polygon(0 50%, 12% 10%, 26% 90%, 40% 10%, 55% 90%, 70% 10%, 84% 90%, 100% 40%, 100% 60%, 84% 100%, 70% 30%, 55% 100%, 40% 30%, 26% 100%, 12% 30%, 0 70%);
}
.egg.p1 .crack { opacity: .35; } .egg.p2 .crack { opacity: .6; } .egg.p3 .crack { opacity: 1; }
.egg.ready { animation: fun-shiver .5s ease-in-out infinite; }
.egg.bounce { animation: fun-egg-bounce .6s var(--jelly); }
.egg-bubble {
  position: absolute;
  top: 6px;
  right: -24px;
  z-index: 2;
  max-width: 170px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 700;
  animation: fun-pop .5s var(--jelly) both;
}
.egg-bubble::after { content: ""; position: absolute; bottom: -8px; left: 20px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.nest h2 { margin: 0; color: var(--ink); font-family: var(--font-title); font-size: 24px; letter-spacing: 2px; }
.love { position: relative; width: min(100%, 420px); margin-top: 20px; }
.love .bar { position: relative; height: 18px; overflow: visible; background: #fff; border: 3px solid #fff; border-radius: 999px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .08); }
.love .bar i { display: block; width: var(--p, 0%); height: 100%; background: linear-gradient(90deg, #ff9dc6, #ff5c9d); border-radius: 999px; transition: width .8s var(--out); }
.love .mark { position: absolute; top: -20px; left: var(--m); color: var(--muted); font-size: 11px; font-weight: 800; transform: translateX(-50%); white-space: nowrap; }
.love .mark::after { content: ""; position: absolute; top: 18px; left: 50%; width: 2px; height: 18px; background: rgba(155, 122, 242, .6); }
.care-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.care-btn { flex-direction: column; height: auto; min-width: 104px; padding: 10px 16px; }
.care-btn span { font-size: 28px; line-height: 1.1; }
.care-btn.fav { outline: 3px dashed #ff5c9d; outline-offset: 3px; }
.days { display: flex; justify-content: center; gap: 8px; }
.days i { width: 30px; height: 30px; background: #fff; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.days i.on { background: radial-gradient(circle at 35% 35%, #ffe1ef, #ff6fa5); }
.hatch-scene { position: relative; display: grid; place-items: center; height: 240px; }
.hatch-scene .shell { position: absolute; width: 70px; height: 60px; background: linear-gradient(160deg, #fff7e6, #ffd9a6); border: 3px solid #fff; border-radius: 50% 50% 20% 20%; animation: fun-shell 1s var(--out) forwards; }
.hatch-scene .shell.r { --dx: 90px; --rot: 50deg; } .hatch-scene .shell.l { --dx: -90px; --rot: -50deg; }
.hatch-scene img { position: relative; max-height: 160px; width: auto; image-rendering: pixelated; animation: fun-born 1s var(--jelly) .4s backwards; }
.level-tag { padding: 4px 18px; color: #fff; border: 3px solid #fff; border-radius: 999px; font-family: var(--font-title); font-size: 22px; letter-spacing: 2px; animation: fun-pop .6s var(--jelly) both; }
.level-tag.lv0 { background: linear-gradient(180deg, #8fd3a8, #3fbf74); }
.level-tag.lv1 { background: linear-gradient(180deg, #b69cff, #8a68ee); }
.level-tag.lv2 { background: linear-gradient(90deg, #ff6fa5, #ffc53a, #3b9cf3); }

/* ================= 宠物赛跑 ================= */
.race-next { display: grid; gap: 12px; }
.countdown { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.countdown b { padding: 4px 14px; color: #fff; background: linear-gradient(180deg, #ff8a70, #ff5a3d); border-radius: 999px; font-family: Consolas, monospace; font-size: 20px; }
.runners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.runner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: #fff;
  border: 3px solid #f3e8f5;
  border-radius: 18px;
  transition: transform .3s var(--jelly), border-color .2s ease;
}
.runner img { height: 64px; width: auto; image-rendering: pixelated; }
.runner strong { font-size: 13px; }
.runner .odds { color: var(--orange-deep); font-weight: 800; }
.runner .cheer { color: var(--muted); font-size: 11.5px; }
.runner .mine { position: absolute; top: 6px; right: 6px; padding: 0 8px; color: #fff; background: var(--pink); border-radius: 999px; font-size: 11px; font-weight: 800; }
.runner.picked { border-color: var(--pink); }
.lane-no { position: absolute; top: 6px; left: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.track {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 54px 12px 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #8fd36f, #6cbf4f);
  border: 3px solid #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.track::after {
  content: "";
  position: absolute;
  top: 0;
  right: 44px;
  bottom: 0;
  width: 14px;
  background: repeating-linear-gradient(0deg, #fff 0 10px, #3a2f45 10px 20px);
  opacity: .85;
}
.lane { position: relative; height: 50px; background: rgba(255, 255, 255, .18); border-radius: 12px; }
.lane .rn { position: absolute; top: 50%; left: var(--x, 0%); height: 50px; transform: translate(0, -50%); }
/* 宠物图档本身朝向右侧（跑向终点），不做水平翻转 */
.lane .rn img { height: 46px; width: auto; image-rendering: pixelated; }
.lane .rn.run img { animation: fun-trot .35s ease-in-out infinite alternate; }
.lane .rn b { position: absolute; top: -2px; left: -2px; padding: 0 5px; color: #fff; background: rgba(58, 47, 69, .7); border-radius: 999px; font-size: 10px; }
.lane .place { position: absolute; top: 50%; right: -46px; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--grape); border: 2px solid #fff; border-radius: 50%; font-weight: 800; transform: translateY(-50%); animation: fun-pop .4s var(--jelly) both; }
.lane .place.p1 { background: linear-gradient(180deg, #ffd65e, #f0a20c); }
.schedule { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #fff; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.schedule span img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.schedule span.next { color: #fff; background: var(--coral); }

/* ================= 关键帧 ================= */
@keyframes fun-shine { 0%, 55% { left: -70%; } 85%, 100% { left: 130%; } }
@keyframes fun-pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes fun-rise { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fun-drop { 0% { opacity: 0; transform: translateY(-60px) scale(.7); } 60% { opacity: 1; transform: translateY(6px) scale(1.04, .96); } 100% { transform: none; } }
@keyframes fun-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fun-halo { 0%, 100% { opacity: .7; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes fun-stripes { to { background-position: 34px 0; } }
@keyframes fun-wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(10deg); } }
@keyframes fun-float-up { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -80px) scale(1); } }
@keyframes fun-spawn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes fun-merge { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes fun-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes fun-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }
@keyframes fun-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.02, .98); } }
@keyframes fun-hit { 0% { filter: brightness(3) saturate(0); transform: translateX(0) scale(1.04); } 30% { transform: translateX(-12px); } 60% { transform: translateX(10px); filter: none; } 100% { transform: none; } }
@keyframes fun-defeat { 0% { transform: none; } 30% { transform: rotate(-8deg) translateY(-10px); } 100% { opacity: .35; filter: grayscale(1); transform: rotate(80deg) translate(60px, 60px) scale(.8); } }
@keyframes fun-deal { from { opacity: 0; transform: translateY(-60px) rotate(-12deg) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fun-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes fun-shiver { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } }
@keyframes fun-egg-bounce { 0% { transform: scale(1); } 30% { transform: scale(1.12, .88) translateY(8px); } 60% { transform: scale(.94, 1.08) translateY(-16px); } 100% { transform: none; } }
@keyframes fun-shell { to { opacity: 0; transform: translate(var(--dx), 80px) rotate(var(--rot)); } }
@keyframes fun-born { from { opacity: 0; transform: translateY(40px) scale(.3); } to { opacity: 1; transform: none; } }
@keyframes fun-trot { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-5px) rotate(3deg); } }

/* 悬停效果只给有鼠标的设备：手机点过的元素会“粘住”悬停态造成跳动闪烁 */
@media (hover: hover) and (pointer: fine) {
  .fun-back:hover { color: #fff; background: var(--leaf); transform: translateY(-2px); }
  .btn:hover:not(:disabled):not(:active) { transform: translateY(-3px) scale(1.03); filter: brightness(1.05); }
  a.boss-banner:hover { transform: translateY(-4px); }
  .game-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--shadow-lg); }
  .game-card:hover .art img { transform: translateY(-6px) scale(1.08); }
  .opt:hover:not(:disabled) { transform: translateY(-3px) scale(1.02); }
  .slot:hover { transform: translateY(-3px); }
  .runner:hover { transform: translateY(-3px); }
}

/* ================= 响应式 ================= */
@media (max-width: 900px) {
  .grid-2, .evo-layout { grid-template-columns: 1fr; }
  .boss-banner { grid-template-columns: 110px minmax(0, 1fr); }
  .boss-banner .btn { grid-column: 1 / -1; }
  .album { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .fun-top { gap: 6px; padding: 5px 8px 5px 6px; border-radius: 24px; }
  .fun-back { padding: 6px 10px; font-size: 12.5px; }
  .fun-title img { width: 32px; height: 32px; }
  .fun-title h1 { font-size: 18px; letter-spacing: 1px; }
  .fun-who span { display: none; }
  .fun-who select { max-width: 110px; padding: 5px 8px; font-size: 12px; }
  .board { --gap: 7px; border-radius: 18px; }
  .evo-stats { gap: 6px; }
  .evo-stat { padding: 6px 4px; border-radius: 14px; }
  .evo-stat b { font-size: 17px; }
  .board .tile { border-radius: 12px; border-width: 2px; }
  .runners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .options { grid-template-columns: 1fr; }
  .rates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-body { height: 220px; }
  .boss-body img { height: 190px; }
  .track { padding-right: 46px; }
  .lane { height: 42px; }
  .lane .rn img { height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
