/* ============================================
   拾光岛 Glowly · 样式
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #0F0E23;
  color: #37325A;
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; background: #F6F4FF; position: relative; }

.hidden { display: none !important; }
.tiny { font-size: 12.5px; }
.dim { color: #8B85AD; }
.center { text-align: center; }

/* ==================== 顶栏 ==================== */
#topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 14px 8px;
  pointer-events: none;
}
.chip {
  pointer-events: auto;
  background: rgba(22, 19, 52, 0.5);
  color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(15, 14, 35, 0.18);
}
.chip.gold { background: rgba(255, 178, 32, 0.92); color: #5C3A00; }
.chip b { font-size: 14px; }

/* ==================== 视图切换 ==================== */
.view { display: none; }
.view.active { display: block; }
#views { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

/* ==================== 首页场景 ==================== */
#scene {
  position: relative; height: 348px; overflow: hidden;
  transition: background 1.2s ease;
}
#scene.t-dawn  { background: linear-gradient(180deg, #FFD9A0 0%, #FFB3C1 55%, #D8C6FF 100%); }
#scene.t-day   { background: linear-gradient(180deg, #7EC8FF 0%, #B5E3FF 60%, #E4F6FF 100%); }
#scene.t-dusk  { background: linear-gradient(180deg, #574A94 0%, #B96FCE 55%, #FFB199 100%); }
#scene.t-night { background: linear-gradient(180deg, #171531 0%, #2C2960 60%, #4B3F8C 100%); }

#skyfx { position: absolute; inset: 0; pointer-events: none; }
.sky-star {
  position: absolute; color: #FFF6D8; font-size: 11px; font-style: normal;
  animation: twinkle 2.6s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255, 246, 216, 0.9);
}
.moon { position: absolute; top: 14%; right: 12%; font-size: 40px; filter: drop-shadow(0 0 14px rgba(255,240,180,.55)); }
.sun {
  position: absolute; top: 12%; right: 13%; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle, #FFF3B0 30%, #FFD166 70%);
  box-shadow: 0 0 40px 14px rgba(255, 209, 102, 0.55);
  animation: aura 4s ease-in-out infinite;
}
.cloud {
  position: absolute; height: 22px; width: 74px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 22px -10px 0 2px rgba(255,255,255,.85), 44px -2px 0 0 rgba(255,255,255,.8);
}
.cloud.c1 { top: 18%; animation: drift 42s linear infinite; }
.cloud.c2 { top: 34%; transform: scale(.7); animation: drift 58s linear infinite; animation-delay: -20s; opacity: .8; }
@keyframes drift { from { left: -140px; } to { left: 620px; } }

#island {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 344px; pointer-events: none;
}
#island svg { display: block; width: 100%; }

#pet-area {
  position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%);
  width: 232px;
}
#pet-wrap { cursor: pointer; }
#pet-wrap svg { display: block; width: 100%; height: auto; }

#fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.scene-btn {
  position: absolute; right: 12px; bottom: 40px; z-index: 8;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.22); font-size: 18px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 14, 35, .2);
  transition: transform .15s;
}
.scene-btn:active { transform: scale(.9); }
.scene-btn.off { opacity: .55; }

/* 流星（夜晚偶尔划过） */
.shooting {
  position: absolute; top: 12%; left: 68%; width: 90px; height: 2px;
  background: linear-gradient(90deg, rgba(255,246,216,0), #FFF6D8);
  border-radius: 2px; transform: rotate(-38deg); opacity: 0;
  animation: shoot 11s ease-in infinite; animation-delay: 3s;
}
@keyframes shoot {
  0%, 88%, 100% { opacity: 0; transform: rotate(-38deg) translateX(0); }
  90% { opacity: 1; }
  96% { opacity: 0; transform: rotate(-38deg) translateX(-190px); }
}
.fx-p {
  position: absolute; pointer-events: none; opacity: 0;
  animation: fxfloat 1.35s ease-out forwards;
}
@keyframes fxfloat {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.15); }
}

.fly-star {
  position: fixed; z-index: 60; font-size: 16px; pointer-events: none;
  animation: flyup 0.9s cubic-bezier(.45, -0.2, .6, 1) forwards;
}
@keyframes flyup {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--fx), var(--fy)) scale(.4); opacity: .6; }
}

/* 气泡 */
.bubble {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 2px; min-width: 150px; max-width: 268px; width: max-content;
  background: rgba(255, 255, 255, 0.96); border-radius: 16px;
  padding: 10px 14px; font-size: 13.5px; line-height: 1.55; color: #45406B;
  box-shadow: 0 4px 16px rgba(40, 34, 90, 0.18);
  text-align: center; z-index: 6;
}
.bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; margin-left: -7px;
  border: 7px solid transparent; border-top-color: rgba(255, 255, 255, 0.96);
}
.bubble.pop { animation: bubblepop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bubblepop { from { transform: translateX(-50%) scale(.7); opacity: 0; } }

/* ==================== 内容区 ==================== */
.sheet {
  position: relative; z-index: 5;
  margin-top: -26px; padding: 16px 14px 8px;
  background: #F6F4FF; border-radius: 26px 26px 0 0;
  box-shadow: 0 -8px 24px rgba(31, 27, 70, 0.10);
}
.sheet.full { margin-top: 0; border-radius: 0; box-shadow: none; padding-top: calc(58px + env(safe-area-inset-top)); min-height: 100dvh; }

.page-title { font-size: 20px; color: #37325A; margin: 2px 4px 14px; }

.card {
  background: #fff; border-radius: 20px; padding: 16px;
  box-shadow: 0 2px 12px rgba(31, 27, 70, 0.06);
  margin-bottom: 14px;
}
.card.slim { padding: 12px 16px; font-size: 13.5px; color: #5A5480; }
.card-title { font-size: 15px; font-weight: 700; color: #4A4478; margin-bottom: 10px; }

/* ---------- 宠物卡 ---------- */
.pet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pet-title b { font-size: 17px; }
.tag {
  display: inline-block; background: #F1EDFF; color: #6C5CE7;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: 8px;
  vertical-align: 2px;
}
.mini-btn {
  background: #F1EDFF; color: #6C5CE7; border: none; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; padding: 7px 11px;
}
.mini-btn:disabled { opacity: .35; }

.growth-track {
  height: 14px; background: #ECE7FB; border-radius: 999px; overflow: hidden;
}
#growth-bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #FFD166, #FFA928);
  box-shadow: 0 0 8px rgba(255, 178, 32, .6);
  transition: width .7s cubic-bezier(.3, 1, .4, 1);
  position: relative; overflow: hidden;
}
#growth-bar-fill::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 34px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 2.6s ease-in-out infinite;
}
@keyframes shimmer { 0% { left: -40px; } 60%, 100% { left: 110%; } }
.growth { margin-bottom: 12px; }
.growth .tiny { margin-top: 6px; }

.dress-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 12px; }
.chip-btn {
  border: 1.5px solid #DAD4F2; background: #fff; color: #5A5480;
  border-radius: 12px; padding: 7px 11px; font-size: 13px; font-weight: 600;
}
.chip-btn.on { background: #6C5CE7; border-color: #6C5CE7; color: #fff; }
.chip-btn.locked { opacity: .55; }
.chip-btn.locked i { display: block; font-style: normal; font-size: 10px; font-weight: 400; color: #8B85AD; }

.big-btn {
  width: 100%; border: none; border-radius: 16px; padding: 14px;
  background: linear-gradient(180deg, #FFCF5C, #FFA928);
  color: #6B4300; font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 169, 40, 0.4), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .12s;
}
.big-btn:active { transform: scale(.97); }
.big-btn:disabled { filter: grayscale(.85); opacity: .6; box-shadow: none; }
.big-btn .cost { font-size: 13px; font-weight: 700; opacity: .75; }
#fed-info { margin-top: 8px; }

/* ---------- 今日任务 ---------- */
.today-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.today-head b { font-size: 15.5px; }
.task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 4px; border-bottom: 1px solid #F3F1FB; cursor: pointer;
  transition: opacity .25s;
}
.task-row:last-child { border-bottom: none; }
.t-icon { font-size: 24px; width: 32px; text-align: center; }
.t-name { flex: 1; font-size: 15px; font-weight: 600; color: #45406B; }
.t-reward { font-size: 12px; font-weight: 700; color: #F49B0B; }
.t-check {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: 2px dashed #D5CFEE; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff;
  transition: all .25s;
}
.task-row.done { opacity: .62; }
.task-row.done .t-name { text-decoration: line-through; text-decoration-color: #B9B2DC; }
.task-row.done .t-check {
  border: none; background: linear-gradient(180deg, #FFCF5C, #FFA928);
  box-shadow: 0 2px 8px rgba(255, 169, 40, .45);
}
#allday-banner {
  margin-top: 10px; padding: 11px; border-radius: 14px; text-align: center;
  background: linear-gradient(90deg, #FFF3D0, #FFE7A8, #FFF3D0);
  color: #8A5A00; font-size: 14px; font-weight: 800;
}
.foot-tip { text-align: center; font-size: 12px; color: #A49DC7; margin: 12px 0 6px; }

/* ---------- 足迹页 ---------- */
.stats-row { display: flex; gap: 10px; margin-bottom: 14px; }
.stat { flex: 1; text-align: center; padding: 13px 4px; margin-bottom: 0; }
.stat b { display: block; font-size: 24px; color: #6C5CE7; }
.stat span { font-size: 11.5px; color: #8B85AD; }

.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head b { font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: 11px; color: #A49DC7; padding: 2px 0 4px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: #5A5480; background: #FBFAFF;
}
.cal-cell.empty { background: transparent; }
.cal-cell b { font-weight: 600; font-size: 12px; line-height: 1.2; }
.cal-cell i { font-style: normal; font-size: 9px; line-height: 1; }
.cal-cell.partial i { color: #6C5CE7; font-size: 15px; margin-top: -4px; }
.cal-cell.full { background: #FFF3D0; }
.cal-cell.today { box-shadow: inset 0 0 0 2px #6C5CE7; }
.cal-cell.future { opacity: .35; }
.cal-legend { margin-top: 10px; text-align: center; }

.dex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dex-card {
  background: #FBFAFF; border-radius: 16px; padding: 10px 8px; text-align: center;
  position: relative; border: 1.5px solid transparent;
}
.dex-card.now { border-color: #FFD166; background: #FFFBEF; }
.dex-card .dex-pet svg { width: 78%; height: auto; margin: 0 auto; display: block; }
.dex-card.locked .dex-pet { filter: grayscale(1) brightness(.35); opacity: .45; }
.dex-card b { display: block; font-size: 13.5px; margin-top: 2px; }
.dex-card span { display: block; font-size: 11px; color: #8B85AD; margin-top: 3px; line-height: 1.5; }
.dex-card em {
  position: absolute; top: 8px; right: 8px; font-style: normal;
  background: #FFD166; color: #6B4300; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
}

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge {
  background: #FBFAFF; border-radius: 14px; padding: 10px 4px; text-align: center; cursor: pointer;
}
.badge span { font-size: 24px; display: block; }
.badge b { font-size: 11.5px; color: #5A5480; }
.badge.locked { filter: grayscale(1); opacity: .45; }

/* ---------- 设置页 ---------- */
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-row label { width: 74px; flex-shrink: 0; font-size: 13.5px; color: #8B85AD; }
.form-row.col { flex-direction: column; align-items: stretch; }
.form-row.col label { width: auto; margin-bottom: 2px; }
.input {
  flex: 1; width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid #DAD4F2; font-size: 15px; color: #37325A; background: #fff;
  outline: none; min-width: 0;
}
.input:focus { border-color: #6C5CE7; }
.input.ta { height: 150px; font-size: 11px; font-family: ui-monospace, Menlo, monospace; resize: none; margin: 6px 0; }
.input.big { font-size: 17px; padding: 13px 16px; text-align: center; border: none; }

.pal-row { display: flex; gap: 8px; }
.pal-chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid #DAD4F2; background: #fff; border-radius: 12px;
  padding: 9px 6px; font-size: 13px; font-weight: 600; color: #5A5480;
}
.pal-chip i { width: 18px; height: 18px; border-radius: 50%; }
.pal-chip.on { border-color: #6C5CE7; background: #F1EDFF; color: #6C5CE7; }

.st-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #F3F1FB; }
.st-row:last-child { border-bottom: none; }
.st-icon { font-size: 20px; cursor: pointer; }
.st-name { flex: 1; font-size: 14.5px; font-weight: 600; color: #45406B; cursor: pointer; }
.st-del {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: #FFECEC; color: #E05555; font-size: 13px; font-weight: 700;
}
.switch { position: relative; display: inline-block; }
.switch.push { margin-left: auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  display: block; width: 44px; height: 26px; border-radius: 999px;
  background: #DAD4F2; transition: background .25s; position: relative;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.switch input:checked + i { background: #6C5CE7; }
.switch input:checked + i::after { transform: translateX(18px); }

.btn {
  border: none; border-radius: 14px; padding: 12px 18px;
  font-size: 15px; font-weight: 700; transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(180deg, #8375F5, #6C5CE7); color: #fff;
  box-shadow: 0 4px 14px rgba(108, 92, 231, .4);
}
.btn.ghost { background: #F1EDFF; color: #6C5CE7; }
.btn.danger { background: #E05555; color: #fff; }
.btn.danger-ghost { background: #FFECEC; color: #E05555; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn.xl { padding: 15px 26px; font-size: 17px; border-radius: 18px; }
.btn-col { display: flex; flex-direction: column; }

/* ==================== 底部导航 ==================== */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 40;
  display: flex; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #EFECFA;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; padding: 8px 0 9px;
  font-size: 11.5px; font-weight: 700; color: #A49DC7;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tab span { font-size: 22px; transition: transform .2s; filter: grayscale(1) opacity(.6); }
.tab.active { color: #6C5CE7; }
.tab.active span { transform: translateY(-2px) scale(1.12); filter: none; }

/* ==================== 弹层 ==================== */
.overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 14, 35, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .25s;
}
.overlay.show { opacity: 1; }

.modal-box {
  width: min(92vw, 420px); max-height: 82dvh; overflow-y: auto;
  background: #fff; border-radius: 20px; padding: 20px;
}
.modal-title { font-size: 17px; font-weight: 800; color: #37325A; margin-bottom: 10px; }
.modal-text { font-size: 14px; color: #5A5480; line-height: 1.65; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 12px; }
.emoji-pick {
  font-size: 20px; padding: 5px 0; border-radius: 10px; border: none; background: #FBFAFF;
}
.emoji-pick.on { background: #F1EDFF; box-shadow: inset 0 0 0 2px #6C5CE7; }

/* ---------- 首次引导 ---------- */
.overlay.ob {
  opacity: 1; z-index: 80;
  background: linear-gradient(180deg, #171531 0%, #2C2960 55%, #4B3F8C 100%);
  align-items: center;
}
.ob-box { width: min(88vw, 360px); text-align: center; color: #fff; }
.ob-box h1 { font-size: 24px; margin: 14px 0 10px; }
.ob-slogan { color: #FFD166; font-weight: 800; letter-spacing: 2px; margin-bottom: 6px !important; }
.login-err {
  background: rgba(224, 85, 85, 0.18); border: 1px solid rgba(224, 85, 85, 0.4);
  color: #FFB3B3; border-radius: 12px; padding: 9px 12px; font-size: 13px !important;
  margin-bottom: 14px !important;
}
.login-tip { font-size: 12.5px !important; opacity: .6 !important; margin-top: 14px; }
.plain-link { color: #FFD166; text-decoration: none; border-bottom: 1px dashed rgba(255, 209, 102, .5); }
#login .input.big { margin-bottom: 12px; }
.ob-box p { font-size: 14.5px; line-height: 1.8; opacity: .88; margin-bottom: 20px; }
.ob-art { font-size: 54px; }
.ob-art svg { width: 190px; height: auto; margin: 0 auto; display: block; }
.ob-box .input.big { margin-bottom: 16px; }
.ob-eggs { display: flex; gap: 10px; margin: 14px 0 22px; }
.ob-egg {
  flex: 1; background: rgba(255, 255, 255, 0.08); border-radius: 18px;
  padding: 8px 4px; cursor: pointer; transition: all .2s;
}
.ob-egg svg { width: 100%; height: auto; }
.ob-egg b { font-size: 13px; }
.ob-egg.on {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px #FFD166, 0 6px 20px rgba(255, 209, 102, .35);
  transform: translateY(-4px);
}

/* ---------- 进化庆祝 ---------- */
#evolution { background: rgba(15, 14, 35, 0.88); z-index: 75; }
.evo-box { position: relative; text-align: center; color: #fff; padding: 20px; }
.evo-rays {
  position: absolute; left: 50%; top: 34%; width: 420px; height: 420px;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255, 209, 102, 0.14) 0 9deg, transparent 9deg 18deg);
  border-radius: 50%; animation: spin 16s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
#evo-pet { position: relative; }
#evo-pet svg { width: 250px; height: auto; animation: evopop .7s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes evopop { 0% { transform: scale(.2); opacity: 0; } 65% { transform: scale(1.12); } 100% { transform: scale(1); } }
#evo-title { font-size: 24px; color: #FFD166; margin: 6px 0 10px; position: relative; }
#evo-line { font-size: 15px; line-height: 1.75; max-width: 300px; margin: 0 auto 22px; opacity: .92; position: relative; }
#evo-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; top: -20px; border-radius: 2px; animation: confall linear forwards; }
@keyframes confall { to { transform: translateY(108vh) rotate(760deg); } }

/* ---------- 轻提示 ---------- */
#toast-wrap {
  position: fixed; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: 92vw;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: rgba(30, 27, 58, 0.94); color: #fff;
  border-radius: 14px; padding: 11px 16px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(15, 14, 35, .35);
  opacity: 0; transform: translateY(10px); transition: all .3s;
  max-width: 92vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.gold { background: linear-gradient(90deg, #B8860B, #DAA520); color: #FFFBEF; }
.toast button { background: none; border: none; color: #FFD166; font-size: 14px; font-weight: 800; flex-shrink: 0; }

.bump { animation: bumpk .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bumpk { 35% { transform: scale(1.22); } }

/* ==================== 宠物动画 ==================== */
.pet-anim.bob { animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.pet-anim.float { animation: floaty 3.6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-11px); } }

.pet-squish { transform-box: fill-box; transform-origin: 50% 94%; }
.egg-wobble { animation: wobble 3.6s ease-in-out infinite; }
@keyframes wobble {
  0%, 55%, 100% { transform: rotate(0); }
  62% { transform: rotate(-3deg); }
  70% { transform: rotate(2.6deg); }
  78% { transform: rotate(-1.6deg); }
  84% { transform: rotate(0); }
}
.squishing .pet-squish { animation: squish .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes squish { 35% { transform: scale(1.1, .82); } 70% { transform: scale(.94, 1.06); } }

.eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5%, 97.5% { transform: scaleY(.08); } }
.sleepy .eye { animation: none; transform: scaleY(.55); }

.mouth-open { opacity: 0; }
.eating .mouth-smile { opacity: 0; }
.eating .mouth-open { opacity: 1; transform-box: fill-box; transform-origin: center; animation: munch .42s ease-in-out 2; }
@keyframes munch { 50% { transform: scaleY(.25); } }

.aura { animation: aura 3.2s ease-in-out infinite; }
@keyframes aura { 50% { opacity: .55; } }

.wing-l { transform-box: fill-box; transform-origin: right center; animation: flapL 1.7s ease-in-out infinite; }
.wing-r { transform-box: fill-box; transform-origin: left center; animation: flapR 1.7s ease-in-out infinite; }
@keyframes flapL { 50% { transform: rotate(10deg); } }
@keyframes flapR { 50% { transform: rotate(-10deg); } }

.spark { animation: twinkle 2.4s ease-in-out infinite; }
.spark.s2 { animation-delay: .7s; }
.spark.s3 { animation-delay: 1.3s; }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ant-star { transform-box: fill-box; transform-origin: center; animation: starpulse 2.8s ease-in-out infinite; }
@keyframes starpulse { 50% { transform: scale(1.18) rotate(8deg); } }

.pet-svg.static * { animation: none !important; }

/* 星星糖掉落 */
.food-drop {
  position: absolute; left: 50%; top: -16px; width: 46px; margin-left: -23px; z-index: 7;
  animation: fooddrop 1.35s cubic-bezier(.5, 0, .6, 1) forwards;
}
.food-drop svg { width: 100%; }
@keyframes fooddrop {
  0% { transform: translateY(0) rotate(-20deg); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translateY(128px) rotate(14deg); }
  68% { transform: translateY(118px) rotate(6deg); }
  88% { transform: translateY(132px) rotate(0) scale(.8); opacity: 1; }
  100% { transform: translateY(138px) scale(.3); opacity: 0; }
}

/* 桌面端微调 */
@media (min-width: 560px) {
  #scene { height: 390px; border-radius: 0 0 0 0; }
  body::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at 20% 10%, #1C1A3E 0%, #0F0E23 60%);
  }
}
