:root {
  --orange: #FF8A3D;
  --orange-deep: #EF6A1E;
  --red: #F04B39;
  --red-deep: #D83227;
  --gold: #FFD166;
  --gold-deep: #F0A11A;
  --cream: #FFF8EF;
  --cream-2: #FFF2E2;
  --ink: #3F2A1D;
  --ink-2: #6E5544;
  --muted: #A28A78;
  --line: #F1E1D1;
  --shadow-lg: 0 24px 60px -24px rgba(122, 65, 22, .4);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #F4E3D0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: var(--stage-h, 100vh);
  height: var(--stage-h, 100dvh);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* ---------- 背景 ---------- */
.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 68% at 50% -12%, #FFD49C 0%, #FFE7C8 42%, #FFF6EB 72%, #FFF9F1 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(255, 236, 214, 0), rgba(249, 220, 189, .6));
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}

.blob-a {
  width: 190px;
  height: 190px;
  left: -80px;
  top: 90px;
  background: radial-gradient(circle at 35% 35%, #FFD7A5, rgba(255, 196, 140, .1));
}

.blob-b {
  width: 230px;
  height: 230px;
  right: -110px;
  top: 38%;
  background: radial-gradient(circle at 40% 40%, #FFC7A1, rgba(255, 170, 120, .08));
}

.blob-c {
  width: 160px;
  height: 160px;
  left: 8%;
  bottom: -50px;
  background: radial-gradient(circle at 50% 50%, #FFE3AC, rgba(255, 218, 150, .08));
}

.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(224, 150, 90, .22) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .15) 45%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .15) 45%, transparent 78%);
}

.bg-coin {
  position: absolute;
  display: block;
  color: var(--gold-deep);
  opacity: .34;
  animation: floaty 7s ease-in-out infinite;
}

.bg-coin svg,
.bg-spark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.coin-a {
  width: 30px;
  height: 30px;
  right: 12%;
  top: 11%;
  transform: rotate(16deg);
}

.coin-b {
  width: 20px;
  height: 20px;
  left: 7%;
  top: 46%;
  opacity: .24;
  animation-delay: -3.4s;
}

.bg-spark {
  position: absolute;
  color: #FFFFFF;
  opacity: .8;
  animation: twinkle 3.6s ease-in-out infinite;
}

.spark-a {
  width: 18px;
  height: 18px;
  left: 13%;
  top: 12%;
}

.spark-b {
  width: 12px;
  height: 12px;
  right: 8%;
  top: 38%;
  animation-delay: -1.7s;
}

/* ---------- 应用外壳 ---------- */
.app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 470px;
  height: 100%;
  padding: max(10px, env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));
  gap: 11px;
}

/* ---------- 顶部积分卡 ---------- */
.hud {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 15px 12px;
  border-radius: 24px;
  color: #FFF9F0;
  background:
    linear-gradient(135deg, #FFAD5C 0%, #FF8A3D 46%, #F26D22 100%);
  box-shadow:
    0 20px 36px -16px rgba(212, 99, 27, .7),
    0 2px 0 rgba(255, 255, 255, .3) inset,
    0 -1px 0 rgba(155, 67, 10, .22) inset;
  overflow: hidden;
  isolation: isolate;
}

.hud::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255, 255, 255, .24) 1.4px, transparent 1.6px);
  background-size: 17px 17px;
  opacity: .5;
  -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%);
  mask-image: linear-gradient(120deg, #000, transparent 70%);
}

.hud::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -70px;
  width: 190px;
  height: 190px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 244, 204, .45), rgba(255, 244, 204, 0) 68%);
}

.hud-glow {
  position: absolute;
  left: 18%;
  top: -36px;
  width: 150px;
  height: 80px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  filter: blur(18px);
}

.me-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.me-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.me-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  background: #FFD9AF;
  border: 2px solid rgba(255, 255, 255, .88);
  box-shadow: 0 4px 10px rgba(123, 51, 5, .25);
}

.me-copy {
  min-width: 0;
}

.me-name {
  max-width: 126px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(156, 68, 5, .24);
}

.me-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  color: #FFF3D5;
  background: rgba(157, 60, 0, .2);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.4;
}

.me-tag .mp-icon {
  width: 11px;
  height: 11px;
}

.withdraw-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 7px;
  border: 0;
  border-radius: 999px;
  color: #7A3A00;
  background: linear-gradient(180deg, #FFF6D8 0%, #FFD166 100%);
  box-shadow:
    0 4px 0 #D3941E,
    0 8px 16px rgba(118, 51, 0, .24),
    0 1px 0 rgba(255, 255, 255, .8) inset;
  transition: transform .13s ease, box-shadow .13s ease, filter .2s ease;
}

.withdraw-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #D3941E, 0 4px 10px rgba(118, 51, 0, .2);
}

.withdraw-btn .wd-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #FFF7E6;
  background: linear-gradient(180deg, #FFA94F, #F07A1E);
  box-shadow: 0 2px 5px rgba(137, 57, 0, .28);
}

.withdraw-btn .wd-icon .mp-icon {
  width: 16px;
  height: 16px;
}

.wd-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.wd-copy b {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .3px;
}

.wd-copy small {
  font-size: 8.5px;
  font-weight: 700;
  opacity: .72;
}

.withdraw-btn.ready {
  animation: readyPulse 2.4s ease-in-out infinite;
}

.balance-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
}

.balance-main {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.balance-num {
  font-size: clamp(30px, 9.4vw, 38px);
  line-height: .92;
  font-weight: 900;
  letter-spacing: -1.6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(151, 62, 4, .2);
  transition: color .2s ease;
}

.balance-num.bump {
  animation: numberBump .5s cubic-bezier(.2, 1.5, .4, 1);
}

.balance-unit {
  margin-left: 5px;
  font-size: 12.5px;
  font-weight: 800;
  opacity: .92;
}

.balance-cny {
  flex: none;
  margin-bottom: 2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(133, 52, 0, .2);
  border: 1px solid rgba(255, 255, 255, .26);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress {
  height: 7px;
  margin-top: 11px;
  border-radius: 999px;
  background: rgba(133, 52, 0, .25);
  box-shadow: 0 1px 1px rgba(255, 255, 255, .24) inset;
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFE9A9 0%, #FFD166 55%, #FFC13C 100%);
  box-shadow: 0 0 12px rgba(255, 209, 102, .85);
  transition: width .65s cubic-bezier(.2, .85, .25, 1);
}

.progress-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  opacity: .93;
}

.progress-note > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rate-note {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 9px;
  font-weight: 700;
}

.hud.shake {
  animation: hudShake .4s ease;
}

/* ---------- 群聊卡 ---------- */
.chat-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFDF9 0%, #FFF9F1 100%);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow:
    0 24px 50px -26px rgba(105, 57, 19, .46),
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 0 0 1px rgba(238, 216, 193, .38);
  overflow: hidden;
}

.chat-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px 10px;
  border-bottom: 1px solid #F6E8D8;
  background:
    radial-gradient(90% 140% at 20% 0%, rgba(255, 234, 205, .85), rgba(255, 255, 255, 0) 66%),
    rgba(255, 255, 255, .62);
}

.group-avatars {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
}

.group-avatars > img {
  position: absolute;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFDF8;
  box-shadow: 0 2px 5px rgba(102, 55, 18, .16);
  background: #FFE2C1;
}

.group-avatars > img:nth-child(1) {
  left: 0;
  top: 0;
  z-index: 2;
}

.group-avatars > img:nth-child(2) {
  right: 0;
  top: 4px;
  z-index: 1;
}

.group-avatars > img:nth-child(3) {
  left: 7px;
  bottom: 0;
  z-index: 3;
}

.pending-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  z-index: 5;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  color: #FFF8EF;
  background: linear-gradient(180deg, #FF6F5B, #E5352A);
  border: 2px solid #FFFDF9;
  font-size: 9px;
  font-weight: 900;
  line-height: 13px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(190, 38, 22, .34);
}

.pending-badge.hide {
  display: none;
}

.group-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.group-name {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: .1px;
  color: #3B2719;
}

.group-name .mp-icon {
  width: 14px;
  height: 14px;
  color: #FF9A3D;
}

.group-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: #A18A78;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.group-sub > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43C281;
  box-shadow: 0 0 0 3px rgba(67, 194, 129, .14);
  animation: livePulse 2s ease-in-out infinite;
}

.dot-sep {
  opacity: .55;
}

.countdown-pill {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 8px 5px;
  border-radius: 12px;
  color: #B05A13;
  background: linear-gradient(180deg, #FFF4E2, #FFE8CD);
  border: 1px solid #FFDBB2;
  box-shadow: 0 2px 0 rgba(244, 192, 130, .28) inset;
  transition: background .25s ease, color .25s ease;
}

.countdown-pill span {
  font-size: 8.5px;
  font-weight: 700;
  opacity: .74;
  line-height: 1.2;
}

.countdown-pill b {
  margin-top: 1px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-pill.hot {
  color: #FFF8ED;
  background: linear-gradient(180deg, #FF735E, #E93B2D);
  border-color: #FFB3A2;
  animation: countHot 1s ease-in-out infinite;
}

.chat-notice {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 12px 0;
  padding: 7px 10px;
  border-radius: 11px;
  color: #9C5C22;
  background: linear-gradient(90deg, #FFF0DA, #FFF8EE);
  border: 1px dashed #FFD2A0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.chat-notice .mp-icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: #F08A2E;
}

.chat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 6px;
  background-image: radial-gradient(rgba(232, 202, 172, .38) 1px, transparent 1.2px);
  background-size: 18px 18px;
  background-position: 0 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chat-list::-webkit-scrollbar {
  display: none;
}

/* ---------- 聊天消息 ---------- */
.msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  animation: msgIn .3s ease both;
}

.msg-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  object-fit: cover;
  background: #FFE4C8;
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 2px 6px rgba(100, 55, 18, .14);
}

.msg-body {
  min-width: 0;
  max-width: calc(100% - 42px);
}

.msg-name {
  margin: 0 0 3px 3px;
  color: #A28A78;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.bubble {
  display: inline-block;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 4px 13px 13px 13px;
  color: #4A3529;
  background: #FFFFFF;
  border: 1px solid #F2E4D5;
  box-shadow: 0 2px 7px rgba(120, 70, 24, .06);
  font-size: 12.5px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg.alt .bubble {
  background: #FFF1DF;
  border-color: #FFE0BE;
}

.msg.you {
  flex-direction: row-reverse;
}

.msg.you .msg-avatar {
  display: none;
}

.msg.you .msg-body {
  max-width: 82%;
}

.msg.you .msg-name {
  margin-right: 3px;
  text-align: right;
}

.msg.you .bubble {
  display: block;
  color: #6F3A0C;
  background: linear-gradient(180deg, #FFE9C9, #FFDFB4);
  border-color: #FFC991;
  border-radius: 13px 4px 13px 13px;
  box-shadow: 0 2px 8px rgba(208, 125, 44, .12);
}

.msg.sys {
  justify-content: center;
  margin: 2px 0 10px;
}

.sys-pill {
  max-width: 88%;
  padding: 4px 10px;
  border-radius: 999px;
  color: #AC8B6D;
  background: rgba(250, 239, 225, .88);
  border: 1px solid rgba(236, 216, 194, .7);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.sys-pill b {
  color: #E1691C;
  font-weight: 800;
}

.typing .bubble {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 9px 12px;
}

.typing .bubble i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D7B79A;
  animation: typing 1.1s ease-in-out infinite;
}

.typing .bubble i:nth-child(2) {
  animation-delay: .15s;
}

.typing .bubble i:nth-child(3) {
  animation-delay: .3s;
}

/* ---------- 红包卡 ---------- */
.packet-msg {
  align-items: flex-start;
}

.packet-msg .msg-body {
  width: calc(100% - 42px);
  max-width: calc(100% - 42px);
}

.packet-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 11px 11px 9px;
  border: 0;
  border-radius: 17px;
  color: #FFF8EC;
  text-align: left;
  background:
    radial-gradient(120% 150% at 12% 0%, rgba(255, 220, 168, .3), rgba(255, 220, 168, 0) 55%),
    linear-gradient(135deg, #FF6B55 0%, #F24732 52%, #D92F27 100%);
  box-shadow:
    0 12px 24px -10px rgba(216, 47, 39, .64),
    0 1px 0 rgba(255, 255, 255, .34) inset,
    0 -2px 0 rgba(139, 22, 14, .22) inset;
  overflow: hidden;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .14s ease, box-shadow .14s ease, filter .2s ease;
  animation: packetPop .45s cubic-bezier(.2, 1.35, .4, 1) both;
}

.packet-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 60%;
  height: 200%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .2), rgba(255, 255, 255, 0));
  transform: rotate(14deg);
  animation: cardShine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.packet-card:active {
  transform: scale(.975);
  box-shadow: 0 5px 14px -6px rgba(216, 47, 39, .55);
}

.packet-card:focus-visible {
  outline: 3px solid rgba(255, 209, 102, .9);
  outline-offset: 2px;
}

.packet-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.packet-envelope {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: linear-gradient(180deg, #FFE9AC, #FFC94D);
  box-shadow:
    0 4px 10px rgba(119, 28, 2, .3),
    0 1px 0 rgba(255, 255, 255, .7) inset;
}

.packet-envelope svg {
  width: 29px;
  height: 29px;
}

.packet-info {
  flex: 1 1 auto;
  min-width: 0;
}

.packet-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .2px;
}

.packet-badge {
  flex: none;
  padding: 1.5px 5px;
  border-radius: 999px;
  color: #FFF6E8;
  background: rgba(132, 28, 9, .24);
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .2px;
}

.packet-sub {
  margin-top: 3px;
  color: rgba(255, 248, 236, .82);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.packet-claim {
  flex: none;
  min-width: 42px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #8A3B04;
  background: linear-gradient(180deg, #FFF4D0, #FFD166);
  box-shadow:
    0 3px 0 #C68816,
    0 5px 10px rgba(113, 27, 2, .24);
  font-size: 11.5px;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
  transition: transform .13s ease, box-shadow .13s ease;
}

.packet-card:active .packet-claim {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C68816;
}

.packet-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, .24);
  color: rgba(255, 248, 236, .78);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.3;
}

.packet-card.loading {
  filter: saturate(.8);
  pointer-events: none;
}

.packet-card.loading .packet-claim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8A3B04;
}

.packet-card.loading .packet-claim::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(138, 59, 4, .3);
  border-top-color: #8A3B04;
  animation: spin .7s linear infinite;
}

.packet-card.claimed,
.packet-card.expired {
  cursor: default;
  background: linear-gradient(135deg, #FBECDE 0%, #F4DCC7 100%);
  color: #79523A;
  box-shadow:
    0 6px 14px -10px rgba(139, 91, 50, .35),
    0 1px 0 rgba(255, 255, 255, .8) inset;
}

.packet-card.claimed::before {
  display: none;
}

.packet-card.claimed .packet-envelope,
.packet-card.expired .packet-envelope {
  background: #FFF9F1;
  box-shadow: 0 1px 4px rgba(139, 91, 50, .14) inset;
}

.packet-card.claimed .packet-envelope svg,
.packet-card.expired .packet-envelope svg {
  opacity: .72;
}

.packet-card.claimed .packet-sub,
.packet-card.expired .packet-sub,
.packet-card.claimed .packet-foot,
.packet-card.expired .packet-foot {
  color: #A7866E;
}

.packet-card.claimed .packet-badge,
.packet-card.expired .packet-badge {
  color: #8F6B50;
  background: rgba(143, 107, 80, .1);
  border-color: rgba(143, 107, 80, .16);
}

.packet-card.claimed .packet-claim {
  color: #C06816;
  background: #FFF9EF;
  box-shadow: none;
  font-size: 11px;
}

.packet-card.expired .packet-claim {
  color: #A08470;
  background: #FFF9EF;
  box-shadow: none;
  font-size: 10px;
}

.packet-card.claimed .packet-foot {
  border-top-color: rgba(143, 107, 80, .16);
}

.reward-fly {
  position: fixed;
  z-index: 130;
  width: 26px;
  height: 26px;
  pointer-events: none;
  animation: flyUp 1s cubic-bezier(.2, .7, .3, 1) forwards;
}

.reward-fly svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- 输入区 ---------- */
.chat-input {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #F4E5D5;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chat-input-field {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #F0DFCC;
  border-radius: 999px;
  outline: none;
  color: #4A3529;
  background: #F8EFE4;
  font-size: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.chat-input-field::placeholder {
  color: #B49C88;
}

.chat-input-field:focus {
  background: #FFFFFF;
  border-color: #FFC38A;
  box-shadow: 0 0 0 3px rgba(255, 154, 61, .12);
}

.send-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #FFF9F0;
  background: linear-gradient(180deg, #FFAB61, #FF7B2D);
  box-shadow:
    0 3px 0 #D9651B,
    0 6px 12px rgba(222, 107, 32, .3);
  opacity: .55;
  transition: transform .13s ease, opacity .2s ease, box-shadow .13s ease;
}

.send-btn.ready {
  opacity: 1;
}

.send-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #D9651B, 0 3px 7px rgba(222, 107, 32, .24);
}

.send-btn .mp-icon {
  width: 19px;
  height: 19px;
}

/* ---------- 吐司 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 140;
  max-width: min(82vw, 360px);
  padding: 9px 15px;
  border-radius: 999px;
  color: #FFF4E4;
  background: rgba(54, 29, 14, .94);
  box-shadow: 0 10px 26px rgba(44, 20, 4, .3);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* ---------- 通用遮罩 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(51, 26, 10, .5);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}

.overlay.center {
  align-items: center;
  padding: 22px;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: calc(var(--stage-h, 100dvh) - 18px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 7px 18px calc(16px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF5E8 100%);
  box-shadow: 0 -26px 60px rgba(53, 23, 5, .32);
  transform: translateY(42px);
  transition: transform .34s cubic-bezier(.18, .85, .3, 1);
}

.overlay.show .sheet {
  transform: translateY(0);
}

.sheet-handle {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #EAD4BE;
}

.sheet-close {
  position: absolute;
  right: 14px;
  top: 20px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8D6C53;
  background: #F7EADB;
  transition: transform .12s ease, background .2s ease;
}

.icon-btn:active {
  transform: scale(.92);
  background: #F0DECA;
}

.icon-btn .mp-icon {
  width: 18px;
  height: 18px;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
}

.sheet-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #A9550C;
  background: linear-gradient(180deg, #FFEFC8, #FFD170);
  box-shadow: 0 5px 12px rgba(213, 146, 39, .22), 0 1px 0 rgba(255, 255, 255, .75) inset;
}

.sheet-icon .mp-icon {
  width: 23px;
  height: 23px;
}

.sheet-title-copy h2 {
  margin: 0;
  color: #3B2719;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.2px;
}

.sheet-title-copy p {
  margin: 3px 0 0;
  color: #A08774;
  font-size: 10.5px;
  font-weight: 600;
}

.amount-panel {
  margin-top: 14px;
  padding: 13px 14px 12px;
  border-radius: 19px;
  color: #FFF9EF;
  background:
    radial-gradient(120% 160% at 90% 0%, rgba(255, 235, 186, .28), rgba(255, 235, 186, 0) 58%),
    linear-gradient(135deg, #FF9C4B, #F27422 72%, #E45E13);
  box-shadow: 0 12px 26px -12px rgba(206, 95, 20, .6), 0 1px 0 rgba(255, 255, 255, .28) inset;
}

.amount-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  opacity: .9;
}

.amount-cny {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(135, 46, 0, .2);
  border: 1px solid rgba(255, 255, 255, .26);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amount-panel-num {
  display: flex;
  align-items: baseline;
  margin-top: 5px;
}

.amount-panel-num b {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(150, 58, 0, .18);
}

.amount-panel-num span {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 700;
  opacity: .88;
}

.amount-panel-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, .25);
  font-size: 9px;
  font-weight: 600;
  opacity: .9;
}

.amount-panel-foot .mp-icon {
  width: 12px;
  height: 12px;
}

.field {
  display: block;
  margin-top: 15px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: #5D4230;
  font-size: 11.5px;
  font-weight: 800;
}

.field-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 13px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1.5px solid #EFDDCA;
  box-shadow: 0 2px 8px rgba(126, 78, 36, .05);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field-box .mp-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: #C09A7B;
}

.field-box input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  color: #3F2A1D;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.field-box input::placeholder {
  color: #BBA28D;
  font-size: 12px;
  font-weight: 500;
}

.field-box.focus {
  border-color: #FFAB63;
  box-shadow: 0 0 0 4px rgba(255, 138, 61, .12);
}

.field-box.error {
  border-color: #F05B4A;
  box-shadow: 0 0 0 4px rgba(240, 91, 74, .1);
  animation: hudShake .35s ease;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: #A98F7B;
  font-size: 9.5px;
  font-weight: 500;
}

.field-error {
  display: none;
  margin-top: 4px;
  color: #D94132;
  font-size: 10px;
  font-weight: 700;
}

.field-error.show {
  display: block;
}

.review-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 13px;
  padding: 9px 10px;
  border-radius: 12px;
  color: #9B6B2C;
  background: #FFF3DE;
  border: 1px solid #FFE1B8;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
}

.review-tip .mp-icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #E8952B;
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 50px;
  margin-top: 14px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  color: #FFF9EE;
  background: linear-gradient(180deg, #FFA354 0%, #FF7A2C 62%, #F06718 100%);
  box-shadow:
    0 5px 0 #C95510,
    0 12px 22px -8px rgba(221, 94, 18, .55),
    0 1px 0 rgba(255, 255, 255, .35) inset;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .4px;
  transition: transform .13s ease, box-shadow .13s ease, opacity .2s ease;
}

.primary-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #C95510, 0 6px 12px -5px rgba(221, 94, 18, .4);
}

.primary-btn:disabled,
.primary-btn.loading {
  opacity: .72;
  pointer-events: none;
}

.primary-btn .mp-icon {
  width: 19px;
  height: 19px;
}

.primary-btn.loading span::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 7px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 249, 238, .35);
  border-top-color: #FFF9EE;
  animation: spin .75s linear infinite;
}

.sheet-safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 9px 0 0;
  color: #B09A87;
  font-size: 9px;
  font-weight: 500;
}

.sheet-safe .mp-icon {
  width: 12px;
  height: 12px;
}

/* ---------- 广告 ---------- */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(120% 80% at 50% 10%, #45210E 0%, #241108 62%, #160A05 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}

.ad-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ad-card {
  width: 100%;
  max-width: 380px;
  border-radius: 26px;
  overflow: hidden;
  background: #FFF8EC;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .55);
  transform: scale(.94) translateY(8px);
  transition: transform .3s cubic-bezier(.2, 1.1, .4, 1);
}

.ad-overlay.show .ad-card {
  transform: scale(1) translateY(0);
}

.ad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  color: #FFE9C5;
  background: #2A1409;
  font-size: 10px;
  font-weight: 700;
}

.ad-tag {
  padding: 2px 7px;
  border-radius: 4px;
  color: #2A1409;
  background: #FFD166;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .5px;
}

.ad-creative {
  position: relative;
  height: 275px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    radial-gradient(90% 70% at 50% 22%, #FFF0C8 0%, #FFD897 44%, #FFB861 100%);
}

.ad-creative::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -90px;
  width: 330px;
  height: 200px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 66%);
}

.ad-brand {
  position: absolute;
  left: 14px;
  top: 13px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #9B4A00;
  background: rgba(255, 249, 233, .82);
  border: 1px solid rgba(255, 255, 255, .8);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(172, 100, 22, .14);
}

.ad-mascot {
  position: relative;
  z-index: 1;
  width: 216px;
  height: 216px;
  filter: drop-shadow(0 14px 16px rgba(146, 65, 11, .22));
  animation: mascotBob 2.6s ease-in-out infinite;
}

.ad-copy {
  position: absolute;
  right: 12px;
  top: 54px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 251, 240, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 5px 12px rgba(157, 85, 12, .13);
  transform: rotate(3deg);
}

.ad-copy b {
  color: #D94E20;
  font-size: 13px;
  font-weight: 900;
}

.ad-copy span {
  color: #9B6424;
  font-size: 9px;
  font-weight: 700;
}

.ad-shine {
  position: absolute;
  top: -30%;
  left: -20%;
  width: 36%;
  height: 160%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
  transform: rotate(16deg);
  animation: cardShine 4s ease-in-out infinite;
}

.ad-spark {
  position: absolute;
  color: #FFFFFF;
  opacity: .9;
  animation: twinkle 2.8s ease-in-out infinite;
}

.ad-spark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-spark.s1 {
  width: 16px;
  height: 16px;
  left: 16%;
  top: 26%;
}

.ad-spark.s2 {
  width: 10px;
  height: 10px;
  right: 12%;
  top: 18%;
  animation-delay: -1.2s;
}

.ad-spark.s3 {
  width: 12px;
  height: 12px;
  right: 24%;
  top: 40%;
  animation-delay: -2s;
}

.ad-coin {
  position: absolute;
  z-index: 2;
  opacity: .9;
  filter: drop-shadow(0 3px 4px rgba(139, 71, 8, .2));
}

.ad-coin svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-coin.ac1 {
  width: 25px;
  height: 25px;
  left: 17%;
  top: 48%;
  animation: floaty 4s ease-in-out infinite;
}

.ad-coin.ac2 {
  width: 18px;
  height: 18px;
  right: 14%;
  bottom: 26%;
  animation: floaty 5s ease-in-out infinite reverse;
}

.ad-bottom {
  position: relative;
  padding: 12px 16px 15px;
  background: #FFF8EC;
}

.ad-progress {
  height: 5px;
  border-radius: 999px;
  background: #F2E2CF;
  overflow: hidden;
}

.ad-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFB35C, #FF7A2C);
  transition: width .2s linear;
}

.ad-timer {
  position: absolute;
  right: 16px;
  top: 21px;
  display: flex;
  align-items: baseline;
  color: #E06A1B;
  font-weight: 900;
}

.ad-timer b {
  font-size: 23px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ad-timer small {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 800;
}

.ad-bottom p {
  margin: 8px 0 0;
  color: #A08874;
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
}

.ad-loading {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #FFE8C5;
  background: rgba(35, 17, 8, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.ad-loading.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ad-loading p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
}

.loading-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 209, 102, .2);
  border-top-color: #FFD166;
  animation: spin .8s linear infinite;
}

/* ---------- 弹窗 ---------- */
.modal-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 24px 19px 19px;
  border-radius: 27px;
  text-align: center;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF4E4 100%);
  box-shadow: 0 32px 80px rgba(44, 18, 3, .42), 0 1px 0 rgba(255, 255, 255, .9) inset;
  overflow: hidden;
  transform: scale(.9) translateY(8px);
  transition: transform .28s cubic-bezier(.2, 1.3, .4, 1);
}

.overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-glow {
  position: absolute;
  left: 50%;
  top: -70px;
  width: 220px;
  height: 160px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, .4), rgba(255, 209, 102, 0) 70%);
  pointer-events: none;
}

.reward-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFF0B8, #FFD166);
  box-shadow: 0 8px 20px rgba(213, 145, 20, .32), 0 1px 0 rgba(255, 255, 255, .8) inset;
  animation: coinPop .5s cubic-bezier(.2, 1.5, .4, 1) both;
}

.reward-icon::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px dashed rgba(240, 161, 26, .38);
  animation: spin 14s linear infinite;
}

.reward-icon svg {
  width: 36px;
  height: 36px;
}

.reward-label {
  color: #8C6A4E;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
}

.reward-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 3px;
  color: #F06A1C;
  line-height: 1;
}

.reward-amount b {
  font-size: 43px;
  font-weight: 900;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(212, 105, 20, .14);
}

.reward-amount small {
  margin-left: 4px;
  color: #A97E5B;
  font-size: 11px;
  font-weight: 800;
}

.reward-desc {
  margin: 10px 0 0;
  color: #A28A77;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
}

.reward-card .primary-btn {
  margin-top: 16px;
}

.success-card {
  padding-top: 26px;
}

.success-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #FFF8E6;
  background: linear-gradient(180deg, #FFB55E 0%, #FF8A3D 58%, #F06A1C 100%);
  box-shadow:
    0 10px 24px rgba(216, 105, 20, .34),
    0 2px 0 rgba(255, 255, 255, .45) inset;
  animation: coinPop .55s cubic-bezier(.2, 1.5, .4, 1) both;
}

.success-ring::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 138, 61, .36);
  animation: spin 16s linear infinite;
}

.success-ring .mp-icon {
  width: 39px;
  height: 39px;
}

.success-card h2 {
  margin: 0;
  color: #3B2719;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.4px;
}

.success-desc {
  margin: 7px 0 0;
  color: #A18A77;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.55;
}

.success-detail {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFF3E2;
  border: 1px solid #FFE3C1;
  text-align: left;
}

.success-detail > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.success-detail span {
  color: #A58B77;
  font-size: 9.5px;
  font-weight: 600;
}

.success-detail b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6A4A30;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.review-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #B26A16;
  background: #FFF1D8;
  border: 1px solid #FFE0AF;
  font-size: 9.5px;
  font-weight: 700;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F0A11A;
  box-shadow: 0 0 0 3px rgba(240, 161, 26, .16);
  animation: livePulse 1.6s ease-in-out infinite;
}

.success-card .primary-btn {
  margin-top: 15px;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -14px;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 2.8s ease-in infinite;
}

.confetti i:nth-child(1) { left: 12%; background: #FF8A3D; animation-delay: .05s; }
.confetti i:nth-child(2) { left: 26%; background: #FFD166; animation-delay: .5s; }
.confetti i:nth-child(3) { left: 39%; background: #F04B39; animation-delay: .25s; }
.confetti i:nth-child(4) { left: 52%; background: #FFD166; animation-delay: .8s; }
.confetti i:nth-child(5) { left: 65%; background: #FF8A3D; animation-delay: .4s; }
.confetti i:nth-child(6) { left: 77%; background: #F04B39; animation-delay: .95s; }
.confetti i:nth-child(7) { left: 88%; background: #FFD166; animation-delay: .15s; }
.confetti i:nth-child(8) { left: 46%; background: #FFB35C; animation-delay: 1.1s; }

/* ---------- 动画 ---------- */
@keyframes msgIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes packetPop {
  0% { opacity: 0; transform: translateY(14px) scale(.93); }
  65% { opacity: 1; transform: translateY(-2px) scale(1.012); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardShine {
  0%, 55% { transform: translateX(-130%) rotate(14deg); }
  85%, 100% { transform: translateX(430%) rotate(14deg); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(5deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(.78) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(10deg); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.86); }
}

@keyframes countHot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes readyPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 209, 102, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 209, 102, .65)); }
}

@keyframes numberBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); color: #FFF3C4; }
  100% { transform: scale(1); }
}

@keyframes hudShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-3px); opacity: 1; }
}

@keyframes coinPop {
  0% { opacity: 0; transform: scale(.5) rotate(-18deg); }
  70% { opacity: 1; transform: scale(1.1) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes flyUp {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--fx, 0px), -150px) scale(.55) rotate(160deg); }
}

@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(360px) rotate(540deg); }
}

/* ---------- 小屏适配 ---------- */
@media (max-height: 720px) {
  .app {
    gap: 8px;
    padding-top: max(7px, env(safe-area-inset-top));
  }

  .hud {
    padding: 10px 13px 9px;
    border-radius: 21px;
  }

  .me-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .me-name {
    font-size: 13px;
  }

  .balance-row {
    margin-top: 8px;
  }

  .balance-num {
    font-size: clamp(27px, 8.6vw, 32px);
  }

  .progress {
    margin-top: 8px;
  }

  .chat-head {
    padding: 9px 11px 8px;
  }

  .chat-notice {
    margin-top: 7px;
    padding: 6px 9px;
  }

  .chat-list {
    padding-top: 8px;
  }

  .msg {
    margin-bottom: 8px;
  }

  .packet-card {
    padding: 9px 10px 8px;
  }

  .packet-envelope {
    width: 38px;
    height: 38px;
  }

  .ad-creative {
    height: 230px;
  }

  .ad-mascot {
    width: 180px;
    height: 180px;
  }
}

@media (max-height: 620px) {
  .chat-notice {
    display: none;
  }

  .hud::before {
    display: none;
  }

  .rate-note {
    display: none;
  }

  .balance-num {
    font-size: clamp(26px, 8vw, 29px);
  }

  .progress-note {
    font-size: 9px;
  }
}

@media (min-width: 560px) {
  .app {
    max-width: 440px;
    padding-left: 0;
    padding-right: 0;
  }

  .sheet {
    max-width: 440px;
    border-radius: 28px;
    margin-bottom: 20px;
  }

  .overlay:not(.center) {
    align-items: flex-end;
  }
}

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

  .chat-list {
    scroll-behavior: auto;
  }
}
