/* ============================================================
   开心消消乐 · 样式（按 happy-match3 设计稿重构）
   清爽蓝白体系：主色 #228BE6 · 背景 #F0F7FF · 深色棋盘 #334155
   移动端优先 · 零依赖
   ============================================================ */
:root {
  /* 设计稿 tokens */
  --happy-background: #F0F7FF;
  --happy-foreground: #1E293B;
  --happy-card: #FFFFFF;
  --happy-card-foreground: #1E293B;
  --happy-primary: #228BE6;
  --happy-primary-foreground: #FFFFFF;
  --happy-primary-50: #E7F5FF;
  --happy-primary-100: #D0EBFF;
  --happy-primary-200: #A5D8FF;
  --happy-primary-300: #74C0FC;
  --happy-primary-400: #4DABF7;
  --happy-primary-500: #228BE6;
  --happy-primary-600: #1C7ED6;
  --happy-primary-700: #1971C2;
  --happy-primary-800: #1864AB;
  --happy-primary-900: #155592;
  --happy-muted: #E2E8F0;
  --happy-muted-foreground: #64748B;
  --happy-border: #CBD5E1;
  --happy-state-success: #40C057;
  --happy-state-warning: #FCC419;
  --happy-state-error: #FA5252;
  --happy-game-header: #1E293B;
  --happy-game-board: #334155;
  --happy-energy: var(--happy-state-warning);

  --happy-radius-sm: 4px;
  --happy-radius-md: 8px;
  --happy-radius-lg: 12px;
  --happy-radius-full: 9999px;

  --happy-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --shadow-card: 0 4px 20px rgba(30, 41, 59, 0.08);
  --shadow-btn-primary: 0 6px 18px rgba(34, 139, 230, 0.28);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--happy-font);
  color: var(--happy-foreground);
  background: var(--happy-background);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body { position: relative; }

/* ---------- 页面容器（单页状态机） ---------- */
.page {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.page.active { display: flex; }
.hidden { display: none !important; }

/* ---------- 线性图标（lucide 风格） ---------- */
.ic {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.ic-sm { width: 14px; height: 14px; }
.ic-xl { width: 44px; height: 44px; }

/* ---------- 组件：按钮（设计稿 happy-btn） ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: var(--happy-radius-lg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: none;
  outline: none;
}
.btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--happy-primary-400), var(--happy-primary-600));
  color: var(--happy-primary-foreground);
  box-shadow: var(--shadow-btn-primary);
  width: 100%; height: 54px;
  font-size: 17px; letter-spacing: 2px;
}
.btn-primary:active { box-shadow: 0 4px 12px rgba(34, 139, 230, 0.3); }

.btn-secondary {
  background: #FFFFFF;
  color: var(--happy-primary-600);
  border: 2px solid var(--happy-primary-200);
  box-shadow: 0 4px 12px rgba(34, 139, 230, 0.10);
  height: 48px;
  font-size: 15px;
}
.btn-secondary:active { background: var(--happy-primary-50); border-color: var(--happy-primary-300); }

.btn-ghost {
  background: #FFFFFF;
  color: var(--happy-primary-600);
  border: 2px solid var(--happy-primary-200);
  box-shadow: 0 4px 12px rgba(34, 139, 230, 0.10);
  height: 44px;
  font-size: 14px;
}
.btn-ghost:active { background: var(--happy-primary-50); }

.btn-sm {
  height: 38px; padding: 0 14px;
  font-size: 13px;
  display: inline-flex;
}

/* ---------- 组件：卡片（设计稿 happy-card） ---------- */
.happy-card {
  background: var(--happy-card);
  border-radius: var(--happy-radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--happy-border);
}

/* 标题渐变（设计稿） */
.grad-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--happy-primary-500), var(--happy-primary-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 徽章（设计稿 happy-badge） */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--happy-radius-full);
  background: var(--happy-primary-100);
  color: var(--happy-primary-700);
}

/* ---------- 加载页 ---------- */
#page-load { background: var(--happy-background); }
.load-box { text-align: center; }
.load-candy {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #74C0FC, #228BE6);
  box-shadow: 0 8px 20px rgba(34, 139, 230, 0.35), inset 0 -5px 10px rgba(0, 0, 0, 0.15);
  animation: candy-bounce 1s ease-in-out infinite;
}
@keyframes candy-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.06); }
}
.load-title { font-size: 26px; color: var(--happy-primary-600); letter-spacing: 2px; margin-bottom: 22px; }
.load-bar {
  width: 200px; height: 8px; margin: 0 auto;
  background: var(--happy-primary-100); border-radius: var(--happy-radius-full); overflow: hidden;
}
.load-bar-in { height: 100%; width: 0%; background: linear-gradient(90deg, var(--happy-primary-300), var(--happy-primary-500)); transition: width .3s ease; }
.load-tip { margin-top: 12px; font-size: 13px; color: var(--happy-muted-foreground); }

/* ---------- 授权页 ---------- */
.auth-box { text-align: center; }
.auth-spinner {
  width: 46px; height: 46px; margin: 0 auto 20px;
  border: 4px solid var(--happy-primary-100); border-top-color: var(--happy-primary-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-box h2 { font-size: 20px; color: var(--happy-foreground); margin-bottom: 10px; }
.auth-tip { font-size: 13px; color: var(--happy-muted-foreground); margin-bottom: 22px; }

/* ============================================================
   首页（主题在上半部中间 · 三个按钮在下半部顶部，间距加大）
   ============================================================ */
#page-home {
  position: relative;
  justify-content: flex-start;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* 背景装饰 SVG（设计稿 deco，固定四角散布） */
.deco { position: fixed; pointer-events: none; z-index: 0; opacity: 0.55; }
.deco-1 { top: 8%; left: 6%; width: clamp(40px, 12vw, 56px); }
.deco-2 { top: 18%; right: 8%; width: clamp(36px, 11vw, 48px); }
.deco-3 { bottom: 22%; left: 8%; width: clamp(38px, 12vw, 52px); }
.deco-4 { bottom: 12%; right: 6%; width: clamp(32px, 10vw, 44px); }
.deco-5 { top: 50%; left: 3%; width: clamp(28px, 9vw, 40px); transform: translateY(-50%); }
.deco-6 { top: 50%; right: 3%; width: clamp(30px, 10vw, 42px); transform: translateY(-50%); }
@media (max-width: 380px) {
  .deco { opacity: 0.35; }
  .deco-5, .deco-6 { display: none; }
}

/* 品牌区：占视口上半部，内容垂直居中于其中 */
.home-head {
  width: 100%; max-width: 380px;
  height: 46vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  position: relative; z-index: 1;
  animation: rise-in .5s cubic-bezier(.34, 1.25, .5, 1) both;
}

/* 行动区：三个按钮，从下半部顶部开始，间距加大 */
.home-actions {
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; gap: 26px;
  position: relative; z-index: 1;
  animation: rise-in .5s .12s ease both;
}
.home-actions .btn-primary, .home-actions .btn-secondary { width: 100%; }

.home-title { font-size: 44px; margin: 0; }
.home-sub { color: var(--happy-muted-foreground); font-size: 14px; }

/* 声音开关（线性图标，角落圆钮） */
.sound-toggle {
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(34, 139, 230, 0.12);
  border: 1px solid var(--happy-border);
  cursor: pointer;
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  color: var(--happy-primary-600);
}
.sound-toggle.off { filter: grayscale(1); opacity: .55; }

.home-copy { font-size: 12px; color: var(--happy-muted-foreground); margin-top: 22px; }
@keyframes rise-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   游戏页（设计稿：header + HUD 卡片 + 深色棋盘）
   ============================================================ */
#page-game { justify-content: flex-start; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.game-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; flex: 1; }

/* 页头（设计稿） */
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.game-header .btn-ghost { width: auto; }
.game-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--happy-primary); }
.game-header-spacer { width: 74px; }

/* HUD 卡片（设计稿 happy-card） */
.hud-card { padding: 14px 12px 12px; margin-bottom: 14px; }
.hud-cols {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.hud-col { flex: 1; text-align: center; }
.hud-label { font-size: 12px; color: var(--happy-muted-foreground); margin-bottom: 2px; }
.hud-value {
  font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--happy-primary);
  font-variant-numeric: tabular-nums;
}
.hud-col.time .hud-value { color: var(--happy-foreground); }
.hud-col.time.warn .hud-value { color: var(--happy-state-error); animation: time-blink .6s steps(2) infinite; }
@keyframes time-blink { 50% { opacity: .4; } }

#btn-reset { width: 100%; }
#btn-reset.disabled { opacity: .45; pointer-events: none; }
/* 暂停按钮：位于 header 右侧，与首页按钮同尺寸（btn-ghost btn-sm） */
#btn-pause { width: auto; padding: 0 12px; }

/* 棋盘（设计稿：深色 #334155 + CSS Grid 感） */
#board-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;          /* 渐进增强；老内核 JS 兜底高度 */
  flex-shrink: 0;
  padding: clamp(6px, 2vw, 12px);
  background: var(--happy-game-board);
  border-radius: var(--happy-radius-lg);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(30, 41, 59, 0.12);
  position: relative;
}
.board {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--happy-radius-md);
  overflow: hidden;
  /* 深底浅网格（8×8 格线） */
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  touch-action: none;
}

/* 糖果（双层：外层定位移动 / 内层视觉动画） */
.candy {
  position: absolute;
  width: 11%; height: 11%;   /* = 0.88 格宽 */
  cursor: pointer;
  transition: transform .15s ease;   /* 交换动画 */
  will-change: transform;
}
.candy-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.15);
}
/* 高光（设计稿 candy-shape::after） */
.candy-face::before {
  content: "";
  position: absolute; top: 18%; left: 22%;
  width: 28%; height: 18%;
  border-radius: var(--happy-radius-full);
  background: rgba(255, 255, 255, 0.42);
  transform: rotate(-35deg);
}
/* 六色（高区分度：色相环均匀 60° + 明度错开，避免相近色） */
.candy[data-color="0"] .candy-face { background: radial-gradient(circle at 35% 30%, #FFD6D6 0%, #EF4444 55%, #D92B2B 100%); }  /* 红 */
.candy[data-color="1"] .candy-face { background: radial-gradient(circle at 35% 30%, #FFF6CC 0%, #FFC53D 55%, #E8A800 100%); }  /* 黄（最亮） */
.candy[data-color="2"] .candy-face { background: radial-gradient(circle at 35% 30%, #DCF7E7 0%, #2FBF71 55%, #1E9E57 100%); }  /* 绿 */
.candy[data-color="3"] .candy-face { background: radial-gradient(circle at 35% 30%, #D9F5F3 0%, #00B5AD 55%, #00948D 100%); }  /* 青 */
.candy[data-color="4"] .candy-face { background: radial-gradient(circle at 35% 30%, #DEE9FF 0%, #3B82F6 55%, #2563D8 100%); }  /* 蓝 */
.candy[data-color="5"] .candy-face { background: radial-gradient(circle at 35% 30%, #EFE8FE 0%, #8B5CF6 55%, #6D3FD8 100%); }  /* 紫 */

/* 选中态（设计稿 selected：蓝色光圈） */
.candy.selected {
  box-shadow: 0 0 0 3px var(--happy-primary-300), 0 0 16px rgba(34, 139, 230, 0.45);
  z-index: 2;
}

/* 消除动画：作用于内层 face（外层定位不动 → 不跳位） */
.candy.matched .candy-face { animation: candy-pop .28s ease forwards; }
@keyframes candy-pop {
  0%   { transform: scale(1);    opacity: 1; }
  30%  { transform: scale(1.28) translateY(-7%); opacity: 1; }
  100% { transform: scale(0.15) translateY(-18%); opacity: 0; }
}
/* 下落：外层平滑过渡（保留糖从旧位滑到新位 / 新糖从棋盘外滑入） */
.candy.falling { transition: transform .38s cubic-bezier(.3, 1.1, .5, 1); }
/* 被消除格：直接隐藏（DOM 复用，避免闪回） */
.candy.gone { visibility: hidden; pointer-events: none; }
.candy.new-born .candy-face { animation: candy-in .3s ease; }
@keyframes candy-in { from { transform: scale(0) rotate(20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* 特殊糖：条纹（消整行/列） */
.candy.stripe .candy-face::after {
  content: "";
  position: absolute; inset: 14% 0;
  border-top: 3px solid rgba(255, 255, 255, 0.9);
  border-bottom: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--happy-radius-full);
}
.candy.stripe-v .candy-face::after { transform: rotate(90deg); }
/* 彩糖（消同色全部） */
.candy.bomb .candy-face {
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.25), 0 0 14px rgba(255, 255, 255, 0.8), 0 3px 8px rgba(0, 0, 0, 0.25);
}
.candy.bomb .candy-face::after {
  content: "★";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
  background: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transform: none; border-radius: 0;
}
.candy.bomb .candy-face::before { content: none; }

/* 阶段提示 */
.stage-tip {
  margin-top: 12px;
  padding: 6px 18px;
  background: #FFFFFF;
  border: 1px solid var(--happy-border);
  border-radius: var(--happy-radius-full);
  font-size: 13px; color: var(--happy-muted-foreground);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.06);
  text-align: center;
}
.stage-tip.warn { color: var(--happy-state-error); border-color: #FFC9C9; font-weight: 700; }

/* 游戏底部提示（设计稿文案） */
.game-hint { text-align: center; color: var(--happy-muted-foreground); font-size: 12px; margin-top: 14px; }

/* ============================================================
   浮层 mask / dialog（设计稿 modal）
   ============================================================ */
.mask {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(4px);
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: 320px; max-width: 88vw;
  padding: 26px 22px 22px;
  background: #fff;
  border-radius: var(--happy-radius-lg);
  border: 1px solid var(--happy-border);
  box-shadow: 0 20px 50px rgba(30, 41, 59, 0.2);
  text-align: center;
  animation: pop-in .25s cubic-bezier(.34, 1.4, .5, 1);
}
@keyframes pop-in { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog h3 { font-size: 20px; color: var(--happy-foreground); margin-bottom: 14px; }
.dialog p { font-size: 14px; color: var(--happy-muted-foreground); line-height: 1.8; margin-bottom: 18px; }
.dialog .btn-primary, .dialog .btn-ghost { width: 100%; margin-bottom: 14px; }
.dialog .btn-ghost:last-child { margin-bottom: 0; }

/* 规则弹窗（设计稿：数字圆点列表） */
.rules { list-style: none; text-align: left; margin-bottom: 20px; }
.rules li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  font-size: 14px; line-height: 1.55; color: var(--happy-foreground);
  border-bottom: 1px solid var(--happy-muted);
}
.rules li:last-child { border-bottom: none; }
.rules-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--happy-primary);
  color: #fff;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.rules b { color: var(--happy-primary-700); }

/* ============================================================
   结算页（设计稿：时间到！overlay 卡片）
   ============================================================ */
#page-result { background: rgba(30, 41, 59, 0.65); backdrop-filter: blur(4px); }
.result-card {
  width: 100%; max-width: 340px;
  padding: 32px 24px 26px;
  background: #fff;
  border-radius: var(--happy-radius-lg);
  border: 1px solid var(--happy-border);
  box-shadow: 0 20px 50px rgba(30, 41, 59, 0.25);
  text-align: center;
  position: relative;
  animation: pop-in .3s cubic-bezier(.34, 1.4, .5, 1);
}
.result-icon { font-size: 44px; margin-bottom: 6px; }
.result-title { font-size: 24px; font-weight: 800; color: var(--happy-foreground); margin-bottom: 4px; }
.result-sub { font-size: 13px; color: var(--happy-muted-foreground); margin-bottom: 6px; }
.result-score {
  font-size: 52px; font-weight: 800; line-height: 1.15;
  color: var(--happy-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}
.new-record {
  display: inline-block; margin-bottom: 14px;
  padding: 6px 18px;
  background: var(--happy-primary);
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  border-radius: var(--happy-radius-full);
  animation: record-glow 1s ease-in-out infinite;
}
@keyframes record-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.result-stats {
  display: flex; justify-content: center; gap: 10px;
  margin-bottom: 22px;
}
.stat {
  flex: 1; max-width: 96px;
  padding: 10px 6px;
  background: var(--happy-primary-50);
  border: 1px solid var(--happy-primary-100);
  border-radius: var(--happy-radius-md);
}
.stat b { display: block; font-size: 20px; color: var(--happy-primary-600); }
.stat span { font-size: 12px; color: var(--happy-muted-foreground); }
.result-actions { display: flex; flex-direction: column; gap: 12px; }
.result-actions .btn-primary, .result-actions .btn-secondary { width: 100%; }

/* ============================================================
   排行榜页（设计稿）
   ============================================================ */
#page-rank { justify-content: flex-start; padding-top: max(16px, env(safe-area-inset-top)); }
.rank-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; flex: 1; }
.rank-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.rank-header .btn-ghost { width: auto; }
.rank-title { font-size: 22px; font-weight: 800; color: var(--happy-primary); letter-spacing: -0.02em; }
.rank-header-spacer { width: 74px; }

.rank-card { padding: 16px 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.rank-card-head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px;
}
.rank-card-head .rank-trophy { font-size: 22px; }
.rank-card-head span { font-weight: 700; color: var(--happy-foreground); }

.rank-list { flex: 1; overflow-y: auto; }
.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--happy-radius-md);
  border: 1px solid var(--happy-border);
  background: var(--happy-background);
  margin-bottom: 10px;
}
.rank-no {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--happy-muted); color: var(--happy-muted-foreground);
}
.rank-row.top1 .rank-no { background: linear-gradient(135deg, #FFE066, #FCC419); color: #7A5A00; }
.rank-row.top2 .rank-no { background: linear-gradient(135deg, #E2E8F0, #94A3B8); color: #475569; }
.rank-row.top3 .rank-no { background: linear-gradient(135deg, #FFC078, #F76707); color: #7A2E00; }
.rank-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--happy-primary-300), var(--happy-primary-600));
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-name { flex: 1; font-size: 15px; font-weight: 600; color: var(--happy-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-size: 16px; font-weight: 800; color: var(--happy-primary); font-variant-numeric: tabular-nums; }

.rank-me {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin-top: 12px;
  background: var(--happy-primary-50);
  border: 1px solid var(--happy-primary-200);
  border-radius: var(--happy-radius-md);
  font-size: 14px; color: var(--happy-foreground);
}
.rank-me b { color: var(--happy-primary-600); font-size: 16px; }

.rank-action { margin-top: 16px; }
.rank-action .btn-primary { width: 100%; }

.empty-tip { padding: 40px 0; text-align: center; color: var(--happy-muted-foreground); font-size: 14px; }

/* ---------- 通用 ---------- */
#page-game.warn-flash::after {
  content: "";
  position: fixed; inset: 0; z-index: 40;
  pointer-events: none;
  background: radial-gradient(circle, transparent 55%, rgba(250, 82, 82, 0.22) 100%);
  animation: warn-flash 1s ease-in-out infinite;
}
@keyframes warn-flash { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
