:root {
  --brand: #5b6cff; --brand2: #8b5cf6;
  --grad: linear-gradient(135deg,#5b6cff 0%,#8b5cf6 100%);
  --grad-gold: linear-gradient(135deg,#ffb13d 0%,#ff6b6b 100%);
  --bg: #f4f5fb; --card: #ffffff; --text: #181b2a; --muted: #8b90a4;
  --line: #eef0f6; --gold: #f59e0b; --radius: 18px;
  --shadow: 0 6px 24px rgba(40,46,89,.07);
  --shadow-sm: 0 2px 10px rgba(40,46,89,.05);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); max-width: 480px; margin: 0 auto;
  min-height: 100vh; position: relative; overflow-x: hidden;
}
.page { display: none; padding-bottom: 76px; min-height: 100vh; }
.page.active { display: block; animation: fadeIn .26s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.topbar {
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  padding: 15px 18px; font-size: 17px; font-weight: 700; letter-spacing: .3px;
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
}
.back { font-size: 22px; margin-right: 8px; cursor: pointer; color: var(--muted); }

/* 登录 */
.login-box { padding: 64px 28px; }
.logo { font-size: 34px; font-weight: 800; text-align: center;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slogan { text-align: center; color: var(--muted); margin: 10px 0 42px; font-size: 14px; }
.login-box input {
  width: 100%; padding: 15px 16px; margin-bottom: 14px; border: 1.5px solid var(--line);
  border-radius: 14px; font-size: 15px; background: #fbfbfe; transition: border-color .2s, box-shadow .2s;
}
.login-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,108,255,.12); }
.auth-tabs { display: flex; gap: 28px; justify-content: center; margin-bottom: 24px; }
.auth-tab {
  font-size: 16px; color: var(--muted); padding-bottom: 6px; cursor: pointer; font-weight: 700;
  border-bottom: 2px solid transparent; transition: color .2s;
}
.auth-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.auth-tip { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }
.btn-primary {
  width: 100%; padding: 15px; background: var(--grad); color: #fff; border: none;
  border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px rgba(91,108,255,.32); transition: transform .12s, box-shadow .2s;
}
.btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 4px 12px rgba(91,108,255,.28); }

/* 游戏分类 */
.cat-tabs {
  display: flex; gap: 8px; padding: 12px 12px 0; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 7px 16px; border-radius: 18px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--muted); cursor: pointer; white-space: nowrap;
  border: 1.5px solid var(--line); transition: all .2s;
}
.cat-tab.active { background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(91,108,255,.3); }

/* 游戏列表 */
.game-list { padding: 14px 14px 4px; }
.game-card {
  background: var(--card); border-radius: var(--radius); padding: 15px; margin-bottom: 13px;
  display: flex; align-items: center; gap: 14px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .2s;
}
.game-card:active { transform: scale(.98); box-shadow: var(--shadow); }
.game-icon {
  width: 58px; height: 58px; border-radius: 16px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
  color: #fff; font-weight: 700; overflow: hidden; box-shadow: 0 4px 12px rgba(91,108,255,.25);
}
.game-icon img { width: 100%; height: 100%; object-fit: cover; }
.game-info { flex: 1; }
.game-name { font-weight: 700; font-size: 16px; }
.game-cat { color: var(--muted); font-size: 13px; margin-top: 4px; }
.game-reward { color: var(--gold); font-weight: 800; font-size: 16px; }
.game-reward small { font-weight: 400; font-size: 12px; color: var(--muted); }

/* 详情 */
.detail { padding: 16px; }
.detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.detail-intro { background: var(--card); border-radius: var(--radius); padding: 16px; color: #5b6072; font-size: 14px; line-height: 1.7; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.flow-guide {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border-radius: var(--radius); padding: 16px 10px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; color: #374151; flex: 1; text-align: center; }
.flow-no {
  width: 26px; height: 26px; line-height: 26px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 3px 8px rgba(91,108,255,.3);
}
.flow-arr { color: #d1d5db; font-size: 18px; }
.task-type {
  display: inline-block; background: rgba(91,108,255,.1); color: var(--brand); font-size: 11px;
  padding: 2px 7px; border-radius: 6px; margin-right: 6px; vertical-align: middle; font-weight: 600;
}
.detail-foot { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 8px; line-height: 1.6; }
.task-item {
  background: var(--card); border-radius: var(--radius); padding: 15px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
}
.task-meta { flex: 1; }
.task-title { font-weight: 700; }
.task-cond { color: var(--muted); font-size: 13px; margin-top: 5px; }
.task-reward { color: var(--gold); font-weight: 800; margin-right: 10px; }
.btn-do {
  padding: 9px 18px; background: var(--grad); color: #fff; border: none;
  border-radius: 22px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(91,108,255,.28); transition: transform .12s;
}
.btn-do:active { transform: scale(.95); }

/* 任务中心 */
.task-tabs {
  display: flex; gap: 18px; padding: 13px 16px; background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 51px; z-index: 9;
}
.task-tab {
  font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap;
  padding-bottom: 5px; border-bottom: 2px solid transparent; cursor: pointer; transition: color .2s;
}
.task-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.task-list { padding: 14px; }
.tk {
  background: var(--card); border-radius: var(--radius); padding: 15px; margin-bottom: 11px;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
}
.tk-status { font-size: 13px; padding: 4px 11px; border-radius: 14px; font-weight: 600; }
.st-doing { background: #fff4e0; color: #d97706; }
.st-pending { background: #e7ecff; color: var(--brand); }
.st-reviewing { background: #fdebc8; color: #b45309; }
.st-settled { background: #d7f7e6; color: #059669; }
.st-rejected { background: #ffe4e4; color: #dc2626; }

/* 钱包 */
.wallet-card {
  margin: 16px; padding: 26px; border-radius: 22px; position: relative; overflow: hidden;
  background: var(--grad); color: #fff; box-shadow: 0 12px 30px rgba(91,108,255,.32);
}
.wallet-card::before { content: ''; position: absolute; top: -50px; right: -30px;
  width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.wallet-card::after { content: ''; position: absolute; bottom: -60px; left: -20px;
  width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.08); }
.wallet-card > * { position: relative; z-index: 1; }
.wallet-balance { font-size: 14px; }
.wallet-balance span { font-size: 38px; font-weight: 800; display: block; letter-spacing: .5px; }
.wallet-sub { display: flex; gap: 32px; margin: 20px 0; }
.wallet-sub span { font-size: 18px; font-weight: 700; display: block; }
.wallet-sub small, .wallet-balance small { opacity: .85; font-size: 12px; }
.btn-withdraw {
  width: 100%; padding: 13px; background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.45); border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.btn-withdraw:active { background: rgba(255,255,255,.32); }
.logs-title { padding: 10px 16px 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.wallet-actions { display: flex; justify-content: flex-end; gap: 16px; padding: 0 16px; margin-top: -6px; }
.wallet-actions span { position: relative; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; }
.notif-dot { display: none; position: absolute; top: -4px; right: -8px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.notif-unread { background: #f8fafc; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.notif-readall { float: right; font-size: 12px; font-weight: 400; color: var(--brand); cursor: pointer; }

/* 提现记录 */
.wdlist { max-height: 56vh; overflow-y: auto; margin-bottom: 12px; }
.wd-rec { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.wd-rec:last-child { border-bottom: none; }
.wd-rec-main { display: flex; align-items: center; justify-content: space-between; }
.wd-rec-amt { font-weight: 700; font-size: 16px; }
.wd-rec-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.wd-reason { color: #dc2626; font-size: 12px; margin-top: 4px; }

/* 邀请 */
.invite-card {
  margin: 16px; padding: 26px; border-radius: 22px; position: relative; overflow: hidden;
  background: var(--grad-gold); color: #fff; box-shadow: 0 12px 30px rgba(255,107,107,.3);
}
.invite-card::before { content: ''; position: absolute; top: -40px; right: -30px;
  width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.14); }
.invite-card > * { position: relative; z-index: 1; }
.invite-hd { font-size: 14px; opacity: .92; }
.invite-code {
  display: flex; align-items: center; gap: 12px; margin: 12px 0 4px;
}
.invite-code span { font-size: 32px; font-weight: 800; letter-spacing: 3px; }
.btn-copy {
  margin-left: auto; padding: 7px 18px; background: rgba(255,255,255,.28); color: #fff;
  border: 1px solid rgba(255,255,255,.55); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.invite-sub { display: flex; gap: 32px; margin: 18px 0 12px; }
.invite-sub span { font-size: 22px; font-weight: 800; display: block; }
.invite-sub small { opacity: .88; font-size: 12px; }
.invite-tip { font-size: 12px; opacity: .92; line-height: 1.6; }
.btn-share {
  display: block; width: calc(100% - 32px); margin: 0 16px 4px; padding: 13px;
  background: #fff; color: #ff6b6b; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 16px rgba(255,107,107,.18);
}
.logs { padding: 0 16px; }
.log-item {
  background: var(--card); border-radius: 14px; padding: 13px 15px; margin-bottom: 9px;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
}
.log-remark { font-size: 14px; font-weight: 500; }
.log-time { color: var(--muted); font-size: 12px; margin-top: 4px; }
.log-amt { font-weight: 800; }
.amt-in { color: #059669; }
.amt-out { color: #dc2626; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px); display: none;
  border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(40,46,89,.06);
}
.tabbar.show { display: flex; }
.tab {
  flex: 1; text-align: center; padding: 9px 0 7px; font-size: 21px; cursor: pointer; color: var(--muted);
  transition: color .2s, transform .15s;
}
.tab span { display: block; font-size: 11px; margin-top: 3px; font-weight: 600; }
.tab.active { color: var(--brand); transform: translateY(-1px); }

/* 弹层 */
.modal { display: none; position: fixed; inset: 0; background: rgba(20,22,40,.55); backdrop-filter: blur(3px); z-index: 100; align-items: center; justify-content: center; }
.modal.show { display: flex; animation: fadeIn .2s ease; }
.modal-box { background: #fff; border-radius: 22px; padding: 26px; width: 86%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-box h3 { margin-bottom: 18px; font-size: 18px; }
.modal-box input, .modal-box select {
  width: 100%; padding: 13px 14px; margin-bottom: 12px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px; background: #fbfbfe;
}
.modal-box input:focus, .modal-box select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,108,255,.12); }
.modal-btns { display: flex; gap: 12px; }
.modal-btns button { flex: 1; padding: 13px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.modal-btns .btn-primary { border: none; }

/* toast */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: 14px; z-index: 200; opacity: 0; transition: opacity .3s; pointer-events: none;
}
.toast.show { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.empty.retry { cursor: pointer; color: var(--brand); }

/* 下拉刷新提示 */
.ptr-tip {
  position: fixed; top: -36px; left: 50%; transform: translateX(-50%);
  background: rgba(37,99,235,.92); color: #fff; padding: 6px 18px; border-radius: 16px;
  font-size: 13px; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.ptr-tip.show { opacity: 1; }

/* 游客登录补充 */
.btn-outline {
  width: 100%; padding: 14px; background: #fff; color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.divider { display: flex; align-items: center; text-align: center; color: var(--muted);
  font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.divider span { padding: 0 12px; }

/* 首页余额卡片 */
.home-balance {
  margin: 14px 14px 0; padding: 18px 20px; border-radius: 20px; cursor: pointer; position: relative; overflow: hidden;
  background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(91,108,255,.3);
  display: flex; align-items: center; justify-content: space-between;
}
.home-balance::before { content: ''; position: absolute; top: -40px; right: -20px;
  width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.home-balance > * { position: relative; z-index: 1; }
.hb-main small { opacity: .88; font-size: 12px; }
.hb-amount { font-size: 30px; font-weight: 800; margin-top: 3px; }
.hb-side { text-align: right; }
.hb-frozen { font-size: 12px; opacity: .88; }
.hb-go { font-size: 13px; margin-top: 8px; background: rgba(255,255,255,.22); border-radius: 14px; padding: 4px 13px; display: inline-block; }

/* 首页赚钱入口 */
.earn-row { display: flex; gap: 11px; padding: 14px 14px 0; }
.earn-item {
  flex: 1; background: var(--card); border-radius: var(--radius); padding: 16px 6px; text-align: center;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .14s;
}
.earn-item:active { transform: translateY(2px); }
.earn-icon { font-size: 28px; }
.earn-item span { display: block; font-size: 14px; font-weight: 700; margin-top: 5px; }
.earn-item small { display: block; color: var(--gold); font-size: 12px; margin-top: 3px; font-weight: 600; }

/* 签到阶梯 */
.ladder { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ladder-day {
  flex: 1 0 18%; min-width: 56px; text-align: center; padding: 11px 4px;
  border-radius: 12px; background: #f4f5fb; color: var(--muted);
}
.ladder-day small { display: block; font-size: 11px; }
.ladder-day span { font-size: 14px; font-weight: 800; }
.ladder-day.active { background: #fff4e0; color: #d97706; box-shadow: 0 0 0 2px var(--gold) inset; }
.ladder-day.done { background: #d7f7e6; color: #16a34a; }

/* 排行榜 */
.rank-tabs { display: flex; gap: 24px; padding: 13px 16px; background: var(--card); }
.rank-tab { font-size: 15px; color: var(--muted); font-weight: 700; padding-bottom: 5px; border-bottom: 2px solid transparent; cursor: pointer; }
.rank-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.rank-list { padding: 14px 16px 80px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.rank-item.me { background: #eef1ff; box-shadow: 0 0 0 1.5px #c7cfff inset; }
.rank-no { width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 50%; background: #f1f2f8; color: var(--muted); font-weight: 800; font-size: 14px; }
.rank-1 { background: linear-gradient(135deg,#ffd966,#fbbf24); color: #fff; box-shadow: 0 3px 8px rgba(251,191,36,.4); }
.rank-2 { background: linear-gradient(135deg,#e2e8f0,#cbd5e1); color: #fff; }
.rank-3 { background: linear-gradient(135deg,#fcd9a8,#f59e0b); color: #fff; }
.rank-name { flex: 1; font-size: 15px; font-weight: 600; }
.rank-income { color: #ef4444; font-weight: 800; }
.rank-me { position: fixed; bottom: 60px; left: 0; right: 0; max-width: 480px; margin: 0 auto; padding: 0 16px 8px; }
.rank-me .rank-item { margin-bottom: 0; box-shadow: 0 -2px 14px rgba(40,46,89,.12); }

/* 个人信息条 */
.profile-bar {
  display: flex; align-items: center; gap: 13px; padding: 18px 16px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(91,108,255,.3);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.profile-meta { flex: 1; }
.profile-name { font-size: 16px; font-weight: 700; }
.profile-id { color: var(--muted); font-size: 12px; margin-top: 3px; }
.btn-logout {
  padding: 8px 15px; background: #f4f5fb; color: var(--muted); border: 1px solid var(--line);
  border-radius: 18px; font-size: 13px; cursor: pointer;
}

/* 提现余额提示 */
.wd-balance {
  font-size: 13px; color: #6b7280; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.wd-balance b { color: var(--gold); font-size: 15px; }
.wd-all { margin-left: auto; color: var(--brand); font-weight: 700; cursor: pointer; }
.wd-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wd-chip {
  padding: 8px 17px; border-radius: 20px; background: #f4f5fb; color: #374151;
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--line); transition: all .15s;
}
.wd-chip:active { background: #e7ecff; border-color: var(--brand); color: var(--brand); }

/* 加载骨架 */
.skeleton-card {
  background: var(--card); border-radius: var(--radius); padding: 15px; margin-bottom: 13px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.sk-avatar { width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0; }
.sk-lines { flex: 1; }
.sk-line { height: 14px; border-radius: 7px; margin-bottom: 8px; }
.sk-line.short { width: 50%; }
.sk-avatar, .sk-line {
  background: linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%);
  background-size: 400% 100%; animation: sk 1.2s ease infinite;
}
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ===== 小游戏 ===== */
.mini-rail { padding: 4px 14px 0; }
.mini-rail-title { font-size: 15px; font-weight: 700; margin: 8px 2px 10px; }
.mini-rail-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.mini-rail-row::-webkit-scrollbar { display: none; }
.mini-card { flex: 0 0 auto; width: 92px; background: var(--card); border-radius: 16px;
  padding: 14px 8px; text-align: center; box-shadow: var(--shadow-sm); cursor: pointer;
  border: 1px solid var(--line); transition: transform .15s; }
.mini-card:active { transform: scale(.95); }
.mini-card-icon { font-size: 34px; line-height: 1.1; height: 40px; display: flex; align-items: center; justify-content: center; }
.mini-card-icon img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.mini-card-name { font-size: 13px; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card-tag { font-size: 11px; color: #ff6b6b; margin-top: 3px; font-weight: 600; }

.mini-wrap { padding: 14px; position: relative; }
.mini-hud { display: flex; justify-content: space-around; background: var(--card);
  border-radius: 14px; padding: 12px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.mini-hud-item { font-size: 13px; color: var(--muted); }
.mini-hud-item b { display: block; font-size: 20px; color: var(--text); margin-top: 2px; }
.mini-canvas { width: 100%; max-width: 360px; aspect-ratio: 360/480; display: block;
  margin: 0 auto; border-radius: 16px; background: #fff7f0; box-shadow: var(--shadow);
  touch-action: none; }
.mini-mask { position: absolute; inset: 14px; border-radius: 16px;
  background: rgba(24,27,42,.62); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 5; }
.mini-mask.show { display: flex; }
.mini-mask-box { background: var(--card); border-radius: 18px; padding: 28px 24px;
  text-align: center; width: 80%; max-width: 280px; }
.mini-mask-icon { font-size: 48px; }
.mini-mask-text { font-size: 19px; font-weight: 700; margin: 10px 0 4px; }
.mini-mask-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.mini-mask .btn-primary { width: 100%; margin-bottom: 10px; }
.btn-ghost { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--brand);
  background: transparent; color: var(--brand); font-size: 15px; font-weight: 600; cursor: pointer; }
.mini-foot { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 24px 0; line-height: 1.6; }

/* ===== 翻牌配对小游戏 ===== */
.mini-board { display: none; grid-template-columns: repeat(4, 1fr); gap: 8px;
  width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 1/1; }
.mcard { aspect-ratio: 3/4; perspective: 600px; cursor: pointer; }
.mcard-inner { position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .35s; }
.mcard.flipped .mcard-inner { transform: rotateY(180deg); }
.mcard-back, .mcard-face { position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; border-radius: 12px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mcard-back { background: var(--grad-gold); color: #fff; font-size: 24px;
  box-shadow: var(--shadow-sm); }
.mcard-face { background: var(--card); border: 2px solid var(--gold);
  font-size: 30px; transform: rotateY(180deg); }
.mcard.matched { animation: matchPop .4s ease; opacity: .45; pointer-events: none; }
@keyframes matchPop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ===== 我的小餐厅(放置经营养成) ===== */
.mini-board.rest-board { display: block; max-width: 360px; margin: 0 auto; aspect-ratio: auto; }
.rest-top { display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.rest-coin { font-size: 16px; font-weight: 700; }
.rest-coin b { color: #f59e0b; }
.rest-earn { font-size: 13px; color: var(--muted); }
.rest-earn b { color: #16a34a; }
.rest-stage { position: relative; margin-top: 10px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #fff6e6 0%, #ffe6c6 100%); box-shadow: var(--shadow-sm); }
.rest-svg { display: block; width: 100%; height: auto; }
.rest-coinpop { transition: transform .15s; }
.rest-coinpop:active { transform: translateY(2px) scale(.9); }
.rest-coin-in { animation: restCoinIn .3s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes restCoinIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.rest-coinpop circle { animation: restCoinBob 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes restCoinBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.rest-fly { position: absolute; transform: translate(-50%, 0); pointer-events: none;
  color: #f59e0b; font-weight: 800; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.2);
  animation: restFly .8s ease-out forwards; }
@keyframes restFly { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -34px); } }
.rest-tip { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0; }
.rest-upgrades { display: flex; flex-direction: column; gap: 8px; }
.rest-up { display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; cursor: pointer; transition: opacity .2s; }
.rest-up:active { transform: scale(.98); }
.rest-up-name b { color: var(--brand); }
.rest-up-cost { color: #f59e0b; font-weight: 700; font-size: 13px; }
.rest-up.rest-up-off { opacity: .5; }
