:root {
  --bg: #0b0e14;
  --bg2: #12161f;
  --panel: #171c27;
  --panel2: #1f2534;
  --border: #2a3242;
  --text: #e8ebf1;
  --muted: #8b95a8;
  --accent: #f59e0b;
  --accent2: #d97706;
  --gold: #fbbf24;
  --ok: #22c55e;
  --err: #ef4444;
  --info: #3b82f6;
  --pink: #ec4899;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, .09), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(236, 72, 153, .07), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "微软雅黑", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
.wrap-wide { max-width: 1260px; }

/* =========================================================
   三栅布局：左聊天 · 中主体 · 右排行榜
   ≥1200px 显示两栅；窄屏收起，改用「个人信息」弹窗
   ========================================================= */
.layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: start;
}
.layout > .main-col { min-width: 0; }
.side { position: sticky; top: 16px; }

@media (min-width: 1500px) {
  .wrap-wide { max-width: 1460px; }
  .layout { grid-template-columns: 300px minmax(0, 1fr) 300px; }
}

@media (max-width: 1199px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
}

/* 区块小标题（手机端的排行榜 / 聊天室） */
.section-head { margin: 26px 0 12px; }
.section-head h2 { margin: 0; }

/* 只在手机/窄屏显示的块（排行榜 + 聊天室） */
.only-narrow { display: none; }
@media (max-width: 1199px) {
  .only-narrow { display: block; }
}

/* 通用确认弹窗 */
.modal.modal-confirm {
  max-width: 440px;
  text-align: left;
}
.confirm-body {
  white-space: pre-line;
  line-height: 1.75;
  font-size: 13.5px;
  color: var(--text);
}

/* 个人信息弹窗 */
.modal.modal-personal {
  max-width: 780px;
  text-align: left;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-personal .modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
  position: sticky; top: -28px; background: var(--panel);
  padding: 4px 0 10px; z-index: 2;
}
.modal-personal .tabs { margin-bottom: 14px; }

/* 侧边卡片 */
.side-card { padding: 14px; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-head h2 { margin: 0; font-size: 15px; }

/* 聊天室 */
.chat-list {
  height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  margin-bottom: 10px;
}
.chat-msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.chat-msg .chat-who { color: var(--accent); font-weight: 600; }
.chat-msg.mine .chat-who { color: var(--ok); }
.chat-msg .chat-time { color: var(--muted); font-size: 11px; margin-left: 6px; }
.chat-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 0; }
.chat-input-row { display: flex; gap: 6px; }
.chat-input-row input { flex: 1; min-width: 0; }
.chat-input-row button { white-space: nowrap; }

/* 排行榜 */
.lb-tabs { margin-bottom: 10px; gap: 2px; }
.lb-tabs .tab { padding: 6px 8px; font-size: 12px; }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
/* 榜单单最长就是前 10 名的高度，第 11 名以后在框内滚轮看 */
.lb-list.scrollable {
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #3b465c transparent;
  overscroll-behavior: contain;
}
.lb-list.scrollable::-webkit-scrollbar { width: 8px; }
.lb-list.scrollable::-webkit-scrollbar-thumb { background: #3b465c; border-radius: 8px; }
.lb-list.scrollable::-webkit-scrollbar-thumb:hover { background: #4a576f; }
.lb-list.scrollable::-webkit-scrollbar-track { background: transparent; }
.lb-more { text-align: center; margin-top: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 8px; background: var(--panel2); font-size: 13px;
}
.lb-row.me { outline: 1px solid var(--accent); }
/* 隐藏了数字的行：只把数字遮成 ***，排名和名字照旧 */
.lb-row.masked .lb-value { color: var(--muted); letter-spacing: 2px; }
.lb-rank { width: 22px; text-align: center; color: var(--muted); font-weight: 700; flex: 0 0 22px; }
.lb-rank.top1 { color: #fbbf24; }
.lb-rank.top2 { color: #cbd5e1; }
.lb-rank.top3 { color: #d97706; }
.lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-value { color: var(--gold); font-weight: 700; font-family: Consolas, monospace; font-size: 12px; }
.lb-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 20px 0; }

/* 个人信息菜单 / 隐私开关 */
.panel-menu-btns { display: flex; flex-direction: column; gap: 8px; }

/* 排行榜下面的展示开关（按钮式） */
.lb-prefs-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.lb-prefs-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
}
.lb-prefs { display: flex; flex-direction: column; gap: 6px; }
.lb-prefs button.pref-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 10px; border-radius: 9px;
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer;
}
.lb-prefs button.pref-btn:hover:not(:disabled) { background: #262e40; }
.pref-btn .pref-state {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; line-height: 1;
  padding: 4px 9px; border-radius: 999px;
  background: #11161f; color: var(--muted); border: 1px solid var(--border);
}
.lb-prefs button.pref-btn.on {
  border-color: var(--accent);
  background: rgba(245, 158, 11, .12);
}
.lb-prefs button.pref-btn.on:hover:not(:disabled) { background: rgba(245, 158, 11, .18); }
.lb-prefs button.pref-btn.on .pref-state {
  background: var(--accent); color: #1a1400; border-color: var(--accent);
}

.pref-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
}
.pref-row input[type="checkbox"] { margin-top: 3px; }
.pref-row .pref-title { font-size: 14px; }
.pref-row .pref-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }


h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

label { display: block; font-size: 13px; margin: 0 0 6px; font-weight: 600; }
.field-tip { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }

input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=date], textarea, select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
/* 日期/时间控件的高亮图标在深色底上默认是黑的，反色一下 */
input[type=datetime-local]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}
input[type=text].mono, input[type=password].mono { font-family: "Consolas", monospace; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #5a6478; }

.row { margin-bottom: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { flex: 1; min-width: 140px; }

button {
  background: var(--accent);
  color: #1a1400;
  border: none;
  border-radius: 9px;
  padding: 11px 20px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
button:hover:not(:disabled) { background: var(--gold); }
button:active:not(:disabled) { transform: translateY(1px); }
button.ghost { background: var(--panel2); border: 1px solid var(--border); color: var(--text); }
button.ghost:hover:not(:disabled) { background: #262e40; }
button.danger { background: #991b1b; color: #fff; }
button.danger:hover:not(:disabled) { background: #b91c1c; }
button.ok { background: #15803d; color: #fff; }
button.ok:hover:not(:disabled) { background: #16a34a; }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { width: 100%; padding: 15px; font-size: 17px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.err-msg { color: var(--err); font-size: 13px; margin-top: 10px; }
.ok-msg { color: var(--ok); font-size: 13px; margin-top: 10px; }
.warn-msg { color: var(--accent); font-size: 13px; margin-top: 10px; }
.note { color: var(--muted); font-size: 12px; }
/* 卡密查询结果配色：可抽=绿、已被使用=橙、无效/作废=红 */
.note.cq-ok   { color: var(--ok); font-size: 13px; margin-top: 10px; font-weight: 600; }
.note.cq-warn { color: var(--accent); font-size: 13px; margin-top: 10px; font-weight: 600; }
.note.cq-bad  { color: var(--err); font-size: 13px; margin-top: 10px; font-weight: 600; }

/* 可滚动表格：固定高度 + 表头吸顶，列表长了用滚轮上下翻 */
.table-scroll {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { margin: 0; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel2);
  box-shadow: inset 0 -1px 0 var(--border);
  white-space: nowrap;
}
.table-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.table-scroll::-webkit-scrollbar-track { background: var(--bg2); border-radius: 10px; }
.table-scroll::-webkit-scrollbar-thumb { background: #3b465c; border-radius: 10px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #4b5873; }
.mono { font-family: "Consolas", "Courier New", monospace; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab {
  background: transparent; border: none; color: var(--muted);
  padding: 10px 16px; border-radius: 9px 9px 0 0; cursor: pointer;
  font-size: 14px; font-weight: 700; font-family: inherit;
}
.tab:hover { background: var(--panel); color: var(--text); }
.tab.active { color: var(--accent); background: var(--panel); border-bottom: 2px solid var(--accent); }

.hidden { display: none !important; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 12px; }
tbody tr:hover { background: #1c2231; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-unused { background: #14321f; color: #4ade80; }
.badge-used { background: #2a2130; color: #c084fc; }
.badge-revoked { background: #3a1a1a; color: #f87171; }
.badge-pending { background: #3d2c10; color: #fbbf24; }
.badge-paid { background: #14321f; color: #4ade80; }
.badge-rejected { background: #3a1a1a; color: #f87171; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.stat .num { font-size: 22px; font-weight: 800; font-family: "Consolas", monospace; line-height: 1.25; }
.stat .lbl { color: var(--muted); font-size: 12px; }

/* ---- 顶部条 ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 16px; font-size: 13px;
}
.balance-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1400; font-weight: 800; border-radius: 999px;
  padding: 4px 14px; font-family: "Consolas", monospace;
}

/* ---- 顶部「活动」按钮 ---- */
.btn-activity {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 14px rgba(244, 63, 94, .28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-activity:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244, 63, 94, .38); }
.btn-activity:active { transform: translateY(0); }
.act-badge {
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #dc2626; border-radius: 999px;
  font-size: 11px; font-weight: 800; font-family: "Consolas", monospace;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

/* ---- 活动弹窗 ---- */
.modal.modal-activity {
  max-width: 680px;
  text-align: left;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-activity .modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
  position: sticky; top: -28px; background: var(--panel);
  padding: 4px 0 10px; z-index: 2;
}
.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-empty {
  text-align: center; color: var(--muted); font-size: 13.5px;
  padding: 28px 10px; background: var(--panel2); border-radius: 12px;
}
.activity-item {
  background: var(--panel2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 14px 16px;
}
.activity-item.state-upcoming { border-left-color: #38bdf8; }
.activity-item.state-ended { border-left-color: #4b5563; opacity: .72; }
.activity-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.activity-top h4 {
  margin: 0; font-size: 15px; line-height: 1.5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.activity-pin {
  background: linear-gradient(135deg, #f43f5e, #f59e0b); color: #fff;
  font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px;
}
.activity-state {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; border-radius: 999px;
  padding: 2px 10px; background: rgba(74, 222, 128, .14); color: #4ade80;
}
.activity-state.s-upcoming { background: rgba(56, 189, 248, .14); color: #38bdf8; }
.activity-state.s-ended { background: rgba(148, 163, 184, .16); color: #94a3b8; }
.activity-time { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.activity-poster {
  display: block; width: 100%; max-height: 300px; object-fit: contain;
  border-radius: 10px; margin-top: 10px; background: #0f1218;
}
.activity-body {
  margin-top: 10px; font-size: 13.5px; line-height: 1.85;
  white-space: pre-line; word-break: break-word; color: var(--text);
}
.activity-go {
  display: inline-block; margin-top: 12px; text-decoration: none;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1400;
  font-weight: 800; font-size: 13px; border-radius: 999px; padding: 7px 18px;
}
.activity-go:hover { filter: brightness(1.08); }

/* 后台：活动列表里的缩略图 */
.act-thumb {
  width: 46px; height: 46px; object-fit: cover;
  border-radius: 6px; background: #0f1218; vertical-align: middle;
}

/* 活动类型徽标（邀请奖励） */
.activity-kind {
  font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px;
  background: rgba(245, 158, 11, .16); color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, .35);
}

/* 邀请活动：进度块 */
.invite-progress {
  margin-top: 12px; padding: 12px 14px;
  background: rgba(245, 158, 11, .06);
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: 10px;
}
.invite-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; font-size: 13.5px;
}
.invite-head b { color: var(--accent); font-size: 15px; }
.invite-money { color: #4ade80 !important; }
.invite-bar {
  height: 8px; background: rgba(0, 0, 0, .35); border-radius: 999px;
  overflow: hidden; margin: 9px 0 10px;
}
.invite-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f43f5e);
  transition: width .25s ease;
}
.invite-tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.invite-tiers .tier {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
}
.invite-tiers .tier.done {
  color: #4ade80; border-color: rgba(74, 222, 128, .4);
  background: rgba(74, 222, 128, .1); font-weight: 700;
}
.invite-tiers .tier.next {
  color: var(--accent); border-color: rgba(245, 158, 11, .5);
  background: rgba(245, 158, 11, .12); font-weight: 700;
}
.invite-note { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* 邀请活动：报名按钮 */
.btn-enroll {
  appearance: none; cursor: pointer; border: 0;
  padding: 8px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  box-shadow: 0 4px 14px rgba(244, 63, 94, .35);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.btn-enroll:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(244, 63, 94, .45); }
.btn-enroll:active { transform: translateY(0); }
.btn-enroll:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }

/* 邀请活动：达标后的「立即提取」按钮（绿色，跟报名区分开） */
.btn-claim {
  appearance: none; cursor: pointer; border: 0; margin-left: 10px;
  padding: 7px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 800; color: #062d16; letter-spacing: .3px;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  box-shadow: 0 4px 14px rgba(74, 222, 128, .35);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.btn-claim:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(74, 222, 128, .45); }
.btn-claim:active { transform: translateY(0); }
.btn-claim:disabled { opacity: .65; cursor: default; transform: none; box-shadow: none; }
@media (max-width: 560px) {
  .btn-claim { margin: 8px 0 0; display: inline-block; }
}

/* 后台：档位编辑器 */
.tier-editor { display: flex; flex-direction: column; gap: 8px; }
.tier-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 12px; font-size: 13.5px;
}
.tier-row .tier-idx { color: var(--muted); font-size: 12px; }
.tier-row .tier-desc b { color: var(--accent); }
#actPosterPreview {
  max-width: 240px; border-radius: 10px; margin-top: 10px;
  border: 1px solid var(--border);
}

/* 后台活动表单：窄屏下不要被挤成竖排字 */
#adtab-activities label { white-space: nowrap; }
@media (max-width: 720px) {
  #adtab-activities label { white-space: normal; }
  .activity-poster { max-height: 220px; }
}

/* ---- 转盘 ---- */
.wheel-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.wheel-stage { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1 / 1; }
#wheelCanvas { width: 100%; height: 100%; display: block; }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 28px solid var(--gold);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.6));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; height: 22%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a2a08, #120c00);
  border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: var(--gold);
  z-index: 2; pointer-events: none;
  box-shadow: 0 0 24px rgba(251, 191, 36, .35);
}

.chances-hint { font-size: 15px; color: var(--muted); }
.chances-hint b { color: var(--gold); font-size: 20px; font-family: "Consolas", monospace; }

/* ---- 中奖弹窗 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px; max-width: 400px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
/* ---- 登录后自动弹出的活动框 ---- */
.modal.act-pop {
  max-width: 440px; max-height: 88vh; overflow-y: auto;
  text-align: center; padding: 22px;
}
.act-pop-poster {
  display: block; width: 100%; max-height: 250px; object-fit: contain;
  border-radius: 12px; margin-bottom: 12px; background: #0f1218;
}
.act-pop .activity-body {
  text-align: left; margin-top: 10px; font-size: 13.5px;
  max-height: 22vh; overflow-y: auto;
}
.act-pop .invite-tiers { justify-content: center; }
.act-pop #actPopupGo { width: 100%; }
.act-pop #actPopupLater { width: 100%; }
.modal h3 { margin: 0 0 8px; font-size: 20px; }
.modal .prize-amount {
  font-size: 42px; font-weight: 800; color: var(--gold);
  font-family: "Consolas", monospace; margin: 14px 0;
  text-shadow: 0 0 30px rgba(251,191,36,.4);
}

/* ---- 轻提示 ---- */
#toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #1f2937; border: 1px solid var(--border); color: var(--text);
  padding: 11px 22px; border-radius: 10px; font-size: 13px; z-index: 999;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw;
}
#toast.show { opacity: 1; }
#toast.err { border-color: #7f1d1d; color: #fca5a5; }
#toast.ok { border-color: #14532d; color: #86efac; }

/* ---- 收款码 ---- */
.qr-preview {
  max-width: 260px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel2); display: block; margin: 10px 0;
}
.upload-drop {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 26px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-drop:hover { border-color: var(--accent); background: rgba(245,158,11,.05); }

/* ---- 收款码类型选择 ---- */
.qr-type-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.qr-type-opt { margin: 0; cursor: pointer; flex: 1; min-width: 170px; }
.qr-type-opt input[type=radio] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.qr-type-box {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--border); border-radius: 12px;
  padding: 13px 16px; font-size: 14px; font-weight: 700;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.qr-type-box .qr-type-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; font-weight: 800; flex: 0 0 auto;
}
.qr-wechat .qr-type-icon { background: #07C160; }
.qr-alipay .qr-type-icon { background: #1677FF; }

.qr-type-opt input:checked + .qr-type-box {
  border-color: var(--accent);
  background: rgba(245, 158, 11, .08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}
.qr-type-opt:hover .qr-type-box { border-color: #3f4a5f; }
.qr-type-opt input:checked + .qr-type-box.qr-wechat { border-color: #07C160; box-shadow: 0 0 0 3px rgba(7,193,96,.14); }
.qr-type-opt input:checked + .qr-type-box.qr-alipay { border-color: #1677FF; box-shadow: 0 0 0 3px rgba(22,119,255,.14); }

.qr-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700;
}
.qr-badge.wechat { background: rgba(7,193,96,.14); color: #34d399; }
.qr-badge.alipay { background: rgba(22,119,255,.14); color: #60a5fa; }
.qr-badge.unknown { background: var(--panel2); color: var(--muted); }

/* ---- 购卡提示 ---- */
.buy-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(236, 72, 153, .08));
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.75;
  color: #fcd34d;
  margin-bottom: 18px;
}
.buy-notice-icon { font-size: 17px; line-height: 1.5; flex: 0 0 auto; }
.buy-notice b { color: #fca5a5; }

a.site-link {
  color: var(--gold);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
a.site-link:hover { color: #fff; background: rgba(251, 191, 36, .18); border-radius: 4px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar select, .toolbar input { width: auto; min-width: 120px; }

.tabs-inner { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

.warn-box {
  background: #3d2c10; border: 1px solid #78450f; color: #fcd34d;
  border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 14px;
}
.info-box {
  background: #10243d; border: 1px solid #1e4a7a; color: #93c5fd;
  border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 14px;
}

/* ---- 期望值面板 ---- */
.ev-panel { background: var(--panel2); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.ev-big { font-size: 30px; font-weight: 800; font-family: "Consolas", monospace; color: var(--gold); }
.ev-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ev-row b { color: var(--text); font-family: "Consolas", monospace; }

.prob-bar { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.prob-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #ec4899); border-radius: 3px; }

/* 复选标签：勾选框与文字同一行、垂直居中 */
label.check-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 11px 0;
}
label.check-inline input[type=checkbox] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

/* 直接放在 .inline 里的勾选框不要被 "​.inline input { flex:1; min-width:140px }" 撑宽 */
.inline label.check-inline input[type=checkbox] {
  flex: 0 0 17px;
  min-width: 17px;
  width: 17px;
}

@media (max-width: 640px) {
  .wrap { padding: 16px 12px 40px; }
  table { font-size: 12px; }
  th, td { padding: 6px; }
  .hide-sm { display: none; }
  .wheel-stage { max-width: 300px; }
}
