/* game4 只覆盖底部导航配色；其余首页样式保持 03_Game 原版。 */
.stage-bg.art-ready {
  background-image: url("../art/home/stage-bg.jpg");
}

.hero-body.art-ready {
  background-image: url("../art/char/hero-idle.png");
}

.stage-shadow.art-ready {
  background: url("../art/home/shadow.png") center / contain no-repeat;
}

.home-scene .hero-label {
  width: 92px;
  margin-left: auto;
  margin-right: auto;
  padding: 2px 5px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-coin > span {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: url("../art/ui/memory-metal-currency.png") center / contain no-repeat;
}
.home-memory-metal>span{display:block;border:0;clip-path:none;box-shadow:none}.home-memory-metal>em{color:#8eeeff;text-shadow:0 0 8px rgba(77,220,255,.36)}

.home-hud-avatar.project-icon-avatar{padding:0;border:1px solid rgba(53,215,255,.34);background-color:#050b19;cursor:pointer;appearance:none}.home-hud-avatar.project-icon-avatar:active{transform:scale(.96)}
.home-hud-res{gap:6px}.home-hud-stamina,.home-memory-metal{height:40px;box-sizing:border-box}.home-hud-stamina{padding-right:10px}.home-hud-stamina-copy{min-width:0;display:flex;flex-direction:row;align-items:baseline;gap:5px;line-height:1;white-space:nowrap}.home-hud-stamina-copy small{margin-top:0;min-width:19px;color:rgba(225,218,241,.78);font-size:10px}.home-memory-metal{width:max-content;min-width:82px;flex:0 0 auto;padding:0 9px;gap:5px;justify-content:flex-start;border-radius:12px}.home-memory-metal .num{display:inline-block;min-width:4ch;font-size:14px;font-variant-numeric:tabular-nums;line-height:1;text-align:right;white-space:nowrap}.home-memory-metal>span{width:22px;height:22px;flex:0 0 22px}

.home-tabbar button {
  border-color: rgba(124, 92, 255, 0.26) !important;
  background: linear-gradient(180deg, rgba(25, 25, 58, 0.96), rgba(12, 15, 36, 0.98)) !important;
  color: rgba(225, 226, 255, 0.7) !important;
}

.home-tabbar button.active {
  border-color: rgba(53, 215, 255, 0.76) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #745cff 0%, #5f70f5 48%, #35d7ff 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 16px rgba(77, 111, 255, 0.34) !important;
}

.home-tabbar button.active::before {
  background: linear-gradient(90deg, #7c5cff, #35d7ff) !important;
}

.home-tabbar button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 4px 3px 3px !important;
  overflow: hidden;
}
.home-tabbar button > i {
  color: #8193c5;
  font-size: 17px;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 7px transparent;
  transition: color .18s ease, transform .18s ease, text-shadow .18s ease;
}
.home-tabbar button > span {
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tabbar button > small {
  display: none;
}
.home-tabbar button.active > i {
  color: #73e6ff;
  transform: translateY(-1px) scale(1.08);
  text-shadow: 0 0 5px #35d7ff, 0 0 11px rgba(124, 92, 255, .9);
}
.home-tabbar button.active > small { color: rgba(231, 240, 255, .72); }
@media (max-width: 360px) {
  .home-tabbar button { gap: 1px; }
  .home-tabbar button > i { font-size: 15px; }
  .home-tabbar button > span { font-size: 10px; }
}

.game4-overlay[hidden], .game4-toast[hidden] { display: none; }
.game4-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
  padding: 14px; background: rgba(0, 3, 12, .76); backdrop-filter: blur(7px);
}
.game4-sheet, .game4-dialog {
  width: min(100%, 396px); border: 1px solid rgba(93, 204, 255, .28); border-radius: 18px;
  background: linear-gradient(180deg, rgba(25, 29, 58, .99), rgba(5, 10, 24, .99));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .06);
  padding: 16px;
}
.game4-dialog { align-self: center; }
.game4-sheet header, .game4-dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.game4-sheet h2, .game4-dialog h2 { margin: 0; font-size: 17px; }
.game4-close { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.05); color: #fff; font-size: 23px; }
.game4-sheet-actions { display: grid; gap: 10px; }
.game4-action, .game4-submit { min-height: 44px; border: 1px solid rgba(124,92,255,.42); border-radius: 11px; color: #fff; font-weight: 700; background: linear-gradient(135deg, rgba(116,92,255,.34), rgba(53,215,255,.17)); }
.game4-action.danger { border-color: rgba(255,82,125,.42); background: rgba(255,63,105,.12); color: #ff9ab2; }
.game4-dialog label { display: block; margin: 11px 2px 7px; color: rgba(229,235,255,.75); font-size: 12px; }
.game4-dialog input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid rgba(89,155,224,.24); border-radius: 11px; outline: 0; color: #fff; background: rgba(4,10,25,.82); }
.game4-dialog input:focus { border-color: #35d7ff; box-shadow: 0 0 0 3px rgba(53,215,255,.12); }
.game4-dialog small { display: block; margin-top: 6px; text-align: right; color: rgba(210,222,255,.58); }
.game4-hint { margin: 8px 2px 13px; color: rgba(210,222,255,.55); font-size: 11px; line-height: 1.6; }
.game4-submit { width: 100%; margin-top: 14px; background: linear-gradient(135deg, #745cff, #35d7ff); }
.game4-toast-stack {
  position: fixed;
  z-index: 2147483647;
  left: 50%;
  bottom: calc(100dvh - 94px - env(safe-area-inset-top));
  width: min(92vw, 390px);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
  pointer-events: none;
}
.game4-toast-message {
  max-width: 100%;
  padding: 7px 13px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  background:
    linear-gradient(#03050c, #03050c) padding-box,
    linear-gradient(110deg, #35d7ff 0%, #745cff 52%, #c36dff 100%) border-box;
  box-shadow:
    0 0 7px rgba(53, 215, 255, .48),
    0 0 14px rgba(116, 92, 255, .38),
    inset 0 0 9px rgba(78, 87, 183, .16);
  color: #b9f7ff;
  -webkit-text-fill-color: currentColor;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(75, 224, 255, .9), 0 0 9px rgba(154, 92, 255, .72);
  animation: game4-toast-rise 2.6s cubic-bezier(.18,.74,.22,1) both;
}
.game4-toast-message:nth-child(3n + 2) {
  color: #d7c8ff;
}
.game4-toast-message:nth-child(3n) {
  color: #ffb9e7;
}
@keyframes game4-toast-rise {
  0% { opacity: 0; transform: translateY(12px) scale(.96); }
  12% { opacity: 1; transform: translateY(0) scale(1); }
  62% { opacity: .96; transform: translateY(-18px); }
  100% { opacity: 0; transform: translateY(-105px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
  .game4-toast-message { animation-duration: 1.8s; animation-timing-function: linear; }
}
