:root {
  --pink: #ff8fb6;
  --pink-deep: #f0669b;
  --pink-soft: #ffd1e3;
  --lav: #b9a9ff;
  --mint: #7edcb9;
  --gold: #ffc94d;
  --ink: #5a3c52;
  --ink-soft: #95748b;
  --cream: #fff6fb;
  --font-round: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "YouYuan",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "YouYuan",
    system-ui, -apple-system, sans-serif;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #ffe9f4;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  position: fixed;
  inset: 0;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#game {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: #ffeef7;
}

.hidden {
  display: none !important;
}

/* ---------------- HUD ---------------- */
#hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 0;
  z-index: 12;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(196, 120, 158, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pill span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.pill b {
  font-family: var(--font-round);
  font-size: 14px;
  color: var(--ink);
  line-height: 1;
}

.score-pill {
  margin-right: auto;
}

.score-pill b {
  font-size: 16px;
  background: linear-gradient(180deg, #ff7fae, #f0669b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 限时模式最后 10 秒 */
.round-pill.urgent {
  background: linear-gradient(180deg, #ff8fa8, #ff5c8a);
  border-color: rgba(255, 255, 255, 0.98);
  animation: urgentPulse 0.5s ease-in-out infinite alternate;
}

.round-pill.urgent span,
.round-pill.urgent b {
  color: #fff;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(196, 120, 158, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: linear-gradient(160deg, #fff, #ffe3f0);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 8px rgba(196, 120, 158, 0.2);
  overflow: hidden;
}

.mini-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.status-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bar {
  position: relative;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 4px rgba(160, 90, 130, 0.12);
  overflow: hidden;
}

.bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  border-radius: 99px;
  transition: width 0.12s linear;
}

.hp-bar i {
  background: linear-gradient(90deg, #ffb3ce, #ff7fae 55%, #ff5f92);
}

.en-bar {
  height: 8px;
}

.en-bar i {
  background: linear-gradient(90deg, #a9e9d4, #8fd8ff 55%, #b9a9ff);
}

.bar em {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #6b4354;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.enemy-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(196, 120, 158, 0.16);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink);
}

.enemy-chip b {
  font-size: 13px;
  color: var(--pink-deep);
}

.hud-tags {
  position: absolute;
  top: 100%;
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-top: 4px;
}

.boost-tag {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffd7a1, #ffb45e);
  color: #7a4a12;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(255, 160, 80, 0.35);
  animation: pulse 1s ease-in-out infinite;
}
.atk-tag {
  background: linear-gradient(90deg, #ffe2a6, #ffc36b);
  color: #7a5012;
  box-shadow: 0 3px 8px rgba(255, 180, 80, 0.35);
  animation: none;
}
.rage-tag {
  background: linear-gradient(90deg, #fff0a6, #ffd84d);
  color: #7a5a12;
  box-shadow: 0 3px 8px rgba(255, 210, 70, 0.45);
}

.shield-tag {
  background: linear-gradient(90deg, #d6efff, #8fd3ff);
  color: #24506e;
  box-shadow: 0 3px 8px rgba(120, 190, 240, 0.45);
}

/* ---------------- 道具栏 ---------------- */
#powerbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  gap: 6px;
  padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 8px);
  pointer-events: none;
}

.power {
  pointer-events: auto;
  position: relative;
  flex: 1;
  height: 48px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 11px rgba(196, 120, 158, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: transform 0.09s ease, filter 0.15s ease;
  font-family: var(--font-body);
}

.power:active {
  transform: scale(0.94);
}

.power.empty {
  opacity: 0.42;
  filter: grayscale(0.7);
}

.p-emoji {
  font-size: 19px;
  line-height: 1.1;
  filter: drop-shadow(0 2px 3px rgba(160, 90, 130, 0.2));
}

.p-name {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}

.p-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff9ec4, #ff6fa8);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(240, 90, 140, 0.4);
}

.power.empty .p-count {
  background: #cbb9c5;
  box-shadow: none;
}

.power.used {
  animation: powerPop 0.32s ease;
}

/* ---------------- 横幅 / 提示 ---------------- */
#banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.banner-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(255, 236, 246, 0.97));
  border: 3px solid #fff;
  border-radius: 28px;
  padding: 16px 34px 18px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(180, 90, 135, 0.26), 0 0 0 5px rgba(255, 255, 255, 0.35);
  transform: rotate(-2.5deg);
  animation: bannerPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

#banner.pop .banner-card {
  animation: bannerPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.banner-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(90deg, #ff9ec4, #b9a9ff);
  padding: 3px 12px;
  border-radius: 99px;
}

.banner-card strong {
  display: block;
  font-family: var(--font-round);
  font-size: 44px;
  line-height: 1.05;
  margin: 6px 0 2px;
  background: linear-gradient(180deg, #ff8fb6, #f0669b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.8);
}

.banner-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

#toast {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 118px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(90, 50, 80, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(100, 40, 75, 0.3);
  animation: toastIn 0.28s ease both;
  pointer-events: none;
}

/* PWA 安装提示卡片 */
.install-tip {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7fc, #ffe9f5);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(214, 120, 160, 0.28);
  animation: installIn 0.42s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.install-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  box-shadow: inset 0 -2px 0 rgba(214, 120, 160, 0.15);
}

.install-body {
  flex: 1;
  min-width: 0;
  padding-right: 14px;
}

.install-body b {
  display: block;
  font-size: 12px;
  color: #6b4354;
}

.install-body p {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: #9a6b80;
}

.install-steps {
  margin-top: 4px !important;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  color: #8a5a76 !important;
}

.install-go {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9cc4, #f0669b);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 0 #d94f85;
  cursor: pointer;
}

.install-go:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #d94f85;
}

.install-close {
  position: absolute;
  top: 3px;
  right: 6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: #c79bb0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

@keyframes installIn {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------------- 屏幕 ---------------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  overflow-y: auto;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

/* 首页与选球页共用同一套不透明背景，避免透出画布造成色差 */
#screen-menu,
#screen-heroes {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 214, 233, 0.9), transparent 45%),
    radial-gradient(circle at 82% 30%, rgba(219, 214, 255, 0.85), transparent 48%),
    radial-gradient(circle at 50% 92%, rgba(206, 246, 232, 0.9), transparent 52%),
    linear-gradient(160deg, #fff1f8, #fde8f4 45%, #efe9ff 75%, #e4f6f0);
}

#screen-over,
#screen-pause {
  background: rgba(86, 44, 72, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.menu {
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  animation: menuIn 0.5s ease both;
}

.brand {
  text-align: center;
  position: relative;
}

.brand-badge {
  width: 54px;
  height: 54px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 30px;
  background: linear-gradient(160deg, #fff, #ffdfee);
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(220, 120, 165, 0.25);
  animation: bob 2.6s ease-in-out infinite;
  overflow: hidden;
}

.brand-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-badge.hero-badge {
  width: 88px;
  height: 88px;
  padding: 6px;
  margin-bottom: 6px;
}

.hero-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: -4px;
}

.hero-current-name {
  font-family: var(--font-round);
  font-size: 19px;
  line-height: 1.1;
  color: var(--ink);
}

.hero-current-trait {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
}

.switch-hero {
  margin-top: 3px;
  padding: 6px 15px;
  font-size: 11px;
  border-radius: 99px;
}

/* 模式选择 */
.mode-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  font-family: var(--font-round);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.mode-btn .mode-emoji {
  font-size: 16px;
  line-height: 1;
}

.mode-btn b {
  font-size: 11px;
  letter-spacing: 0.5px;
}

.mode-btn.selected {
  background: linear-gradient(180deg, #fff4fa, #ffe0ef);
  border-color: #ff9ec4;
  color: #e2518c;
  box-shadow: 0 4px 0 rgba(255, 140, 180, 0.35), 0 8px 16px rgba(255, 120, 170, 0.18);
  transform: translateY(-1px);
}

.mode-desc {
  min-height: 14px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.mode-best {
  align-self: center;
  padding: 3px 11px;
  border-radius: 99px;
  background: rgba(255, 236, 200, 0.6);
  font-size: 10.5px;
  font-weight: 800;
  color: #b97a34;
}

.picker-sub {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.brand h1.picker-title {
  font-size: clamp(26px, 7vw, 34px);
}

.brand h1 {
  font-family: var(--font-round);
  font-size: clamp(34px, 9vw, 44px);
  letter-spacing: 1px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ff9ec4 0%, #ff6fa8 45%, #d98ef0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 6px 10px rgba(255, 120, 170, 0.35));
}

.brand .sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #c58aab;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 8px 8px;
  min-height: 130px;
  border-radius: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 6px 14px rgba(200, 120, 160, 0.14);
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease,
    background 0.14s ease;
}

.hero-card:active {
  transform: scale(0.97);
}

.hero-card.selected {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(255, 120, 170, 0.3), 0 0 0 3px rgba(255, 143, 182, 0.22);
  transform: translateY(-2px);
}

.hero-card.selected::after {
  content: "♥";
  position: absolute;
  top: -7px;
  right: -5px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(240, 90, 140, 0.45);
}

.hero-face {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-face svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-name {
  font-family: var(--font-round);
  font-size: 15px;
  line-height: 1.15;
  color: var(--ink);
}

.hero-tag {
  font-size: 8.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #ffa6c9, #ff7fae);
  border-radius: 99px;
  padding: 1px 7px;
  white-space: nowrap;
}

.hero-card .trait {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 2px;
  font-size: 9.5px;
  line-height: 1.25;
  color: var(--ink-soft);
  font-weight: 700;
}

.hero-hp {
  font-size: 9px;
  font-weight: 800;
  color: #e8618f;
}

.hero-card.locked {
  filter: grayscale(0.7);
  opacity: 0.66;
  background: rgba(255, 255, 255, 0.5);
  border-style: dashed;
}

.hero-card.locked:active {
  transform: scale(0.99);
}

.hero-card.locked .hero-tag {
  background: linear-gradient(90deg, #c9c3d4, #b3aabd);
}

.hero-card.locked .trait {
  color: #8d8298;
}

.hero-card.locked .hero-hp {
  color: #9a90a6;
}

.big-btn {
  width: 100%;
  border: 0;
  border-radius: 22px;
  padding: 15px 22px;
  font-family: var(--font-round);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(180deg, #ffa6c9, #ff6fa8);
  box-shadow: 0 6px 0 #e25c92, 0 14px 26px rgba(255, 100, 155, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.big-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #e25c92, 0 6px 14px rgba(255, 100, 155, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.big-btn .play {
  font-size: 14px;
  opacity: 0.9;
}

.ghost-btn {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  padding: 13px 18px;
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(160, 100, 140, 0.16);
  cursor: pointer;
  transition: transform 0.08s ease;
}

.ghost-btn:active {
  transform: scale(0.97);
}

.menu-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.best-line {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.best-line b {
  color: var(--pink-deep);
  font-size: 12px;
}

.foot-btns {
  display: flex;
  gap: 6px;
}

.chip-btn {
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-body);
  box-shadow: 0 3px 8px rgba(180, 110, 150, 0.14);
  cursor: pointer;
}

.chip-btn:active {
  transform: scale(0.95);
}

#btnMute2 {
  width: 100%;
  padding: 10px 14px;
  font-size: 12px;
  border-radius: 16px;
}

.hint-line {
  font-size: 10.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
  opacity: 0.9;
}

.deco {
  position: absolute;
  font-size: 26px;
  opacity: 0.55;
  pointer-events: none;
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(220, 130, 175, 0.25));
}

.deco.d1 { left: 7%; top: 12%; animation-delay: 0s; }
.deco.d2 { right: 8%; top: 20%; font-size: 22px; animation-delay: 1.2s; }
.deco.d3 { left: 11%; bottom: 13%; font-size: 20px; animation-delay: 2.1s; }
.deco.d4 { right: 9%; bottom: 18%; font-size: 24px; animation-delay: 0.7s; }

/* ---------------- 面板 ---------------- */
.panel {
  width: min(340px, 92vw);
  background: linear-gradient(170deg, #fff, #fff3fa 65%, #f3eeff);
  border: 3px solid #fff;
  border-radius: 32px;
  padding: 22px 20px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(100, 40, 75, 0.34), inset 0 0 0 4px rgba(255, 255, 255, 0.5);
  animation: panelIn 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.panel-face {
  width: 62px;
  height: 62px;
  margin: -46px auto 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(160deg, #fff, #ffe0ef);
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(200, 100, 150, 0.3);
}

.panel h2 {
  font-family: var(--font-round);
  font-size: 26px;
  background: linear-gradient(180deg, #ff8fb6, #e8618f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}

.panel > p {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 8px;
}

.stats > div {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #ffe5f1;
  border-radius: 16px;
  padding: 8px 4px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats span {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.6px;
}

.stats b {
  font-family: var(--font-round);
  font-size: 20px;
  color: var(--pink-deep);
  line-height: 1.1;
}

.best-hint {
  font-size: 10.5px !important;
  color: #b18a9f !important;
  margin: 2px 0 12px !important;
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-row .big-btn,
.btn-row .ghost-btn {
  flex: 1;
  font-size: 16px;
  padding: 13px 8px;
}

.btn-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

/* 旋转提示 */
#rotateHint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #ffe9f4;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

@media (orientation: landscape) and (max-height: 520px) {
  #rotateHint {
    display: flex;
  }
}

/* ---------------- 动画 ---------------- */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-6px) rotate(4deg); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes urgentPulse {
  from { transform: scale(1); box-shadow: 0 3px 10px rgba(255, 92, 138, 0.25); }
  to { transform: scale(1.09); box-shadow: 0 0 14px rgba(255, 92, 138, 0.7); }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bannerPop {
  0% { opacity: 0; transform: scale(0.7) rotate(-10deg); }
  60% { opacity: 1; transform: scale(1.05) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2.5deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes powerPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.14) rotate(-3deg); }
  100% { transform: scale(1); }
}

@media (max-height: 700px) {
  .brand-badge { width: 44px; height: 44px; font-size: 24px; }
  .brand h1 { font-size: 32px; }
  .menu { gap: 8px; }
  .hero-face { flex-basis: 38px; width: 38px; height: 38px; }
  .hero-card { min-height: 116px; padding: 7px 6px; }
  .big-btn { padding: 13px 20px; font-size: 18px; }
}
