/* ============================================================
   返利小助手 H5 · 现代 App 设计系统
   ------------------------------------------------------------
   · 纯白卡片 + 浅灰页面底，圆角与轻阴影建立层次
   · 彩色渐变入口图标，红色（#ff3b30）作为返利/价格强调色
   · 无衬线 + 数字 tabular 对齐，价格做视觉主角
   · 移动优先，兼容微信内置浏览器（无 oklch / color-mix）
   · WCAG AA 对比度、44px 触控目标、focus-visible
   ============================================================ */

:root {
  /* 主色：返利红 */
  --primary:       #ff3b30;
  --primary-2:     #ff6b4a;
  --primary-deep:  #d9261c;
  --primary-tint:  #fff0ee;
  --primary-soft:  #ffdcd7;
  --grad-primary:  linear-gradient(135deg, #ff7043 0%, #ff3b30 100%);

  /* 中性色 */
  --ink:    #171a1f;   /* 标题 */
  --ink-2:  #4e5560;   /* 正文 */
  --ink-3:  #8a919c;   /* 次要 */
  --ink-4:  #b6bcc5;   /* 占位/极弱 */
  --ink-faint: #b6bcc5; /* 兼容旧引用 */

  --bg:     #f1f3f6;   /* 页面底 */
  --card:   #ffffff;
  --fill:   #f7f8fa;   /* 输入框/次级填充 */
  --line:   #eff1f4;

  /* 语义色 */
  --green:       #00b578;
  --green-tint:  #e8f9f1;
  --amber:       #ff9f0a;
  --amber-tint:  #fff6e6;
  --blue:        #0a84ff;
  --blue-tint:   #eaf3ff;

  /* 圆角 */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 18px;
  --r-xl: 22px;

  /* 阴影 */
  --sd-1: 0 1px 2px rgba(23, 26, 31, .04), 0 2px 8px rgba(23, 26, 31, .04);
  --sd-2: 0 6px 20px rgba(23, 26, 31, .09);
  --sd-red: 0 4px 14px rgba(255, 59, 48, .26);

  /* 布局 */
  --tabbar-h: 60px;
  --safe: env(safe-area-inset-bottom, 0px);
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 14px calc(var(--tabbar-h) + var(--safe) + 24px);
}

a { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ── 顶部品牌栏 ────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 9px;
  height: 54px;
  margin: 0 -14px 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(239, 241, 244, .9);
}
.app-header .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-primary);
  color: #fff; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(255, 59, 48, .32);
  flex-shrink: 0;
}
.app-header .brand {
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
  white-space: nowrap;
}
.app-header .sep { width: 1px; height: 13px; background: #dfe3e8; flex-shrink: 0; }
.app-header .slogan {
  font-size: 11px; color: var(--ink-3); letter-spacing: .1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .spacer { flex: 1; }
.app-header .hdr-link {
  font-size: 12.5px; color: var(--ink-3); text-decoration: none;
  flex-shrink: 0;
}
.app-header .hdr-link.red { color: var(--primary); font-weight: 600; }

/* ── 会员身份卡 ────────────────────────────────────────── */
.member-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--sd-1);
}
.member-card .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.member-card .who {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card .who b { color: var(--ink); font-weight: 700; }
.pill-btn {
  flex-shrink: 0;
  height: 30px; padding: 0 15px; border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border: none;
  box-shadow: 0 3px 10px rgba(255, 59, 48, .28);
  transition: transform .12s;
}
.pill-btn:active { transform: scale(.96); }

/* ── 四宫格快捷入口 ────────────────────────────────────── */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 15px 6px 13px;
  margin-bottom: 12px;
  box-shadow: var(--sd-1);
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-decoration: none; color: var(--ink);
  font-size: 12px; font-weight: 500;
  padding: 2px 0;
  transition: transform .14s;
}
.quick-item:active { transform: scale(.94); }
.qi {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.qi svg { width: 23px; height: 23px; }
.qi-1 { background: linear-gradient(135deg, #ff8a5c, #ff3b30); box-shadow: 0 5px 14px rgba(255, 80, 60, .28); }
.qi-2 { background: linear-gradient(135deg, #a78bfa, #6d5efc); box-shadow: 0 5px 14px rgba(120, 100, 250, .26); }
.qi-3 { background: linear-gradient(135deg, #4fd1c5, #0ab5a0); box-shadow: 0 5px 14px rgba(10, 180, 160, .24); }
.qi-4 { background: linear-gradient(135deg, #ffcc4d, #ff9f0a); box-shadow: 0 5px 14px rgba(255, 160, 10, .26); }

/* ── 公告条 ────────────────────────────────────────────── */
.notice {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: var(--sd-1);
  font-size: 12.5px;
}
.notice-tag {
  flex-shrink: 0;
  background: var(--primary-tint); color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
}
.notice-text {
  flex: 1; min-width: 0; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice-more { flex-shrink: 0; color: var(--ink-3); font-size: 12px; text-decoration: none; }

/* ── 通用卡片 / 区块 ──────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--sd-1);
}
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.card-sub { margin-left: auto; font-size: 11px; color: var(--ink-3); }

.section { margin-bottom: 14px; }
.sec { margin-bottom: 14px; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 6px 2px 11px; }
.sec-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.35px; }
.sec-more { margin-left: auto; font-size: 12px; color: var(--ink-3); text-decoration: none; }

/* ── 查券区 ────────────────────────────────────────────── */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input {
  flex: 1; min-width: 0;
  height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--fill);
  padding: 0 14px;
  font-size: 14px; color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.search-row input::placeholder { color: var(--ink-4); }
.search-row input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, .1);
}
.btn-primary {
  flex-shrink: 0;
  height: 46px; padding: 0 20px;
  border: none; border-radius: 12px;
  background: var(--grad-primary); color: #fff;
  font-size: 14.5px; font-weight: 600; font-family: inherit;
  box-shadow: var(--sd-red);
  cursor: pointer;
  transition: transform .12s, opacity .18s;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }

.platform-tabs {
  display: flex; gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.platform-tabs::-webkit-scrollbar { display: none; }
.platform-tab {
  flex-shrink: 0;
  height: 32px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink-2);
  font-size: 13px; font-family: inherit;
  cursor: pointer;
  transition: all .18s;
}
.platform-tab.active {
  background: var(--primary-tint);
  border-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.rebate-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.step { background: var(--fill); border-radius: 12px; padding: 11px 7px; text-align: center; }
.step .n {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
}
.step .t { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.step .d { font-size: 10.5px; color: var(--ink-3); line-height: 1.35; }

.rebate-note {
  background: var(--fill);
  border-radius: 12px;
  overflow: hidden;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.rebate-note summary {
  padding: 11px 13px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 500;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.rebate-note summary::-webkit-details-marker { display: none; }
.rebate-note summary::after {
  content: '›';
  color: var(--ink-4); font-size: 17px; line-height: 1;
  transform: rotate(90deg);
  transition: transform .22s;
}
.rebate-note[open] summary::after { transform: rotate(-90deg); }
.note-body { padding: 0 13px 13px; color: var(--ink-3); line-height: 1.7; }
.note-body b { color: var(--ink-2); font-weight: 600; }

/* ── 双列彩色 Banner（复刻参考设计的视觉重心）─────────── */
.banner-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 9px;
  margin-bottom: 16px;
}
.banner {
  position: relative; overflow: hidden;
  display: block;
  border-radius: var(--r-lg);
  padding: 15px;
  color: #fff; text-decoration: none;
  min-height: 106px;
}
.banner::after {
  content: '';
  position: absolute; right: -26px; top: -30px;
  width: 88px; height: 88px; border-radius: 50%;
  background: rgba(255, 255, 255, .15);
}
.banner-lg { background: linear-gradient(135deg, #22d3c5 0%, #2f9cf5 100%); padding: 16px 15px; }
.banner-lg h3 {
  margin: 0 0 5px; font-size: 17.5px; font-weight: 800;
  letter-spacing: -.5px; line-height: 1.25;
}
.banner-lg p { margin: 0; font-size: 11px; opacity: .92; line-height: 1.4; }
.banner .go {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 13px; border-radius: 999px;
  background: #fff; color: #0f7bd1;
  font-size: 11.5px; font-weight: 700;
  margin-top: 11px;
}
.banner-col { display: flex; flex-direction: column; gap: 9px; }
.banner-sm {
  flex: 1; min-height: 0;
  padding: 12px;
  display: flex; flex-direction: column; justify-content: center;
}
.banner-sm h3 { margin: 0 0 3px; font-size: 13.5px; font-weight: 800; letter-spacing: -.2px; }
.banner-sm p { margin: 0; font-size: 10px; opacity: .9; line-height: 1.35; }
.banner-purple { background: linear-gradient(135deg, #a78bfa, #6d5efc); }
.banner-blue { background: linear-gradient(135deg, #5ac8fa, #0a84ff); }

/* ── 商品列表卡（价格右侧强调，参考设计核心）───────── */
.product {
  display: flex; gap: 12px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--sd-1);
}
.product .thumb {
  width: 84px; height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--fill);
  flex-shrink: 0;
}
.product .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #f7f8fa, #eceff4);
}
.product .info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.product .title {
  margin: 0 0 6px;
  font-size: 14px; font-weight: 600; line-height: 1.38;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px; font-weight: 500;
  padding: 1.5px 6px; border-radius: 5px;
  background: #f2f4f7; color: var(--ink-3);
  white-space: nowrap;
}
.tag-red { background: var(--primary-tint); color: var(--primary); }
.tag-green { background: var(--green-tint); color: var(--green); }
.product .foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 8px;
}
.product .rebate { font-size: 11.5px; font-weight: 600; color: var(--primary); }
.product .plat { font-size: 10.5px; color: var(--ink-4); }
.product .right {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between;
  padding: 2px 0;
}
.product .price {
  font-size: 19px; font-weight: 800; color: var(--primary);
  letter-spacing: -.7px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.product .price small { font-size: 11px; font-weight: 600; margin-right: 1px; letter-spacing: 0; }
.product .origin {
  font-size: 10.5px; color: var(--ink-4);
  text-decoration: line-through; margin-top: 2px;
}
.cta {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  font-size: 11.5px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 3px 9px rgba(255, 59, 48, .24);
}
.cta.ghost { background: #f2f4f7; color: var(--ink-3); box-shadow: none; }

/* ── 推荐网格 / 一分购 ────────────────────────────────── */
.recommend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.recommend-item {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 8px;
  text-decoration: none; text-align: center;
  box-shadow: var(--sd-1);
  transition: transform .14s;
}
.recommend-item:active { transform: scale(.96); }
.recommend-item .icon { font-size: 24px; line-height: 1; margin-bottom: 7px; }
.recommend-item .title { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; }

.yifen {
  background: linear-gradient(135deg, #fff2ef, #ffe8e3);
  border-radius: var(--r-lg);
  padding: 15px;
  margin-bottom: 16px;
}
.yifen .sec-head { padding: 0 0 11px; }
.yifen .sec-head h2 { font-size: 15px; }
.yifen-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 余额页英雄区 ────────────────────────────────────── */
.balance-hero {
  position: relative; overflow: hidden;
  background: var(--grad-primary);
  border-radius: var(--r-xl);
  padding: 22px 20px 18px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(255, 59, 48, .26);
  margin-bottom: 12px;
}
.balance-hero::after {
  content: '';
  position: absolute; right: -40px; top: -55px;
  width: 175px; height: 175px; border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}
.balance-hero::before {
  content: '';
  position: absolute; right: 24px; bottom: -70px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.balance-hero .label { position: relative; font-size: 12px; opacity: .92; margin-bottom: 7px; }
.balance-hero .amount {
  position: relative;
  display: flex; align-items: baseline; gap: 3px;
  font-size: 42px; font-weight: 800; letter-spacing: -2px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.balance-hero .amount small { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.balance-hero .hero-note { position: relative; font-size: 11.5px; opacity: .88; margin-top: 9px; }
.balance-hero .row {
  position: relative;
  display: flex; gap: 32px;
  margin-top: 18px; padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, .24);
}
.balance-hero .k { font-size: 11px; opacity: .88; margin-bottom: 3px; }
.balance-hero .num { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.withdraw-box { display: flex; gap: 8px; margin-bottom: 8px; }
.withdraw-box input {
  flex: 1; min-width: 0;
  height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--fill);
  padding: 0 14px;
  font-size: 14px; font-family: inherit; color: var(--ink);
  outline: none;
  transition: border-color .18s, background .18s;
}
.withdraw-box input:focus { border-color: var(--primary); background: #fff; }
.withdraw-box .btn { flex-shrink: 0; }
.withdraw-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; padding: 0 2px; }

/* 积分条 */
.points-chip {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sd-1);
}
.points-chip .pl { font-size: 13px; font-weight: 600; color: var(--ink); }
.points-chip .pv {
  font-size: 30px; font-weight: 800; color: var(--amber);
  letter-spacing: -1.2px; font-variant-numeric: tabular-nums;
}

/* ── 列表行（订单 / 提现 / 积分明细）────────────────── */
.list-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 9px;
  box-shadow: var(--sd-1);
}
.list-item .main { flex: 1; min-width: 0; }
.list-item .name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-item .desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.list-item .right {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.list-item .amount {
  font-size: 16px; font-weight: 800; color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* 状态徽章 */
.status-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: #f2f4f7; color: var(--ink-3);
  white-space: nowrap;
}
.status-pending  { background: var(--amber-tint); color: #b26a00; }
.status-available,
.status-settled,
.status-paid     { background: var(--green-tint); color: #00895c; }
.status-refunded,
.status-rejected { background: var(--primary-tint); color: var(--primary-deep); }
.status-withdrawn{ background: var(--blue-tint); color: #0a6bd0; }

/* ── 任务 ────────────────────────────────────────────── */
.task-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 9px;
  box-shadow: var(--sd-1);
}
.task-ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--primary-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.task-desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.points-tag {
  flex-shrink: 0;
  font-size: 12px; font-weight: 700; color: var(--amber);
  font-variant-numeric: tabular-nums;
}

/* ── 按钮 ────────────────────────────────────────────── */
.btn {
  height: 46px; padding: 0 18px;
  border: none; border-radius: 12px;
  background: var(--grad-primary); color: #fff;
  font-size: 14px; font-weight: 600; font-family: inherit;
  box-shadow: var(--sd-red);
  cursor: pointer;
  transition: transform .12s, opacity .18s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; display: block; }
.btn-sm {
  height: 30px; padding: 0 13px;
  font-size: 12.5px; border-radius: 999px;
  box-shadow: none;
}
.btn-ghost { background: #f2f4f7; color: var(--ink-3); }

/* ── 表单 ────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 7px;
}
.field input, .field select {
  width: 100%; height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--fill);
  padding: 0 14px;
  font-size: 14px; font-family: inherit; color: var(--ink);
  outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.field input:focus, .field select:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, .1);
}

.admin-form {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sd-1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.admin-form .field.full { grid-column: 1 / -1; }

.login-box {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 26px 22px;
  box-shadow: var(--sd-1);
  margin-top: 14px;
}

/* ── 表格（管理端）──────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 4px 12px;
  box-shadow: var(--sd-1);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  padding: 12px 6px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 11px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

/* ── 状态图例 ────────────────────────────────────────── */
.legend {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--sd-1);
  font-size: 12.5px; color: var(--ink-2);
}
.lg { display: flex; align-items: center; gap: 8px; }
.lg .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── 骨架屏 / 空态 / 提示条 ──────────────────────────── */
.skeleton {
  height: 110px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, #f2f4f7 25%, #e9ecf1 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  margin-bottom: 10px;
}
@keyframes sk {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.empty {
  text-align: center;
  padding: 34px 10px;
  color: var(--ink-4);
  font-size: 13px;
}
.err-banner {
  display: none;
  background: var(--primary-tint);
  color: var(--primary-deep);
  font-size: 12.5px;
  padding: 10px 13px;
  border-radius: 10px;
  margin: 10px 0;
  line-height: 1.45;
}
.err-banner.show { display: block; }
.demo-banner {
  display: flex; align-items: center; gap: 8px;
  background: #fff8e6; color: #a86a00;
  font-size: 11.5px; line-height: 1.4;
  padding: 9px 12px; border-radius: 10px;
  margin-bottom: 10px;
}
.demo-banner .badge {
  flex-shrink: 0;
  background: #ffd666; color: #7a4d00;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
}

/* ── 演示数据提示条 / 平台自查 ──────────────────────── */
.data-notice {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--amber-tint); color: #8a5a00;
  border-radius: 12px; padding: 11px 13px;
  font-size: 12px; line-height: 1.55;
  margin: 10px 0 2px;
}
.data-notice .badge {
  flex-shrink: 0;
  background: #ffd666; color: #7a4d00;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  margin-top: 1px;
}
.data-notice p { margin: 0 0 3px; }
.data-notice p:last-child { margin-bottom: 0; }
.data-notice-tip { opacity: .72; font-size: 11px; }

.status-list { display: flex; flex-direction: column; gap: 9px; }
.status-row {
  background: var(--card); border-radius: 14px;
  padding: 13px 14px; border: 1px solid var(--line);
}
.status-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.status-head strong { font-size: 14px; color: var(--ink); }
.status-pill {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.status-ok .status-pill   { background: var(--green-tint); color: var(--green); }
.status-bad .status-pill  { background: var(--primary-tint); color: var(--primary-deep); }
.status-unset .status-pill { background: var(--fill); color: var(--ink-3); }
.status-msg { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.status-hint {
  margin: 7px 0 0; font-size: 11.5px; line-height: 1.6;
  color: #8a5a00; background: var(--amber-tint);
  padding: 8px 10px; border-radius: 9px;
}

/* ── 底部 Tab 导航 ──────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe));
  padding-bottom: var(--safe);
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #737a86;
  font-size: 10.5px; font-weight: 500;
  transition: color .16s;
}
.tabbar a .ico {
  height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.tabbar a .ico svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--primary); font-weight: 600; }

/* ── 弹窗 ────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(15, 18, 23, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s, visibility .22s;
}
.overlay.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 342px;
  background: #fff;
  border-radius: var(--r-xl);
  padding: 26px 22px 22px;
  box-shadow: 0 24px 60px rgba(15, 18, 23, .26);
  transform: translateY(14px) scale(.97);
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2);
}
.overlay.show .modal { transform: none; }
.modal .kicker {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--primary); background: var(--primary-tint);
  padding: 3px 9px; border-radius: 999px;
  margin-bottom: 12px;
}
.modal h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.modal p { margin: 0 0 20px; font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.fineprint {
  margin-top: 14px;
  font-size: 11px; color: var(--ink-4);
  text-align: center; line-height: 1.5;
}

/* ── 返利红包弹窗 ────────────────────────────────────── */
.rebate-overlay { z-index: 110; }
.rebate-modal {
  width: 100%; max-width: 330px;
  background: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 18, 23, .3);
  transform: translateY(18px) scale(.96);
  transition: transform .34s cubic-bezier(.2, .9, .3, 1.2);
  position: relative;
}
.rebate-overlay.show .rebate-modal { transform: none; }
.rebate-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 32px; height: 32px; border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: #fff;
  font-size: 21px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rebate-close:hover { background: rgba(255, 255, 255, .34); }
.rebate-top {
  position: relative;
  padding: 28px 22px 34px;
  text-align: center; color: #fff;
  background: var(--grad-primary);
  overflow: hidden;
}
.rebate-top::after {
  content: ''; position: absolute; left: 50%; bottom: -38px;
  width: 220px; height: 220px; transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
}
.rebate-kicker {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  margin-bottom: 14px;
}
.rebate-envelope {
  position: relative; z-index: 1;
  width: 76px; height: 76px; margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffe9a8 0%, #ffd166 55%, #f0a91e 100%);
  box-shadow: 0 8px 20px rgba(120, 40, 0, .28), inset 0 2px 4px rgba(255, 255, 255, .6);
  display: flex; align-items: center; justify-content: center;
}
.rebate-coin {
  color: #a35b00; font-size: 38px; font-weight: 800; line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
.rebate-amount-line {
  position: relative; z-index: 1;
  font-size: 42px; font-weight: 800; line-height: 1.1;
  letter-spacing: -1.5px; font-variant-numeric: tabular-nums;
}
.rebate-yen { font-size: 22px; vertical-align: 8px; margin-right: 2px; font-weight: 600; }
.rebate-top h2 {
  position: relative; z-index: 1;
  margin: 6px 0 8px; font-size: 15px; font-weight: 700;
}
.rebate-sub {
  position: relative; z-index: 1;
  margin: 0 auto; max-width: 250px;
  font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .9);
}
.rebate-bottom {
  position: relative; z-index: 2;
  margin: -14px 12px 12px;
  padding: 18px 10px 4px;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: 0 -4px 16px rgba(15, 18, 23, .06);
}
.rebate-product {
  font-size: 14px; font-weight: 700; color: var(--ink);
  line-height: 1.45; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 20px;
}
.rebate-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 10px 0 16px;
}
.rebate-plat {
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--primary-tint); padding: 3px 10px; border-radius: 999px;
}
.rebate-price { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rebate-cta { margin-top: 2px; }
.rebate-cta.disabled {
  background: var(--fill); color: var(--ink-3);
  box-shadow: none; pointer-events: auto;
}
.rebate-bottom .fineprint { margin-top: 12px; }

/* ── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; z-index: 200;
  bottom: calc(var(--tabbar-h) + var(--safe) + 26px);
  transform: translateX(-50%) translateY(12px);
  background: rgba(23, 26, 31, .93);
  color: #fff;
  font-size: 13px; line-height: 1.4;
  padding: 10px 18px;
  border-radius: 999px;
  max-width: 82%;
  text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .24s, transform .24s;
  box-shadow: 0 8px 24px rgba(15, 18, 23, .24);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 页脚 ────────────────────────────────────────────── */
.colophon {
  text-align: center;
  font-size: 11px; color: var(--ink-4);
  padding: 20px 0 6px; margin: 0;
}

/* ── 响应式 ──────────────────────────────────────────── */
@media (min-width: 560px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .app-header { margin-left: -20px; margin-right: -20px; padding: 0 20px; }
  .banner-lg h3 { font-size: 19px; }
}

/* ── 无障碍：尊重减少动效 ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
