:root {
  --orange: #FF8A3D;
  --orange-deep: #F26A1B;
  --orange-dark: #C95312;
  --gold: #FFC63F;
  --gold-deep: #F0A000;
  --cream: #FFF7E9;
  --cream-deep: #FFEBD3;
  --ink: #462512;
  --ink-soft: #7A4B2C;
  --muted: #A57A5C;
  --line: #F1D8BD;
  --card: #FFFCF6;
  --pink: #FF7C9C;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hud-bg: linear-gradient(180deg, rgba(52, 29, 16, .92) 0%, rgba(34, 18, 10, .9) 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  height: 100%;
  margin: 0;
  background: #1B120D;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 2px solid #FFE08A;
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

.game {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: #241a2e;
}

/* ================= 场景 ================= */
.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #2A233C;
}

.scene-art {
  position: absolute;
  inset: 0;
  background-image: url("images/gen/scene-village.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 52% 50%;
  transform: scale(1.01);
  transform-origin: 52% 52%;
  animation: breathe 12s ease-in-out infinite;
  will-change: transform;
}

.scene-art.bounce {
  animation: catBounce .62s cubic-bezier(.34, 1.46, .64, 1);
}

.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 11, 24, .66) 0%, rgba(18, 11, 24, .24) 12%, transparent 30%),
    linear-gradient(0deg, rgba(38, 20, 12, .5) 0%, rgba(38, 20, 12, .13) 12%, transparent 24%),
    radial-gradient(118% 82% at 52% 46%, transparent 48%, rgba(17, 9, 22, .32) 100%);
}

/* 萤火虫氛围 */
.fireflies {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.fireflies i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 8px 2px rgba(255, 205, 100, .58);
  opacity: .68;
  animation: drift 7.2s ease-in-out infinite;
}

.fireflies i:nth-child(1) { left: 11%; top: 33%; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 84%; top: 28%; animation-delay: 1.2s; width: 3px; height: 3px; }
.fireflies i:nth-child(3) { left: 72%; top: 58%; animation-delay: 2.4s; }
.fireflies i:nth-child(4) { left: 24%; top: 22%; animation-delay: .7s; width: 3px; height: 3px; }
.fireflies i:nth-child(5) { left: 46%; top: 16%; animation-delay: 3.2s; width: 3px; height: 3px; }
.fireflies i:nth-child(6) { left: 90%; top: 70%; animation-delay: 1.8s; }

/* ================= 顶部 HUD ================= */
.hud {
  position: absolute;
  z-index: 8;
  top: calc(8px + var(--safe-top));
  left: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.profile,
.hud-res {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.profile { pointer-events: auto; }
.hud-res { pointer-events: auto; flex: none; }

.avatar-frame {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  padding: 2px;
  border-radius: 16px;
  background: linear-gradient(155deg, #FFE4A8 0%, #FFB44F 48%, #ED761C 100%);
  box-shadow: 0 4px 10px rgba(20, 9, 3, .42), inset 0 1px 0 rgba(255, 250, 225, .9);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  object-position: 50% 42%;
  border: 1.5px solid #4A2A17;
}

.lv-badge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 2px 6px 3px;
  border-radius: 999px;
  border: 1.5px solid #FFF0CE;
  background: linear-gradient(180deg, #FFC24E 0%, #E8791B 100%);
  color: #4A2508;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
  box-shadow: 0 2px 6px rgba(74, 32, 3, .45);
}

.lv-badge b { font-size: 10.5px; color: #fff; text-shadow: 0 1px 1px rgba(110, 46, 0, .45); }

.xp-card {
  width: 124px;
  padding: 7px 9px 8px;
  border-radius: 14px;
  background: var(--hud-bg);
  border: 1px solid rgba(255, 210, 148, .34);
  box-shadow: 0 4px 12px rgba(17, 8, 3, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.xp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 5px;
  line-height: 1;
}

.cat-name {
  font-size: 12.5px;
  font-weight: 900;
  color: #FFF4DE;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.xp-num {
  font-size: 8px;
  font-weight: 700;
  color: #E7BC86;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.xp-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #24150C;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55);
}

.xp-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFE483 0%, #FFC244 46%, #FF8A3D 100%);
  box-shadow: 0 0 8px rgba(255, 178, 58, .9);
  transition: width .38s cubic-bezier(.2, .8, .2, 1);
}

.res-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px 0 5px;
  border-radius: 999px;
  background: var(--hud-bg);
  border: 1px solid rgba(255, 210, 148, .34);
  box-shadow: 0 4px 12px rgba(17, 8, 3, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #FFF4DD;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.coin-pill { color: #FFE39B; padding-right: 11px; }

.coin-pill .coin-ico {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  filter: drop-shadow(0 2px 3px rgba(40, 15, 0, .36));
}

.love-pill { padding-right: 10px; color: #FFC8D4; }

.love-pill .mp-icon {
  width: 16px;
  height: 16px;
  color: #FF8FA5;
  filter: drop-shadow(0 1px 2px rgba(50, 10, 20, .3));
}

/* ================= 心情气泡 ================= */
.mood-bubble {
  position: absolute;
  z-index: 6;
  top: calc(86px + var(--safe-top));
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 158px;
  padding: 7px 10px 7px 7px;
  border-radius: 15px;
  background: rgba(255, 250, 240, .96);
  border: 1.5px solid #EBC795;
  box-shadow: 0 8px 20px rgba(30, 14, 5, .3), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: bob 6.4s ease-in-out infinite;
}

.mood-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -6.5px;
  width: 11px;
  height: 11px;
  background: #FFFAF0;
  border-right: 1.5px solid #EBC795;
  border-bottom: 1.5px solid #EBC795;
  border-radius: 0 0 3px 0;
  transform: rotate(45deg);
}

.mood-paw {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, #FFB04A, #FF7A2F);
  color: #FFF8EC;
  box-shadow: 0 3px 7px rgba(210, 98, 20, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.mood-paw .mp-icon { width: 15px; height: 15px; }

.mood-copy { display: block; min-width: 0; line-height: 1.2; }

.mood-copy b {
  display: block;
  font-size: 10.5px;
  font-weight: 900;
  color: #7A4323;
  margin-bottom: 1px;
}

.mood-copy > span {
  display: block;
  max-width: 108px;
  font-size: 9.5px;
  font-weight: 600;
  color: #89583A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= 场景内收益浮标 ================= */
.idle-chip {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 14px;
  padding: 7px 11px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 252, 244, .98) 0%, rgba(255, 240, 215, .97) 100%);
  border: 1.5px solid #E6BD84;
  box-shadow: 0 8px 20px rgba(30, 14, 5, .32), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: bob 7.2s ease-in-out .7s infinite;
}

.idle-chip::after {
  content: "";
  position: absolute;
  right: 28px;
  top: -5.5px;
  width: 10px;
  height: 10px;
  background: #FFF9EC;
  border-left: 1.5px solid #E6BD84;
  border-top: 1.5px solid #E6BD84;
  border-radius: 2px 0 0 0;
  transform: rotate(45deg);
}

.idle-rate {
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1.1;
  font-size: 12px;
  font-weight: 900;
  color: #63371C;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.idle-rate img { width: 18px; height: 18px; border-radius: 50%; }
.idle-rate b { font-size: 15px; color: #E57412; letter-spacing: -.02em; }
.idle-rate > span { font-size: 9.5px; font-weight: 700; color: #A0714E; }

.idle-time {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  color: #91603D;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.idle-time .mp-icon { width: 12px; height: 12px; color: #B08260; }

/* ================= 底部养成面板 ================= */
.panel {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  margin-top: -18px;
  padding: 14px 16px calc(12px + var(--safe-bottom));
  border-radius: 27px 27px 0 0;
  background:
    radial-gradient(90% 70% at 14% 0%, rgba(255, 205, 144, .34) 0%, transparent 58%),
    radial-gradient(70% 60% at 100% 0%, rgba(255, 225, 178, .3) 0%, transparent 55%),
    linear-gradient(180deg, #FFFBF2 0%, #FFF5E5 52%, #FFE9CB 100%);
  border-top: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 -16px 38px rgba(30, 14, 5, .34), inset 0 1px 0 #fff;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(178, 112, 56, .1) .8px, transparent .8px);
  background-size: 12px 12px;
  opacity: .4;
  -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
}

.panel::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 26px;
  right: 26px;
  height: 2.5px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(213, 157, 85, .48), transparent);
  pointer-events: none;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-title-box { min-width: 0; }

.panel-eyebrow {
  margin-bottom: 2px;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .17em;
  color: #B67F4C;
}

.panel-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .01em;
  color: #4A2814;
  text-shadow: 0 1px 0 #FFFDF8;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.mood-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid #FFD3A1;
  background: linear-gradient(180deg, #FFF7EA, #FFE9CD);
  color: #BD6524;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(181, 103, 34, .1), inset 0 1px 0 #fff;
}

.mood-chip .mp-icon { width: 12px; height: 12px; color: #F2A128; }

.sound-btn {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(180deg, #FFF6E8, #FFE8C9);
  border: 1px solid #F0D0A7;
  color: #B16A2C;
  box-shadow: 0 2px 5px rgba(160, 95, 30, .12), inset 0 1px 0 #fff;
  transition: transform .12s ease;
}

.sound-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
}

.sound-btn:active { transform: scale(.9); }
.sound-btn .mp-icon { width: 16px; height: 16px; }
.sound-btn .ico-off { display: none; }
.sound-btn.muted .ico-on { display: none; }
.sound-btn.muted .ico-off { display: inline-block; }
.sound-btn.muted { color: #B39A85; }

/* 收益卡 */
.income-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 17px;
  border: 1px solid #F2D9BA;
  background: linear-gradient(135deg, #FFFDFA 0%, #FFF4E3 100%);
  box-shadow: 0 5px 14px rgba(160, 102, 48, .09), inset 0 1px 0 #fff;
}

.income-badge {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(160deg, #FFE9C2 0%, #FFCC80 100%);
  color: #D97319;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 2px 6px rgba(196, 118, 40, .16);
}

.income-badge .mp-icon { width: 22px; height: 22px; }

.income-main { flex: 1 1 auto; min-width: 0; }

.income-label {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.1;
  color: #A57A5C;
}

.income-rate {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  color: #5A3018;
  font-variant-numeric: tabular-nums;
}

.income-rate small {
  font-size: 9.5px;
  font-weight: 700;
  color: #A57A5C;
}

.income-hourly {
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1;
  color: #B48B6B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.income-sep {
  width: 1px;
  height: 34px;
  flex: none;
  background: linear-gradient(180deg, transparent, #EED5B9, transparent);
}

.income-right {
  flex: none;
  min-width: 94px;
  text-align: right;
}

.income-pending {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 1px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: #E27916;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #fff;
}

.income-pending span { display: inline-block; }

.income-pending img {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  filter: drop-shadow(0 1px 2px rgba(150, 80, 10, .2));
}

/* ================= 操作按钮 ================= */
.actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.feed-btn {
  position: relative;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border-radius: 19px;
  overflow: hidden;
  text-align: left;
  color: #FFF9EF;
  background: linear-gradient(160deg, #FFBC63 0%, #FF8A3D 46%, #EF681A 100%);
  border: 1px solid rgba(255, 255, 255, .44);
  box-shadow: 0 4px 0 #B84A0D, 0 9px 18px rgba(190, 75, 10, .26), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.feed-btn::after {
  content: "";
  position: absolute;
  inset: 1px 1px 50%;
  border-radius: 18px 18px 46% 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.feed-btn:active {
  transform: translateY(3px) scale(.985);
  box-shadow: 0 1px 0 #B84A0D, 0 5px 12px rgba(190, 75, 10, .24);
}

.feed-btn is-broke { filter: saturate(.7); }

.feed-ico {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 252, 244, .97);
  color: #F2701B;
  box-shadow: 0 3px 7px rgba(112, 50, 4, .22), inset 0 1px 0 #fff;
}

.feed-ico .mp-icon { width: 20px; height: 20px; }

.feed-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.feed-copy b {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(120, 50, 0, .16);
}

.feed-copy small {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  opacity: .95;
  font-variant-numeric: tabular-nums;
}

.feed-copy small img {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  filter: drop-shadow(0 1px 1px rgba(90, 40, 0, .25));
}

.collect-cta {
  position: relative;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 19px;
  overflow: hidden;
  color: #5A3200;
  background:
    radial-gradient(120% 150% at 50% -30%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #FFEE9E 0%, #FFD34C 40%, #FFB01E 100%);
  border: 1.5px solid #FFF4C8;
  box-shadow:
    0 4px 0 #C57E00,
    0 10px 22px rgba(235, 157, 0, .32),
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -9px 16px rgba(196, 120, 0, .17);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.collect-cta:active {
  transform: translateY(3px) scale(.99);
  box-shadow: 0 1px 0 #C57E00, 0 5px 12px rgba(235, 157, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.cta-shine {
  position: absolute;
  top: -70%;
  left: -35%;
  width: 34%;
  height: 240%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .58), transparent);
  animation: sheen 3.8s ease-in-out infinite;
  pointer-events: none;
}

.cta-coin {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
}

.cta-coin img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  filter: drop-shadow(0 2px 3px rgba(120, 70, 0, .35));
}

.cta-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.cta-copy b {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .03em;
  color: #5A3200;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 250, 205, .8);
}

.cta-copy small {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: #8A5200;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cta-spark {
  position: absolute;
  z-index: 2;
  width: 8px;
  height: 8px;
  background: #FFFBE0;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: .85;
  animation: twinkle 2.4s ease-in-out infinite;
  pointer-events: none;
}

.cta-spark.s1 { top: 9px; right: 13px; animation-delay: 0s; }
.cta-spark.s2 { bottom: 11px; right: 27px; width: 5px; height: 5px; animation-delay: .8s; }
.cta-spark.s3 { top: 13px; left: 11px; width: 5px; height: 5px; animation-delay: 1.5s; }

/* 成长进度 */
.grow-row {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.grow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  color: #A27859;
}

.grow-top b { color: #7D4A2A; font-size: 9.5px; }

.grow-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #F2DFC7;
  box-shadow: inset 0 1px 3px rgba(120, 70, 30, .14);
}

.grow-track i {
  display: block;
  width: 33%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFD768 0%, #FFAD3C 55%, #FF8A3D 100%);
  box-shadow: 0 0 8px rgba(255, 138, 61, .55);
  transition: width .4s cubic-bezier(.2, .8, .2, 1);
}

.grow-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), transparent 62%);
  pointer-events: none;
}

/* ================= 动效层与提示 ================= */
.fx {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  overflow: hidden;
}

.fx-heart {
  position: absolute;
  color: #FF7798;
  filter: drop-shadow(0 2px 4px rgba(120, 30, 50, .3));
  transform: translate(-50%, 0);
  animation: floatHeart 1.3s ease-out forwards;
}

.fx-heart .mp-icon {
  width: var(--s, 18px);
  height: var(--s, 18px);
}

.fx-coin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(90, 45, 0, .28));
  animation: coinBurst .95s cubic-bezier(.18, .72, .3, 1) var(--delay, 0s) forwards;
}

.fx-food {
  position: fixed;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFF9EE;
  color: #F57A1E;
  box-shadow: 0 4px 10px rgba(94, 43, 6, .28), inset 0 1px 0 #fff;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: transform .62s cubic-bezier(.22, .75, .3, 1), opacity .62s ease-in;
}

.fx-food .mp-icon { width: 17px; height: 17px; }

.fx-plus {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 900;
  color: #FFD44E;
  text-shadow: 0 2px 0 #8A4700, 0 5px 12px rgba(0, 0, 0, .3);
  letter-spacing: -.02em;
  animation: plusFloat 1.05s ease-out forwards;
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 15%;
  width: max-content;
  max-width: 82vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(57, 28, 12, .93);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #FFF7E8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: rgba(194, 98, 16, .95); }

.pop { animation: pop .36s cubic-bezier(.2, 1.4, .4, 1); }
.shake { animation: shake .36s ease; }

/* ================= 关键帧 ================= */
@keyframes breathe {
  0%, 100% { transform: scale(1.01); }
  50% { transform: scale(1.025); }
}

@keyframes catBounce {
  0% { transform: scale(1.01); }
  28% { transform: scale(1.045) translateY(-6px); }
  58% { transform: scale(1.024) translateY(1px); }
  100% { transform: scale(1.01); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .25; }
  35% { opacity: .8; }
  50% { transform: translate3d(7px, -14px, 0); opacity: .7; }
  75% { opacity: .4; }
}

@keyframes sheen {
  0%, 28% { left: -40%; opacity: 0; }
  42% { opacity: .9; }
  62%, 100% { left: 118%; opacity: 0; }
}

@keyframes twinkle {
  0%, 100% { transform: scale(.7); opacity: .35; }
  50% { transform: scale(1.15); opacity: .95; }
}

@keyframes floatHeart {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.55) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -108px) scale(1.18) rotate(var(--rot, 8deg)); }
}

@keyframes coinBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -90px))) scale(1.05) rotate(var(--rot, 30deg)); }
}

@keyframes plusFloat {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  22% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -170%) scale(1); }
}

@keyframes pop {
  0% { transform: scale(1); }
  38% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px) rotate(-1deg); }
  36% { transform: translateX(5px) rotate(1deg); }
  54% { transform: translateX(-3px); }
  72% { transform: translateX(3px); }
}

/* ================= 小屏适配 ================= */
@media (max-width: 380px) {
  .hud { left: 8px; right: 8px; gap: 4px; }
  .avatar-frame { width: 48px; height: 48px; border-radius: 14px; }
  .avatar-frame img { border-radius: 12px; }
  .xp-card { width: 110px; padding: 6px 7px 7px; }
  .cat-name { font-size: 11.5px; }
  .xp-num { font-size: 7px; }
  .res-pill { height: 29px; font-size: 12px; padding-right: 8px; gap: 4px; }
  .coin-pill .coin-ico { width: 21px; height: 21px; }
  .love-pill { padding-right: 8px; }
  .love-pill .mp-icon { width: 14px; height: 14px; }
  .mood-bubble { max-width: 142px; top: calc(80px + var(--safe-top)); }
  .mood-copy > span { max-width: 94px; }
  .panel { padding-left: 13px; padding-right: 13px; }
  .panel-title { font-size: 18px; }
  .panel-eyebrow { font-size: 8px; }
  .income-badge { width: 36px; height: 36px; border-radius: 12px; }
  .income-badge .mp-icon { width: 20px; height: 20px; }
  .income-pending { font-size: 20px; }
  .income-right { min-width: 84px; }
  .actions { grid-template-columns: 94px minmax(0, 1fr); gap: 8px; }
  .feed-btn { padding: 0 7px; gap: 5px; }
  .feed-ico { width: 30px; height: 30px; border-radius: 10px; }
  .feed-copy b { font-size: 14px; }
  .cta-copy b { font-size: 17px; }
  .cta-coin, .cta-coin img { width: 34px; height: 34px; }
}

@media (max-width: 340px) {
  .hud-res { gap: 4px; }
  .xp-card { width: 100px; }
  .res-pill { font-size: 11px; }
  .coin-pill { padding-right: 7px; }
  .love-pill { padding-left: 4px; }
  .mood-chip { display: none; }
}

@media (max-height: 720px) {
  .panel { padding-top: 12px; margin-top: -14px; }
  .panel-head { margin-bottom: 8px; }
  .income-card { padding: 8px 10px; margin-bottom: 8px; }
  .income-badge { width: 36px; height: 36px; }
  .actions .feed-btn,
  .actions .collect-cta { height: 60px; }
  .grow-row { margin-top: 8px; }
  .mood-bubble { top: calc(78px + var(--safe-top)); }
  .idle-chip { bottom: 10px; }
}

@media (max-height: 640px) {
  .mood-bubble { display: none; }
  .panel-eyebrow { display: none; }
  .income-hourly { display: none; }
  .panel-title { font-size: 17px; }
  .income-card { padding: 7px 10px; margin-bottom: 7px; }
  .actions .feed-btn,
  .actions .collect-cta { height: 56px; }
  .feed-btn { border-radius: 16px; }
  .collect-cta { border-radius: 16px; }
  .grow-top { font-size: 8.5px; }
}

@media (max-height: 560px) {
  .idle-chip { display: none; }
  .xp-card { padding-top: 5px; padding-bottom: 5px; }
  .panel { padding-top: 9px; }
  .panel-head { margin-bottom: 6px; }
  .grow-row { margin-top: 6px; }
  .actions .feed-btn,
  .actions .collect-cta { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (min-width: 560px) {
  body { background: radial-gradient(70% 60% at 50% 40%, #3A2417 0%, #1D120C 100%); }
  .game { box-shadow: 0 0 70px rgba(0, 0, 0, .5); }
}
