:root {
  --accent: #FF8A3D;
  --accent-deep: #E86F21;
  --peach: #FFE3C6;
  --cream: #FFF8EE;
  --card: #FFFDF9;
  --ink: #3E2718;
  --ink-soft: #6F4A34;
  --muted: #A17E66;
  --line: #F2DDC9;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #2C1B12;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(90% 60% at 50% 8%, #6B442C 0%, #3A2418 48%, #24150E 100%);
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

button:focus-visible {
  outline: 3px solid rgba(255, 138, 61, 0.45);
  outline-offset: 2px;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: #FFE9CC;
}

@media (min-width: 560px) {
  body {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
  }
  .app {
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

/* ---------------- 场景 ---------------- */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 330px;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 36%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(96, 52, 24, 0.16) 0%, rgba(96, 52, 24, 0.06) 55%, rgba(96, 52, 24, 0) 100%);
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 247, 207, 0.34) 0%, rgba(255, 247, 207, 0) 42%),
    linear-gradient(180deg, rgba(66, 34, 14, 0.05) 0%, rgba(66, 34, 14, 0) 18%, rgba(255, 240, 217, 0) 76%, rgba(255, 240, 217, 0.5) 100%);
}

.room-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cat-wrap {
  position: absolute;
  left: 50%;
  bottom: -2px;
  z-index: 2;
  width: min(84vw, 340px);
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 18px rgba(120, 61, 26, 0.08));
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cat-wrap:focus { outline: none; }
.cat-wrap:focus-visible {
  outline: 3px solid rgba(255, 138, 61, 0.55);
  outline-offset: 6px;
  border-radius: 44% 44% 38% 38%;
}

.cat-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transition: transform 0.12s ease;
}

.cat-wrap:active .cat-svg { transform: scale(0.985); }

/* 猫咪微动效 */
#catWhole {
  transform-box: view-box;
  transform-origin: 160px 278px;
  animation: breathe 4.4s ease-in-out infinite;
}
#catHead {
  transform-box: view-box;
  transform-origin: 160px 152px;
  animation: headBob 5.2s ease-in-out infinite;
}
#tail {
  transform-box: view-box;
  transform-origin: 214px 244px;
  animation: tailSway 3.8s ease-in-out infinite;
}
#catEyes {
  transform-box: view-box;
  transform-origin: 160px 104px;
  animation: blink 5.6s infinite;
}
#earLeft {
  transform-box: view-box;
  transform-origin: 126px 84px;
  animation: earTwitch 7.4s ease-in-out infinite;
}
#earRight {
  transform-box: view-box;
  transform-origin: 194px 84px;
  animation: earTwitch 7.4s ease-in-out 0.18s infinite;
}

.cat-wrap[data-mood="meh"] #mouthHappy,
.cat-wrap[data-mood="sad"] #mouthHappy,
.cat-wrap[data-mood="sleepy"] #mouthHappy { display: none; }
.cat-wrap[data-mood="meh"] #mouthMeh { display: block; }
.cat-wrap[data-mood="sad"] #mouthSad { display: block; }
.cat-wrap[data-mood="sleepy"] #mouthMeh { display: block; }
.cat-wrap.is-sleepy #catEyes { animation: none; transform: scaleY(0.1); }
.cat-wrap.is-sleepy #catHead { animation: sleepyNod 4.8s ease-in-out infinite; }

.cat-wrap.is-petting .cat-svg { animation: petBounce 0.55s ease-out; }
.cat-wrap.is-fed #catHead {
  animation: munch 0.28s ease-in-out 3;
}
.cat-wrap.is-happy .cat-svg { animation: happyHop 0.65s ease-out; }

@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.008, 1.016) translateY(-1px); }
}
@keyframes headBob {
  0%, 100% { transform: rotate(-0.8deg) translateY(0); }
  50% { transform: rotate(0.9deg) translateY(-1.4px); }
}
@keyframes tailSway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(6deg); }
}
@keyframes blink {
  0%, 42%, 46%, 100% { transform: scaleY(1); }
  44% { transform: scaleY(0.08); }
}
@keyframes earTwitch {
  0%, 82%, 90%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(-7deg); }
  88% { transform: rotate(3deg); }
}
@keyframes petBounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-5px) scale(1.018, 0.985); }
  70% { transform: translateY(0) scale(0.992, 1.012); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes munch {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(2.4px) rotate(-1.2deg); }
}
@keyframes happyHop {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scale(1.02, 0.97); }
  55% { transform: translateY(0) scale(0.985, 1.02); }
  75% { transform: translateY(-4px) scale(1.005, 0.995); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes sleepyNod {
  0%, 100% { transform: rotate(-2deg) translateY(1px); }
  50% { transform: rotate(2.4deg) translateY(3px); }
}

/* 猫猫对话气泡 */
.speech {
  position: absolute;
  left: 56%;
  top: 2%;
  z-index: 4;
  max-width: 144px;
  padding: 7px 11px;
  border-radius: 14px 14px 14px 5px;
  background: rgba(255, 253, 247, 0.97);
  border: 1px solid rgba(255, 205, 158, 0.9);
  box-shadow: 0 6px 16px rgba(154, 84, 35, 0.16);
  color: #6A4028;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  transform-origin: 0 100%;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.2, 1.4, 0.4, 1);
  pointer-events: none;
}
.speech::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: #FFFDF7;
  border-right: 1px solid rgba(255, 205, 158, 0.9);
  border-bottom: 1px solid rgba(255, 205, 158, 0.9);
  transform: rotate(45deg);
}
.speech.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------------- 顶部 HUD ---------------- */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 12px) 16px 0;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 7px 20px rgba(104, 52, 20, 0.22), inset 0 1px 0 #FFFFFF;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.wallet-coin {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFE47C 0%, #FFC34F 52%, #FF9E33 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 5px rgba(214, 126, 35, 0.3);
  color: #8D4A10;
}
.wallet-coin .mp-icon { width: 17px; height: 17px; }
.wallet strong {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #57331D;
  min-width: 12px;
}
.wallet-unit { font-size: 10px; color: #8C6448; font-weight: 700; }
.wallet.pulse { animation: walletPulse 0.5s cubic-bezier(0.3, 1.6, 0.4, 1); }
@keyframes walletPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.09); }
  100% { transform: scale(1); }
}

.hud-right { display: flex; align-items: center; gap: 7px; }

.round-btn {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  color: #A86330;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 16px rgba(104, 52, 20, 0.2), inset 0 1px 0 #FFFFFF;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.12s ease, background 0.2s ease;
}
.round-btn .mp-icon { width: 19px; height: 19px; }
.round-btn:active { transform: scale(0.92); }
.round-btn.off { color: #B6A89D; background: rgba(255, 252, 245, 0.7); }

.player {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 37px;
  max-width: 138px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 16px rgba(104, 52, 20, 0.2), inset 0 1px 0 #FFFFFF;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFE0C4, #FFBE8E);
  color: #B25B21;
  font-size: 12px;
  font-weight: 900;
  background-size: cover;
  background-position: center;
}
.avatar .mp-icon { width: 16px; height: 16px; }
.player-name {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  color: #61402A;
}

/* ---------------- 底部信息面板 ---------------- */
.sheet {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  margin-top: -28px;
  padding: 9px 18px calc(12px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(255, 240, 217, 0.95) 0%, rgba(255, 253, 249, 0) 46%),
    linear-gradient(180deg, #FFFDF9 0%, #FFF8EE 100%);
  box-shadow: 0 -16px 40px rgba(116, 57, 22, 0.16), inset 0 1px 0 #FFFFFF;
}
.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 192, 137, 0), rgba(255, 192, 137, 0.8), rgba(255, 192, 137, 0));
}
.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 7px;
  border-radius: 999px;
  background: #EBD6C1;
}

.cat-meta { padding: 0 3px 8px; }
.cat-title-row { display: flex; align-items: center; gap: 7px; }
.lv {
  display: inline-grid;
  place-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 7px;
  background: #FFF0DA;
  border: 1px solid #FFD2A4;
  color: #D96E21;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.cat-title-row h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #3B2415;
}
.mood-pill {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #EAF6EC;
  color: #34865A;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}
.mood-pill.warn { background: #FFF2DE; color: #C17124; }
.mood-pill.bad { background: #FFECEA; color: #D25C4C; }

.cat-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: #8C6A53;
  font-size: 11px;
  font-weight: 600;
}
.cat-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: #D5BBA5; }

.stats { display: grid; gap: 7px; }
.stat {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
}
.stat-icon .mp-icon { width: 16px; height: 16px; }
.stat-icon.satiety { background: #FFF0E0; color: #F07E2B; }
.stat-icon.mood { background: #FFEAF0; color: #F25D80; }
.stat-icon.energy { background: #E9F3FF; color: #3D94EA; }
.stat-main { flex: 1; min-width: 0; }
.stat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3px;
  color: #76513A;
  font-size: 11.5px;
  font-weight: 700;
}
.stat-head b { color: #4A2E1D; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-head em { margin-left: 1px; color: #BE9F88; font-size: 9.5px; font-style: normal; font-weight: 600; }
.bar {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #F3E5D7;
  box-shadow: inset 0 1px 2px rgba(148, 92, 54, 0.12);
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.45s cubic-bezier(0.3, 0.8, 0.4, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.bar-fill.satiety { background: linear-gradient(90deg, #FFB062, #FF8A3D); }
.bar-fill.mood { background: linear-gradient(90deg, #FF9DB4, #F45D82); }
.bar-fill.energy { background: linear-gradient(90deg, #82BEF7, #4298EA); }

/* 放置收益 */
.jar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 10px 9px 9px;
  border-radius: 20px;
  background:
    radial-gradient(110% 130% at 0% 0%, #FFF8E9 0%, rgba(255, 246, 225, 0) 55%),
    linear-gradient(135deg, #FFF3DE 0%, #FFE5C4 100%);
  border: 1px solid #FFD1A0;
  box-shadow: 0 7px 18px rgba(220, 130, 53, 0.13), inset 0 1px 0 #FFFFFF;
}
.jar {
  position: relative;
  width: 46px;
  height: 52px;
  flex: 0 0 46px;
}
.jar-lid {
  position: absolute;
  top: 0;
  left: 7px;
  z-index: 2;
  width: 32px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(180deg, #FFCE7C 0%, #E89133 100%);
  box-shadow: inset 0 1px 0 #FFF1C3, 0 2px 3px rgba(166, 92, 28, 0.22);
}
.jar-glass {
  position: absolute;
  top: 8px;
  left: 3px;
  display: block;
  width: 40px;
  height: 43px;
  overflow: hidden;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 214, 158, 0.6));
  border: 2px solid #F0B570;
  box-shadow: inset 0 -8px 12px rgba(255, 149, 57, 0.14);
}
.jar-glass .fish {
  position: absolute;
  width: 12px;
  height: 12px;
  color: #E47B2A;
  opacity: 0.92;
}
.jar-glass .f1 { left: 5px; bottom: 4px; transform: rotate(-18deg); }
.jar-glass .f2 { left: 15px; bottom: 8px; width: 14px; height: 14px; transform: rotate(10deg); color: #F09540; }
.jar-glass .f3 { right: 4px; bottom: 3px; width: 11px; height: 11px; transform: rotate(-8deg); color: #D96B1E; }
.jar-shine {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(8deg);
}
.jar-info { flex: 1; min-width: 0; }
.jar-label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #A5693C;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.jar-label .mp-icon { width: 12px; height: 12px; color: #D8843E; }
.jar-number { display: flex; align-items: baseline; gap: 2px; margin: 1px 0 0; line-height: 1.05; }
.jar-number strong {
  color: #B95216;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.jar-number span { color: #9A7354; font-size: 10px; font-weight: 700; }
.jar-rate {
  margin: 2px 0 0;
  color: #966E51;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.collect-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 72px;
  height: 48px;
  flex: 0 0 72px;
  border-radius: 15px;
  color: #FFFFFF;
  background: linear-gradient(145deg, #FFA653 0%, #F47B26 100%);
  box-shadow: 0 6px 14px rgba(232, 112, 32, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: transform 0.12s ease, filter 0.2s ease;
}
.collect-btn .mp-icon { width: 13px; height: 13px; opacity: 0.95; }
.collect-btn:active { transform: scale(0.95); filter: brightness(0.97); }
.collect-btn.is-empty {
  color: #A98262;
  background: linear-gradient(145deg, #F6E3CF, #EED6BE);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 操作 */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.act {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 56px;
  padding: 0 12px;
  border-radius: 18px;
  text-align: left;
  transition: transform 0.12s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.act:active { transform: scale(0.97) translateY(1px); }
.act-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  border-radius: 12px;
}
.act-icon .mp-icon { width: 18px; height: 18px; }
.act-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.act-text strong { font-size: 14px; font-weight: 900; letter-spacing: -0.01em; }
.act-text small { font-size: 10px; font-weight: 600; opacity: 0.72; }
.act-pet {
  color: #74472B;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF3E4 100%);
  border: 1px solid #FFD2A8;
  box-shadow: 0 5px 14px rgba(174, 105, 50, 0.12), inset 0 1px 0 #FFFFFF;
}
.act-pet .act-icon { color: #EE7F2B; background: #FFF0DE; }
.act-feed {
  color: #FFFFFF;
  background: linear-gradient(145deg, #FFA24F 0%, #F27621 100%);
  box-shadow: 0 7px 16px rgba(231, 108, 28, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.act-feed .act-icon { color: #FFFFFF; background: rgba(255, 255, 255, 0.2); }
.act-feed .act-text small { opacity: 0.86; }
.act.cooling { filter: saturate(0.65) brightness(0.98); }

.hint {
  margin: 9px 2px 1px;
  text-align: center;
  color: #8E6A52;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- 浮层特效 ---------------- */
.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}
.fx {
  position: absolute;
  display: grid;
  place-items: center;
  animation: floatUp 1.35s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
  will-change: transform, opacity;
}
.fx .mp-icon { width: 20px; height: 20px; }
.fx-heart { color: #FF6F91; filter: drop-shadow(0 2px 3px rgba(210, 80, 100, 0.25)); }
.fx-coin { color: #F2A22F; filter: drop-shadow(0 2px 3px rgba(180, 100, 20, 0.25)); }
.fx-spark { color: #FFD36B; }
.fx-spark .mp-icon { width: 14px; height: 14px; }
.fx-label {
  font-size: 11px;
  font-weight: 900;
  color: #D96E21;
  text-shadow: 0 1px 0 #FFFFFF;
  white-space: nowrap;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.35) rotate(0deg); }
  16% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -96px) scale(1.05) rotate(var(--rot, 0deg)); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 118px);
  z-index: 40;
  max-width: min(86vw, 360px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(63, 38, 24, 0.9);
  color: #FFF7ED;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 26px rgba(40, 20, 8, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.2, 1.3, 0.4, 1);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------------- 短屏适配 ---------------- */
@media (max-height: 760px) {
  .stage { min-height: 292px; }
  .cat-wrap { width: min(76vw, 300px); }
  .sheet { margin-top: -24px; padding-top: 7px; padding-bottom: calc(9px + var(--safe-bottom)); }
  .sheet-handle { margin-bottom: 5px; }
  .cat-meta { padding-bottom: 6px; }
  .cat-title-row h1 { font-size: 20px; }
  .cat-sub { margin-top: 3px; font-size: 10px; }
  .stats { gap: 5px; }
  .stat-icon { width: 27px; height: 27px; flex-basis: 27px; border-radius: 9px; }
  .stat-icon .mp-icon { width: 15px; height: 15px; }
  .stat-head { font-size: 10.5px; margin-bottom: 2px; }
  .stat-head b { font-size: 11px; }
  .bar { height: 6px; }
  .jar-card { margin-top: 9px; padding: 7px 9px 7px 8px; border-radius: 17px; }
  .jar { transform: scale(0.92); transform-origin: center; }
  .jar-number strong { font-size: 20px; }
  .collect-btn { height: 44px; }
  .actions { margin-top: 9px; gap: 9px; }
  .act { height: 51px; border-radius: 16px; }
  .hint { margin-top: 7px; font-size: 9px; }
}

@media (max-height: 670px) {
  .stage { min-height: 252px; }
  .cat-wrap { width: min(74vw, 290px); bottom: -6px; }
  .sheet { margin-top: -20px; padding-left: 16px; padding-right: 16px; }
  .cat-title-row h1 { font-size: 18px; }
  .mood-pill { font-size: 9px; padding: 3px 8px; }
  .lv { height: 19px; font-size: 9px; }
  .cat-sub { font-size: 9.5px; }
  .bar { height: 5px; }
  .jar-card { margin-top: 8px; }
  .jar { display: none; }
  .actions { margin-top: 8px; }
  .act { height: 48px; }
  .hint { margin-top: 6px; }
  .hud { padding-top: calc(var(--safe-top) + 9px); }
}

@media (max-width: 350px) {
  .wallet-unit { display: none; }
  .player { max-width: 118px; }
  .player-name { max-width: 62px; }
  .sheet { padding-left: 14px; padding-right: 14px; }
  .act { padding: 0 9px; gap: 7px; }
  .act-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .act-text strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  #catWhole, #catHead, #tail, #catEyes, #earLeft, #earRight { animation: none !important; }
  .fx, .toast, .bar-fill { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
