/* 养成小猫2 · 糯米的小屋
   移动端单列养成游戏，主色 #FF8A3D */
:root {
  --ink: #3d2616;
  --ink-2: #6e4a2e;
  --muted: #9d7958;
  --cream: #fff8ec;
  --cream-2: #ffefd8;
  --orange: #ff8a3d;
  --orange-deep: #f26a1b;
  --orange-soft: #ffb15c;
  --gold: #ffc24b;
  --pink: #ff7d9c;
  --blue: #63bfe8;
  --violet: #b18cff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: #e7c69f;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(120% 80% at 50% 0%, #f7ddb8 0%, #e7c69f 46%, #d9b184 100%);
}
button {
  font-family: inherit;
  border: 0;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
button:focus-visible { outline: 2px solid #ffdfaa; outline-offset: 3px; }
b, strong { font-weight: 800; }

.app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: #f9e7cc;
  box-shadow: 0 0 70px rgba(68, 37, 14, .28);
}

/* ---------- 场景 ---------- */
.scene {
  position: absolute;
  inset: 0;
  background-image: url("images/gen/cat_room.jpg");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
  transform: scale(1.015);
  transform-origin: 50% 52%;
  transition: filter .35s ease, transform .6s ease;
  animation: sceneIn 1.4s ease-out both;
  z-index: 1;
}
.scene.cat-happy {
  filter: brightness(1.045) saturate(1.06);
  transform: scale(1.028);
}
.sun-rays {
  position: absolute;
  inset: -12% -25%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    linear-gradient(112deg, transparent 16%, rgba(255, 241, 192, .22) 25%, transparent 37%,
      rgba(255, 236, 181, .14) 47%, transparent 60%);
  animation: rayDrift 12s ease-in-out infinite alternate;
}
.motes { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.motes span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 246, 213, .9);
  box-shadow: 0 0 10px 2px rgba(255, 229, 157, .55);
  opacity: 0;
  animation: mote 9s ease-in-out infinite;
}
.motes span:nth-child(1) { left: 18%; top: 28%; animation-delay: .4s; }
.motes span:nth-child(2) { left: 74%; top: 23%; width: 3px; height: 3px; animation-delay: 2.1s; }
.motes span:nth-child(3) { left: 62%; top: 46%; animation-delay: 4.3s; }
.motes span:nth-child(4) { left: 30%; top: 51%; width: 3px; height: 3px; animation-delay: 1.2s; }
.motes span:nth-child(5) { left: 84%; top: 39%; animation-delay: 5.6s; }
.motes span:nth-child(6) { left: 47%; top: 17%; width: 3px; height: 3px; animation-delay: 3.4s; }
.cat-glow {
  position: absolute;
  left: 50%;
  top: 41%;
  width: 70%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 157, .24) 0%, rgba(255, 212, 128, .10) 38%, transparent 69%);
  mix-blend-mode: screen;
  opacity: .75;
  animation: glowPulse 4.4s ease-in-out infinite;
}
.scene-shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(55, 29, 12, .34) 0%, rgba(55, 29, 12, .10) 14%, transparent 30%),
    linear-gradient(0deg, rgba(255, 244, 224, .30) 0%, rgba(255, 244, 224, .05) 23%, transparent 42%);
}

/* ---------- 顶部玩家条 ---------- */
.hud {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: hudIn .7s .05s both;
}
.profile {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 60px;
  padding: 6px 10px 6px 6px;
  border-radius: 21px;
  background: linear-gradient(140deg, rgba(76, 45, 25, .93), rgba(44, 25, 14, .84));
  border: 1px solid rgba(255, 226, 187, .3);
  box-shadow: 0 12px 28px rgba(40, 19, 5, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.avatar {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe4ad 0%, #ffa34d 55%, #f47a24 100%);
  box-shadow: 0 5px 14px rgba(255, 138, 61, .38);
}
.avatar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7fe3a0;
  border: 2px solid #3d2616;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff3df;
}
.profile-copy { flex: 1; min-width: 0; }
.profile-top {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.player-name {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fffaf1;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.level-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe28d, #ffb347);
  color: #6c3a0d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .2px;
  box-shadow: 0 2px 6px rgba(255, 166, 63, .35), inset 0 1px 0 #fff7d8;
}
.level-badge.small { height: 18px; font-size: 9.5px; padding: 0 7px; }
.exp-track {
  position: relative;
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}
.exp-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd36a, #ff9b3d);
  box-shadow: 0 0 7px rgba(255, 184, 77, .8);
  transition: width .5s cubic-bezier(.2, .9, .3, 1);
}
.profile-sub {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 232, 204, .7);
  font-size: 8.5px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: .1px;
}
.wallet { flex: none; display: flex; flex-direction: column; gap: 5px; }
.wallet-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 84px;
  height: 27px;
  padding: 3px 9px 3px 3px;
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(72, 42, 24, .94), rgba(45, 26, 15, .86));
  border: 1px solid rgba(255, 226, 187, .28);
  box-shadow: 0 6px 16px rgba(40, 19, 5, .26);
  transition: transform .18s ease;
}
.wallet-pill b {
  color: #fff7e8;
  font-size: 12.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.coin-pill .wallet-ico {
  background: linear-gradient(145deg, #ffe486, #ffb52c);
  color: #8a4b05;
  box-shadow: 0 2px 6px rgba(255, 176, 37, .4);
}
.fish-pill { min-width: 66px; }
.fish-pill .wallet-ico {
  background: linear-gradient(145deg, #b9ecff, #61c3ea);
  color: #0c5c7c;
  box-shadow: 0 2px 6px rgba(76, 180, 222, .4);
}
.wallet-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  flex: none;
}
.wallet-ico .mp-icon { width: 14px; height: 14px; }
.wallet-pill.bump { animation: bump .42s cubic-bezier(.2, 1.4, .4, 1); }

/* ---------- 广告入口 ---------- */
.ad-card {
  position: absolute;
  top: calc(79px + var(--safe-top));
  right: 12px;
  z-index: 19;
  width: min(238px, 64vw);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 8px 8px;
  overflow: hidden;
  text-align: left;
  border-radius: 19px;
  border: 1px solid rgba(255, 248, 226, .68);
  background: linear-gradient(135deg, #ffd16d 0%, #ffa447 44%, #ff7c2c 100%);
  box-shadow: 0 13px 30px rgba(244, 111, 28, .36), inset 0 1px 0 rgba(255, 255, 255, .62), inset 0 -2px 0 rgba(178, 72, 7, .14);
  transition: transform .14s ease, filter .2s ease;
  animation: adIn .8s .16s both, adPulse 3.4s 2.6s infinite;
}
.ad-card::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  top: -70%;
  height: 92%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0));
  transform: rotate(-8deg);
  pointer-events: none;
}
.ad-card:active { transform: scale(.97); filter: brightness(.98); }
.ad-play {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffdf4, #ffe9c9);
  color: #f26a1b;
  box-shadow: 0 4px 10px rgba(150, 63, 8, .24), inset 0 1px 0 #fff;
}
.ad-play .mp-icon { width: 21px; height: 21px; margin-left: 1px; }
.ad-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ad-copy b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fffdf7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
  text-shadow: 0 2px 4px rgba(168, 71, 6, .28);
}
.ad-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 249, 231, .9);
  font-size: 9.5px;
  font-weight: 600;
}
.ad-badge {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 10px;
  color: #fff7e0;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .34);
}
.ad-badge .mp-icon { width: 17px; height: 17px; }
.ad-card.cooling {
  filter: saturate(.42) brightness(.92);
  animation: adIn .8s .16s both;
}
.ad-card.cooling .ad-play { color: #9c7a56; }
.ad-card.urgent { animation: adIn .8s .16s both, urgentGlow 1.8s ease-in-out infinite; }

/* ---------- 左侧状态球 ---------- */
.orb-rail {
  position: absolute;
  top: 17.5%;
  left: 10px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: railIn .8s .22s both;
}
.orb { width: 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.orb-ring {
  width: 55px;
  height: 55px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(#ff9c3f calc(var(--p, 72) * 1%), rgba(255, 255, 255, .5) 0);
  box-shadow: 0 8px 20px rgba(80, 40, 10, .22), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: background .4s ease;
}
.orb-core {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #e6762c;
  background: linear-gradient(145deg, #fffaf0 0%, #ffe9c9 100%);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: inset 0 -3px 7px rgba(207, 128, 56, .13);
}
.orb-core .mp-icon { width: 24px; height: 24px; }
.orb-mood .orb-ring { background: conic-gradient(#ff7d9c calc(var(--p, 78) * 1%), rgba(255, 255, 255, .5) 0); }
.orb-mood .orb-core { color: #ef6f91; }
.orb-label {
  padding: 3px 7px;
  border-radius: 999px;
  color: #5d3a22;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 249, 238, .9);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: 0 3px 8px rgba(80, 40, 10, .14);
}
.orb-label b { color: #e6762c; font-size: 9px; font-weight: 900; }

/* ---------- 撸猫热区 ---------- */
.cat-zone {
  position: absolute;
  top: 23%;
  left: 16%;
  right: 16%;
  bottom: 28%;
  z-index: 15;
  padding: 0;
  background: transparent;
  border-radius: 40%;
  transition: transform .18s ease;
}
.cat-zone:active { transform: scale(.988); }
.pet-hint {
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #6b4225;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 250, 241, .9);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 16px rgba(80, 40, 10, .16);
  animation: hintFloat 2.6s ease-in-out infinite;
  transition: opacity .4s ease, transform .4s ease;
}
.pet-hint .mp-icon { width: 13px; height: 13px; color: #e6762c; }
.pet-hint.hide { opacity: 0; transform: translate(-50%, -6px); pointer-events: none; }
.purr {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, 8px) scale(.86);
  padding: 7px 12px;
  border-radius: 14px 14px 14px 4px;
  color: #6a4226;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 250, 241, .95);
  box-shadow: 0 7px 18px rgba(80, 40, 10, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2, 1.3, .4, 1);
}
.purr.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.heart-layer {
  position: absolute;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  overflow: hidden;
}
.heart {
  position: absolute;
  width: 18px;
  height: 18px;
  color: #ff6d8f;
  filter: drop-shadow(0 2px 3px rgba(255, 74, 116, .3));
  will-change: transform, opacity;
  animation: heartFloat 1.15s cubic-bezier(.2, .7, .3, 1) forwards;
}
.spark {
  position: absolute;
  width: 15px;
  height: 15px;
  color: #ffd76e;
  filter: drop-shadow(0 0 5px rgba(255, 196, 58, .75));
  animation: sparkFloat 1.05s ease-out forwards;
}
.fly-chip {
  position: absolute;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #0d6382;
  font-size: 10px;
  font-weight: 900;
  background: linear-gradient(145deg, #effcff, #a9e8ff);
  border: 1px solid #fff;
  box-shadow: 0 6px 16px rgba(45, 135, 170, .3);
  pointer-events: none;
  will-change: transform, opacity;
}
.fly-chip .mp-icon { width: 17px; height: 17px; }
.float-note {
  position: absolute;
  z-index: 51;
  color: #fff7df;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 5px rgba(91, 44, 10, .45);
  pointer-events: none;
  animation: floatNote 1.1s ease-out forwards;
}

/* ---------- 底部照顾面板 ---------- */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  max-height: 56dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 7px 14px calc(12px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(255, 251, 244, .95) 0%, rgba(255, 246, 231, .985) 30%, #fff2dd 100%);
  border-top: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 -15px 42px rgba(87, 45, 10, .2), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px) saturate(1.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
  animation: sheetIn .75s .1s both;
}
.handle {
  width: 36px;
  height: 4px;
  margin: 1px auto 8px;
  border-radius: 99px;
  background: #ecd6b7;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cat-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cat-name {
  color: #3d2616;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .5px;
  line-height: 1.05;
  text-shadow: 0 1px 0 #fff;
}
.exp-mini {
  color: #af8d6e;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.idle-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  color: #b45b1d;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff3d9, #ffe3b7);
  border: 1px solid #ffd7a3;
  box-shadow: 0 3px 8px rgba(180, 97, 28, .1), inset 0 1px 0 #fff;
}
.idle-chip .mp-icon { width: 14px; height: 14px; }
.mood-line {
  margin: 4px 0 9px;
  overflow: hidden;
  color: #9c7859;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.stat-card {
  min-width: 0;
  padding: 7px 8px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(255, 255, 255, .94);
  box-shadow: 0 4px 10px rgba(146, 90, 35, .055), inset 0 1px 0 #fff;
}
.stat-top { display: flex; align-items: center; gap: 3px; min-width: 0; }
.stat-top .mp-icon { width: 13px; height: 13px; flex: none; color: #f08a37; }
.stat-top .mood-ico { color: #f06d8f; }
.stat-top .bond-ico { color: #d9a21e; }
.stat-top span { color: #876549; font-size: 9px; font-weight: 700; white-space: nowrap; }
.stat-top b {
  margin-left: auto;
  color: #64402a;
  font-size: 9.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.stat-track {
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #f0e1cd;
  box-shadow: inset 0 1px 2px rgba(120, 72, 28, .09);
}
.stat-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .45s cubic-bezier(.2, .9, .3, 1);
}
.fullness-fill { background: linear-gradient(90deg, #ffc05c, #ff8a3d); }
.mood-fill { background: linear-gradient(90deg, #ffa4b9, #ff6d92); }
.bond-fill { background: linear-gradient(90deg, #ffd77a, #d9a21e); }
.action-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: 10px;
}
.feed-btn {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px 12px 9px;
  overflow: hidden;
  text-align: left;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #ffb753 0%, #ff8a3d 46%, #f56b1e 100%);
  border: 1px solid #ffd9a7;
  box-shadow: 0 10px 22px rgba(240, 105, 27, .33), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(171, 68, 5, .1);
  transition: transform .14s ease, filter .18s ease;
}
.feed-btn::after {
  content: "";
  position: absolute;
  top: -22px;
  right: -10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}
.feed-btn:active { transform: scale(.976); filter: brightness(.98); }
.feed-btn.empty {
  background: linear-gradient(135deg, #ffc06a 0%, #ff9745 48%, #fb7f2d 100%);
}
.feed-ico {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: #fff8e8;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.feed-ico .mp-icon { width: 24px; height: 24px; }
.feed-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.feed-copy b {
  display: block;
  overflow: hidden;
  color: #fffdf8;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .5px;
  text-shadow: 0 2px 4px rgba(156, 61, 4, .22);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 249, 236, .9);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-arrow {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff7e5;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .24);
}
.feed-arrow .mp-icon { width: 15px; height: 15px; }
.arrow-ad { display: none; }
.feed-btn.empty .arrow-feed { display: none; }
.feed-btn.empty .arrow-ad { display: flex; }
.feed-track {
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 5px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(106, 40, 0, .2);
  box-shadow: inset 0 1px 2px rgba(100, 37, 0, .18);
}
.feed-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe9a9, #fffbe9);
  box-shadow: 0 0 7px rgba(255, 241, 180, .5);
  transition: width .45s ease;
}
.ready-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4f5e;
  border: 1.5px solid #fff3dc;
  box-shadow: 0 0 0 0 rgba(255, 79, 94, .45);
  animation: readyPing 1.8s ease-out infinite;
}
.feed-btn:not(.ready) .ready-dot { display: none; }
.pet-btn {
  flex: none;
  width: 82px;
  min-height: 63px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 20px;
  color: #b45c23;
  background: linear-gradient(180deg, #fffdf7, #ffe9cf);
  border: 1px solid #ffd7ae;
  box-shadow: 0 8px 18px rgba(150, 80, 20, .12), inset 0 1px 0 #fff;
  transition: transform .14s ease, filter .18s ease;
}
.pet-btn:active { transform: scale(.96); filter: brightness(.98); }
.pet-btn .mp-icon { width: 21px; height: 21px; color: #e6782d; }
.pet-btn b { color: #8e4a1c; font-size: 12.5px; font-weight: 900; line-height: 1.1; }
.pet-btn small { color: #bd8b62; font-size: 8.5px; font-weight: 600; }

/* ---------- 提示 / 升级横幅 ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(31% + var(--safe-bottom));
  z-index: 60;
  max-width: 82%;
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff5e4;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  background: rgba(57, 32, 17, .93);
  border: 1px solid rgba(255, 227, 189, .18);
  box-shadow: 0 12px 26px rgba(40, 20, 5, .3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .24s ease, transform .24s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.level-banner {
  position: absolute;
  top: calc(150px + var(--safe-top));
  left: 50%;
  z-index: 58;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 88%;
  padding: 9px 14px;
  border-radius: 999px;
  color: #5e330d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff2bd, #ffc95d 55%, #ffae38);
  border: 1px solid #fff0bd;
  box-shadow: 0 14px 30px rgba(255, 156, 40, .36), inset 0 1px 0 #fffce8;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(.94);
  transition: opacity .28s ease, transform .3s cubic-bezier(.2, 1.3, .4, 1);
}
.level-banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.level-banner .mp-icon { width: 17px; height: 17px; color: #c26811; }
.level-banner b { padding-left: 2px; color: #a34d0b; font-size: 10px; }

/* ---------- 广告弹层 ---------- */
.ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(43, 23, 10, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn .2s ease both;
}
.ad-overlay[hidden] { display: none; }
.ad-dialog {
  width: min(324px, 88vw);
  padding: 22px 20px 16px;
  text-align: center;
  border-radius: 27px;
  background: linear-gradient(180deg, #fffdf6 0%, #fff1da 100%);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 28px 64px rgba(49, 25, 8, .38), inset 0 1px 0 #fff;
  animation: pop .3s cubic-bezier(.2, 1.3, .35, 1) both;
}
.ad-dialog-icon {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ffc05c, #ff7f2d);
  box-shadow: 0 10px 22px rgba(255, 122, 45, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.ad-dialog-icon::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 147, 64, .26);
  animation: spin 2.2s linear infinite;
  border-top-color: rgba(255, 147, 64, .85);
}
.ad-dialog-icon .mp-icon { width: 29px; height: 29px; margin-left: 2px; }
.ad-dialog h3 {
  margin: 0;
  color: #422814;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .3px;
}
.ad-dialog p {
  margin: 6px 0 14px;
  color: #a17d5c;
  font-size: 11px;
  line-height: 1.5;
}
.ad-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #f2ddc0;
  box-shadow: inset 0 1px 2px rgba(120, 72, 28, .1);
}
.ad-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffc15c, #ff7d2d);
  box-shadow: 0 0 10px rgba(255, 138, 61, .45);
}
.ad-progress span.indeterminate {
  width: 42% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}
.ad-reward-row { display: flex; gap: 8px; margin-top: 12px; }
.ad-reward {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 6px;
  border-radius: 14px;
  color: #86502a;
  font-size: 10.5px;
  background: #fff8e9;
  border: 1px solid #ffe4bb;
  box-shadow: inset 0 1px 0 #fff;
}
.ad-reward .mp-icon { width: 16px; height: 16px; color: #e58a2e; }
.ad-reward b { font-size: 11px; font-weight: 900; }
.ad-dialog-btn {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .4px;
  background: linear-gradient(135deg, #ffb24d, #ff7a2b 70%, #f5691b);
  border: 1px solid #ffd69e;
  box-shadow: 0 8px 18px rgba(240, 105, 27, .3), inset 0 1px 0 rgba(255, 255, 255, .48);
}
.ad-dialog-btn:active { transform: scale(.98); }
.sim-tip {
  display: block;
  margin-top: 9px;
  color: #bda080;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* ---------- 动效 ---------- */
@keyframes sceneIn { from { opacity: 0; transform: scale(1.07); } to { opacity: 1; transform: scale(1.015); } }
@keyframes hudIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes adIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes railIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes bump { 0% { transform: scale(1); } 42% { transform: scale(1.075); } 100% { transform: scale(1); } }
@keyframes adPulse {
  0%, 100% { box-shadow: 0 13px 30px rgba(244, 111, 28, .36), inset 0 1px 0 rgba(255, 255, 255, .62), inset 0 -2px 0 rgba(178, 72, 7, .14); }
  50% { box-shadow: 0 16px 38px rgba(244, 111, 28, .5), inset 0 1px 0 rgba(255, 255, 255, .62), inset 0 -2px 0 rgba(178, 72, 7, .14); }
}
@keyframes urgentGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.018); }
}
@keyframes hintFloat { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -4px); } }
@keyframes heartFloat {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.55) rotate(-8deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -74px) scale(1.05) rotate(var(--rot, 8deg)); }
}
@keyframes sparkFloat {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(.4) rotate(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -50px) scale(1) rotate(60deg); }
}
@keyframes floatNote {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.85); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}
@keyframes readyPing {
  0% { box-shadow: 0 0 0 0 rgba(255, 79, 94, .5); }
  70% { box-shadow: 0 0 0 7px rgba(255, 79, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 79, 94, 0); }
}
@keyframes glowPulse { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.96); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } }
@keyframes rayDrift { from { opacity: .55; transform: translateX(-1.5%); } to { opacity: .9; transform: translateX(1.5%); } }
@keyframes mote {
  0% { opacity: 0; transform: translateY(10px) scale(.6); }
  18% { opacity: .8; }
  80% { opacity: .55; }
  100% { opacity: 0; transform: translateY(-58px) scale(1); }
}
@keyframes pop { from { opacity: 0; transform: scale(.86) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes indeterminate {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(265%); }
}

/* 小屏压缩 */
@media (max-height: 700px) {
  .hud { top: calc(7px + var(--safe-top)); }
  .profile { height: 54px; border-radius: 19px; }
  .avatar { width: 43px; height: 43px; }
  .ad-card { top: calc(69px + var(--safe-top)); height: 54px; border-radius: 17px; }
  .ad-play { width: 31px; height: 31px; }
  .ad-copy b { font-size: 12px; }
  .orb-rail { top: 17%; gap: 9px; }
  .orb-ring { width: 48px; height: 48px; }
  .orb-core .mp-icon { width: 21px; height: 21px; }
  .sheet { padding: 6px 12px calc(10px + var(--safe-bottom)); border-radius: 24px 24px 0 0; }
  .cat-name { font-size: 19px; }
  .mood-line { margin: 3px 0 7px; }
  .stat-card { padding: 6px 7px 7px; }
  .action-row { margin-top: 8px; gap: 7px; }
  .feed-btn { height: 58px; border-radius: 18px; }
  .feed-ico { width: 35px; height: 35px; }
  .pet-btn { width: 76px; min-height: 57px; border-radius: 18px; }
  .toast { bottom: calc(33% + var(--safe-bottom)); }
}

@media (max-width: 350px) {
  .hud { left: 9px; right: 9px; gap: 5px; }
  .profile { padding-right: 7px; gap: 7px; }
  .avatar { width: 43px; height: 43px; }
  .player-name { max-width: 62px; font-size: 12.5px; }
  .wallet-pill { min-width: 74px; padding-right: 7px; }
  .wallet-pill b { font-size: 11.5px; }
  .fish-pill { min-width: 58px; }
  .ad-card { width: 62vw; }
  .ad-copy small { font-size: 8.5px; }
  .orb-rail { left: 7px; }
  .orb { width: 56px; }
  .orb-ring { width: 50px; height: 50px; }
  .sheet { padding-left: 11px; padding-right: 11px; }
  .feed-copy b { font-size: 15.5px; }
  .pet-btn { width: 72px; }
}

@media (min-width: 430px) {
  .sheet { padding-left: 18px; padding-right: 18px; }
  .cat-name { font-size: 22px; }
  .feed-btn { height: 68px; }
  .pet-btn { width: 88px; }
  .stat-card { padding: 8px 10px 9px; }
}
