/* =============================================================
   Lobby · 邀请好友 Tab (v4.30 / v4.31 紧凑)
   全部尺寸压缩，让 hero / 奖章 / quick / share 都更轻量
   ============================================================= */

[data-pane="invite"] {
  padding: 8px 12px 18px;
  overflow-x: hidden;
}

/* —— 主视图 / 二级视图 显隐（仿 .bonus-view / .cash-view）—— */
.invite-view { display: none; }
.invite-view.active { display: block; }

/* =============================================================
   v4.45 代理中心二级页 — 3 模块卡片栈
   ============================================================= */
.invite-agent-body {
  padding: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ac-loading {
  padding: 32px 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* ===== 通用卡 ===== */
.ac-card {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--gold-3);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: none;
}
.ac-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-4);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.ac-card-bar {
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--gold-3);
  border-radius: 2px;
}

/* ===== 模块 1：代理信息（头像 + ID + 等级徽章 + 累计已领）===== */
.ac-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}
.acp-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.30) 0%, rgba(212,175,55,0.05) 100%);
  border: 1.5px solid var(--gold-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-4);
  overflow: hidden;
}
.acp-avatar-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-4);
  font-family: var(--font-display, var(--font-base));
}
.acp-avatar-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

.acp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.acp-uid {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.5px;
}
.acp-tier-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.acp-tier-badge {
  padding: 3px 10px;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.30);
  color: var(--gold-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.acp-tier-badge.is-matched {
  background: linear-gradient(135deg, #ffe082, #d4af37 50%, #8a6a30);
  color: #1a1410;
  border-color: #8a6a30;
}
.acp-tier-rate {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.acp-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.acp-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
}
.acp-stat-value {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.acp-stat-value b {
  color: var(--gold-4);
  font-weight: 700;
}

/* v4.54：可领取佣金 + 领取按钮 */
.acp-claim-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-1);
}
.acp-claim-info {
  flex: 1;
  min-width: 0;
}
.acp-claim-label {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.acp-claim-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--success);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 0 8px rgba(46,194,126,0.35);
}
.acp-claim-value b { font-weight: 800; }
.acp-claim-hint {
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.2px;
  line-height: 1.4;
}
/* 状态机按钮：available / empty / claiming */
.acp-claim-btn {
  flex-shrink: 0;
  min-width: 88px;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: filter .15s, transform .1s;
  white-space: nowrap;
}
.acp-claim-btn.is-available {
  background: linear-gradient(180deg, #ffe082 0%, #d4af37 55%, #8a6a30 100%);
  color: #1a1410;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.acp-claim-btn.is-available:hover  { filter: brightness(1.06); }
.acp-claim-btn.is-available:active { transform: scale(0.98); }
.acp-claim-btn.is-empty {
  background: var(--bg-3);
  color: var(--text-tertiary);
  border: 1px solid var(--border-1);
  cursor: not-allowed;
  opacity: 0.7;
}
.acp-claim-btn.is-claiming {
  background: linear-gradient(180deg, #aaaaaa 0%, #888888 100%);
  color: #1a1410;
  cursor: wait;
}

/* ===== 模块 2 / 3：网格 stat 块 ===== */
.ac-grid {
  display: grid;
  gap: 8px;
}
.ac-grid-3 { grid-template-columns: repeat(3, 1fr); }

.ac-stat {
  background: rgba(0,0,0,0.20);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 10px 10px;
  text-align: center;
  min-width: 0;
}
.ac-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  line-height: 1.2;
}
.ac-stat-value {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ac-stat-value b {
  color: var(--gold-4);
  font-weight: 700;
}
.ac-stat-hint {
  margin-top: 4px;
  font-size: 9px;
  color: var(--text-tertiary);
  opacity: 0.75;
  line-height: 1.1;
}
/* 高亮：今日预计 */
.ac-stat.ac-stat-highlight {
  background: linear-gradient(180deg, rgba(212,175,55,0.10), rgba(212,175,55,0.04));
  border-color: rgba(212,175,55,0.45);
}
.ac-stat.ac-stat-highlight .ac-stat-value b { color: var(--gold-5); }

/* 模块 3 上半部分：人数三联 */
.ac-team-counts .ac-stat-value b {
  color: var(--text-primary);
  font-size: 15px;
}

/* 模块 3 下半部分：投注分布（团队/直属/非直属） */
.ac-team-bet-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-1);
}
.ac-tbb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px dashed rgba(212,175,55,0.10);
}
.ac-tbb-row:last-child { border-bottom: none; }
.ac-tbb-label {
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.ac-tbb-value {
  color: var(--text-tertiary);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.ac-tbb-value b {
  color: var(--gold-4);
  font-weight: 700;
}

/* =============================================================
   v4.46 代理规则说明模块
   ============================================================= */
.ac-rules {
  /* 继承 .ac-card */
}

/* 4 步 numbered 列表 */
.acr-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.acr-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.acr-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe082, #d4af37 55%, #8a6a30);
  color: #1a1410;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  box-shadow: none;
  margin-top: 1px;
}
.acr-step-body { flex: 1; min-width: 0; }
.acr-step-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-4);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.acr-step-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.acr-step-text strong {
  color: var(--gold-4);
  font-weight: 600;
}

/* v4.48：两种佣金来源 — 流程图 mini-card */
.acr-sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.acr-source {
  background: rgba(0,0,0,0.25);
  border: 1px solid;
  border-radius: var(--radius-sm);
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
}
.acr-source-direct {
  border-color: rgba(46,194,126,0.30);
  background: linear-gradient(180deg, rgba(46,194,126,0.06), rgba(0,0,0,0.25));
}
.acr-source-spread {
  border-color: rgba(110,193,255,0.30);
  background: linear-gradient(180deg, rgba(110,193,255,0.06), rgba(0,0,0,0.25));
}

/* 顶部：tag + 副标题 */
.acr-source-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255,255,255,0.10);
}
.acr-source-tag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 9px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.acr-source-tag.tag-direct {
  background: rgba(46,194,126,0.20);
  color: #6fdbb0;
  border: 1px solid rgba(46,194,126,0.40);
}
.acr-source-tag.tag-others {
  background: rgba(110,193,255,0.20);
  color: #6ec1ff;
  border: 1px solid rgba(110,193,255,0.40);
}
.acr-source-sub {
  font-size: 9.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

/* 流程图：垂直堆 node + arrow */
.acr-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 8px;
}
.acr-flow-node {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.acr-flow-node.acr-flow-you {
  background: linear-gradient(135deg, rgba(212,175,55,0.30), rgba(212,175,55,0.10));
  border-color: var(--gold-3);
  color: var(--gold-5);
  font-weight: 600;
}
.acr-flow-emoji { font-size: 13px; line-height: 1; }
.acr-flow-label { font-size: 10.5px; }
.acr-flow-lv {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  margin-left: 2px;
}
.acr-flow-lv.acr-lv-high {
  background: rgba(212,175,55,0.20);
  color: var(--gold-5);
  border: 1px solid rgba(212,175,55,0.40);
}
.acr-flow-lv.acr-lv-low {
  background: rgba(170,170,170,0.15);
  color: var(--text-tertiary);
  border: 1px solid rgba(170,170,170,0.25);
}
.acr-flow-arrow {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.acr-flow-arrow.acr-flow-bet {
  color: var(--gold-3);
  font-weight: 600;
}
.acr-flow-coin {
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
  filter: );
}

/* 底部公式 */
.acr-source-formula {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-secondary);
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.10);
  line-height: 1.5;
  margin-top: auto;
}
.acr-source-formula strong {
  color: var(--gold-4);
  font-weight: 700;
}
.acr-source-formula small {
  display: block;
  font-size: 9px;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-weight: 400;
}

.acr-bullet-hint {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(232,90,79,0.05);
  border-left: 2px solid rgba(232,90,79,0.40);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 档位对照表 */
.acr-tiers-block {
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px dashed var(--border-1);
  border-bottom: 1px dashed var(--border-1);
}
.acr-tiers-title {
  font-size: 11px;
  color: var(--gold-3);
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.acr-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acr-tiers-empty {
  text-align: center;
  font-size: 10px;
  color: var(--text-tertiary);
  padding: 8px 0;
}
.acr-tiers-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  font-size: 10.5px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.20);
  color: var(--text-tertiary);
  font-family: var(--font-mono, monospace);
}
.acr-tiers-row.is-current {
  background: linear-gradient(90deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border-color: var(--gold-3);
  color: var(--text-primary);
}
.acr-tiers-row .acr-t-level {
  font-size: 10px;
  color: var(--gold-4);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
}
.acr-tiers-row.is-current .acr-t-level { color: var(--gold-5); }
.acr-tiers-row .acr-t-name {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acr-tiers-row.is-current .acr-t-name { color: var(--gold-5); font-weight: 600; }
.acr-tiers-row .acr-t-cond {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.acr-tiers-row .acr-t-rate {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-4);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}
.acr-tiers-row.is-current .acr-t-rate { color: var(--gold-5); }

/* 举例 callout */
.acr-example {
  margin-top: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(212,175,55,0.06), rgba(212,175,55,0.02));
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: var(--radius-sm);
}
.acr-example-title {
  font-size: 11px;
  color: var(--gold-3);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.acr-example-body {
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.acr-example-body p { margin: 0 0 4px; }
.acr-example-body p:last-child { margin-bottom: 0; }
.acr-example-body strong { color: var(--gold-4); font-weight: 600; }
.acr-example-body strong.acr-hi { color: var(--success); font-weight: 700; }

/* 底部 tip */
.acr-tip {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(110,193,255,0.06);
  border-left: 2px solid #6ec1ff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 极窄屏（≤340px）压缩 ===== */
@media (max-width: 340px) {
  .acp-avatar { width: 56px; height: 56px; }
  .acp-avatar-visual { font-size: 18px; }
  .ac-stat-label { font-size: 9px; }
  .ac-stat-value { font-size: 11.5px; }
  .ac-tbb-row { font-size: 11px; }
  .acr-step-title { font-size: 12px; }
  .acr-step-text  { font-size: 10.5px; }
  .acr-tiers-row  { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; padding: 5px 6px; }
  .acr-tiers-row .acr-t-cond { display: none; }    /* 极窄屏只留 LV / 名字 / 率 */
  /* 流程图 mini-card 在窄屏堆叠 */
  .acr-sources { grid-template-columns: 1fr; }
}

/* =============================================================
   HERO（高度压缩约 30%）
   ============================================================= */
.invite-hero {
  position: relative;
  margin: 0 -12px 12px;
  padding: 16px 18px 16px;
  background: linear-gradient(180deg, #ece1c5 0%, #f5e8c5 35%, #ead9a8 100%);
  overflow: hidden;
  border-bottom: 2px solid var(--gold-4);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08);
}
.invite-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.invite-hero-bg .ihb-glow {
  position: absolute; left: 50%; top: -50%;
  width: 280px; height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255,234,170,0.6) 0%, rgba(212,175,55,0) 60%);
  filter: blur(18px);
}
.invite-hero-bg .ihb-corner {
  position: absolute; width: 22px; height: 22px;
  border: 1.2px solid var(--gold-3);
  opacity: 0.55;
}
.invite-hero-bg .ihb-corner-tl { top: 6px;    left: 6px;  border-right: none; border-bottom: none; }
.invite-hero-bg .ihb-corner-tr { top: 6px;    right: 6px; border-left:  none; border-bottom: none; }
.invite-hero-bg .ihb-corner-bl { bottom: 6px; left: 6px;  border-right: none; border-top: none; }
.invite-hero-bg .ihb-corner-br { bottom: 6px; right: 6px; border-left:  none; border-top: none; }

.invite-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.invite-hero-vipbadge {
  position: absolute;
  top: -6px;
  left: -6px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #b87333, #d4af37 60%, #ffe9a0);
  color: #1a1410;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 999px;
  box-shadow: none;
}

.invite-hero-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 6px;   /* 中文字距，4 字"邀请好友"留呼吸感 */
  background: linear-gradient(180deg, #b87a14 0%, #d4af37 45%, #8a5a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  font-family: var(--font-display, var(--font-base));
  line-height: 1.1;
}
.invite-hero-diamond {
  margin-top: 2px;
  color: var(--gold-4);
  font-size: 10px;
  letter-spacing: 5px;
  opacity: 0.55;
}
.invite-hero-sub {
  margin: 4px 0 10px;
  font-size: 11px;
  color: #5a4220;
  letter-spacing: 0.3px;
  font-weight: 500;
}

/* —— 邀请链接框 —— */
.invite-code-box {
  width: 100%;
  max-width: 300px;
  padding: 8px 10px 8px;
  background: linear-gradient(180deg, #0e2a22 0%, #112e25 100%);
  border: 1.2px solid var(--gold-3);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.18);
}
.invite-code-label {
  text-align: center;
  font-size: 10px;
  color: var(--gold-5);
  letter-spacing: 1.5px;
  margin-bottom: 5px;
  font-weight: 600;
}
.invite-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: var(--radius-sm);
  padding: 4px 5px 4px 8px;
}
.invite-code-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--gold-6);
  font-size: 11.5px;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-overflow: ellipsis;
}
.invite-code-copy {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-3), var(--gold-4));
  color: #1a1410;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
.invite-code-copy svg { width: 14px; height: 14px; }
.invite-code-copy:hover  { filter: brightness(1.08); }
.invite-code-copy:active { transform: scale(0.96); }
.invite-code-copy.copied {
  background: linear-gradient(135deg, #2ec27e, #7be0a9);
  color: #06231a;
}
.invite-code-hint {
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  color: rgba(255,233,160,0.65);
  letter-spacing: 0.3px;
}
.invite-code-hint span {
  color: var(--gold-5);
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  letter-spacing: 0.8px;
}

/* —— INVITE NOW —— */
.invite-cta {
  margin-top: 10px;
  width: 100%;
  max-width: 300px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #ffe9a0 0%, #d4af37 50%, #8a6a30 100%);
  color: #1a1410;
  border: 1.2px solid #8a6a30;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform .1s, filter .15s;
}
.invite-cta svg { width: 16px; height: 16px; stroke: #1a1410; }
.invite-cta:hover  { filter: brightness(1.06); }
.invite-cta:active { transform: scale(0.985); }

/* =============================================================
   SECTION 通用
   ============================================================= */
.invite-section { margin-bottom: 12px; }
.invite-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 10px;
  color: var(--gold-4);
  letter-spacing: 3px;
  font-weight: 600;
}
.invite-section-title .ist-dash {
  flex: 0 0 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-3), transparent);
}
.invite-section-title--ivory { color: #6a4a1a; }
.invite-section-title--ivory .ist-dash {
  background: linear-gradient(90deg, transparent, rgba(138,106,48,0.55), transparent);
}

/* =============================================================
   MILESTONE 5 卡：一行刚好显示 5 张，多余横滑
   ============================================================= */
.ms-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.ms-scroll::-webkit-scrollbar { display: none; }
.ms-scroll { scrollbar-width: none; }

/* 1 个半宽信息卡 + 5 个全宽奖章卡 + 5 个 gap (6px = 30px)
   设全宽 R：R/2 + 5R + 30 = 100%  →  R = (100% - 30px) × 2 / 11 */
.ms-card {
  flex: 0 0 calc((100% - 30px) * 2 / 11);
  scroll-snap-align: start;
  background: linear-gradient(180deg, #f5e8c5 0%, #e6d39a 100%);
  border-radius: var(--radius-sm);
  padding: 6px 0 0;              /* ← 左右 0，让底部 .ms-action 天然铺满 */
  text-align: center;
  position: relative;
  border: 1px solid rgba(138,106,48,0.30);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;          /* ← 默认占满横向 */
  overflow: hidden;              /* 圆角不被内容溢出 */
}

/* —— 左侧半宽"获奖说明"入口卡 —— */
.ms-info-card {
  flex: 0 0 calc((100% - 30px) / 11);   /* 全宽的一半 */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  background: linear-gradient(180deg, #0e2a22 0%, #061712 100%);
  border: 1px solid var(--gold-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--gold-4);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.15);
  transition: filter .15s, transform .1s;
  position: relative;
}
.ms-info-card:hover  { filter: brightness(1.1); }
.ms-info-card:active { transform: scale(0.97); }
.ms-info-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.30) 0%, rgba(212,175,55,0.06) 100%);
  border: 1px solid var(--gold-3);
  color: var(--gold-4);
}
.ms-info-label {
  font-size: 8.5px;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  color: var(--gold-5);
}
.ms-info-arrow {
  font-size: 11px;
  color: var(--gold-4);
  line-height: 1;
  opacity: 0.85;
}
.ms-head {
  font-size: 9px;
  color: #6a4a1a;
  letter-spacing: 0.3px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1.1;
  white-space: nowrap;
  padding: 0 2px;
}
.ms-head b {
  font-size: 11px;
  color: #1a1410;
}
/* v4.44：奖章金条 — 完全撑满卡宽度（横向 margin 0）
   align-self: stretch 让奖章跟随父 .ms-card 的 stretch 横向拉满
   边缘金属感保留，但和卡片左右边对齐 */
.ms-medal {
  align-self: stretch;
  height: 46px;
  margin: 4px 0;                     /* ← 横向 margin 必须 0，否则会缩窄 */
  border-radius: 0;                  /* ← 跟卡片左右边贴齐，去掉圆角 */
  background: linear-gradient(180deg,
    #ffe082 0%,
    #f5cf4a 30%,
    #e0b53a 55%,
    #b88a28 100%);
  border-top: 1px solid #8a6a20;
  border-bottom: 1px solid #8a6a20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(0,0,0,0.20);
}
.ms-val {
  font-size: 16px;
  font-weight: 800;
  color: #1a1410;
  font-family: var(--font-mono, monospace);
  line-height: 1;
  letter-spacing: 0.5px;
}
.ms-foot {
  font-size: 9px;
  color: #6a4a1a;
  letter-spacing: 2px;     /* "彩金" 2 字字距 */
  font-weight: 600;
  margin-bottom: 4px;
  padding: 0 2px;
}
/* v4.40 状态机：底部条变按钮 — 3 态 (available / claimed / locked)
   保留全宽 + 圆角下端的 ms-action 容器外观 */
.ms-action.ms-claim {
  width: 100%;
  margin: 0;
  padding: 5px 0;
  border: none;
  border-top: 1px solid rgba(212,175,55,0.30);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
/* available：金色亮按钮 */
.ms-action.ms-claim.is-available {
  background: linear-gradient(180deg, #ffe9a0 0%, #d4af37 55%, #8a6a30 100%);
  color: #1a1410;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.ms-action.ms-claim.is-available:hover  { filter: brightness(1.06); }
.ms-action.ms-claim.is-available:active { transform: scale(0.96); }
/* claimed：暗绿 + 灰色"已领取" */
.ms-action.ms-claim.is-claimed {
  background: linear-gradient(180deg, #0e2a22, #061712);
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.7;
}
.ms-action.ms-claim.is-claimed::before {
  content: '✓';
  display: inline-block;
  margin-right: 3px;
  color: var(--success);
  font-weight: 700;
}
/* locked：深灰 + 显示"差 N 位" */
.ms-action.ms-claim.is-locked {
  background: linear-gradient(180deg, #2a2622, #1a1612);
  color: rgba(255,255,255,0.45);
  cursor: not-allowed;
  font-size: 10px;
  letter-spacing: 0.5px;
}

/* v4.43：奖章金色保留 — 状态差异交给底部按钮显示
   claimed 卡略透明（提示"已完成"），locked 卡保持金色不变 */
.ms-card.is-claimed { opacity: 0.88; }

/* 加载 / 空态占位 */
.ms-loading, .ms-empty {
  flex: 1;
  text-align: center;
  padding: 24px 8px;
  color: var(--text-tertiary);
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* =============================================================
   AGENT CENTER 卡（高度也压缩一档）
   ============================================================= */
.agent-center-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #0e0b07 0%, #1a1610 100%);
  border: 1px solid var(--gold-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  transition: transform .12s, filter .15s, border-color .15s;
}
.agent-center-card:hover  { filter: brightness(1.08); border-color: var(--gold-4); }
.agent-center-card:active { transform: scale(0.99); }

.ac-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.30) 0%, rgba(212,175,55,0.05) 100%);
  border: 1px solid var(--gold-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-4);
  overflow: hidden;                /* 让图片/文字头像被圆框 clip */
}

/* 内层 visual：放 svg/图/文字 三种之一，跟 drawer/wallet 头像同款规则 */
.ac-avatar-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-display, var(--font-base));
  color: var(--gold-4);
  text-transform: uppercase;
  user-select: none;
}
.ac-avatar-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ac-avatar-visual svg { width: 22px; height: 22px; }
.ac-avatar-gem {
  position: absolute;
  bottom: -2px;
  right: 50%;
  transform: translateX(50%);
  color: var(--gold-4);
  font-size: 9px;
  background: var(--bg-1);
  padding: 1px 3px;
  border-radius: 3px;
}
.ac-text { flex: 1; min-width: 0; }
.ac-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-4);
  letter-spacing: 0.8px;
  line-height: 1.2;
}
.ac-sub {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-tertiary);
  line-height: 1.3;
}
.ac-enter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--gold-3);
  color: var(--gold-4);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.ac-enter svg { width: 11px; height: 11px; }

/* =============================================================
   QUICK ACTIONS 4 卡：1 行 4 列
   ============================================================= */
.invite-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.iq-card {
  position: relative;
  text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 8px 4px 6px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.iq-card:hover {
  border-color: var(--border-3);
  background: var(--bg-3);
}
.iq-card:active { transform: scale(0.98); }
.iq-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin-bottom: 5px;
  color: var(--gold-4);
  background: rgba(212,175,55,0.10);
  border: 1px solid var(--border-2);
}
.iq-icon svg { width: 18px; height: 18px; }
.iq-icon-gift { color: #6fdbb0; background: rgba(46,194,126,0.10); border-color: rgba(46,194,126,0.30); }
.iq-icon-doc  { color: #6ec1ff; background: rgba(110,193,255,0.10); border-color: rgba(110,193,255,0.30); }
.iq-icon-team { color: #d39bf7; background: rgba(211,155,247,0.10); border-color: rgba(211,155,247,0.30); }
.iq-icon-coin { color: var(--gold-4); }
.iq-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
  line-height: 1.2;
}
/* 1 行 4 列空间紧，sub 文案隐藏 */
.iq-sub { display: none; }
/* 箭头也隐藏（横向卡不需要） */
.iq-arrow { display: none; }

/* =============================================================
   SHARE & INVITE（整体高度收紧）
   ============================================================= */
.invite-share-box {
  margin: 0 -12px -18px;
  padding: 10px 12px 16px;
  background: linear-gradient(180deg, #ece1c5 0%, #f5e8c5 100%);
  border-top: 2px solid var(--gold-4);
}
.share-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.share-row::-webkit-scrollbar { display: none; }
.share-row { scrollbar-width: none; }

.share-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  font-family: inherit;
}
.sb-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform .12s;
}
.sb-icon svg { width: 17px; height: 17px; }
.share-btn:active .sb-icon { transform: scale(0.92); }
.sb-whatsapp  { background: #25d366; }
.sb-facebook  { background: #1877f2; }
.sb-messenger { background: linear-gradient(135deg, #00b2ff, #006aff 50%, #ff006a 100%); }
.sb-instagram { background: linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.sb-telegram  { background: linear-gradient(135deg, #2aabee, #229ed9); }
.sb-x         { background: #000; }
.sb-more      { background: #4a4a4a; }
.sb-label {
  font-size: 9px;
  color: #5a4220;
  letter-spacing: 0.2px;
  font-weight: 500;
  white-space: nowrap;
}

/* =============================================================
   v4.49 已邀好友弹窗 — 嵌入 iv-modal-body 内部
   ============================================================= */
.if-loading {
  text-align: center;
  padding: 24px 0;
  font-size: 11px;
  color: var(--text-tertiary);
}
.if-empty {
  text-align: center;
  padding: 24px 0;
}
.if-empty-emoji {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.7;
}
.if-empty-text {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.7;
}

.if-summary {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  padding: 6px 8px;
  background: rgba(212,175,55,0.05);
  border: 1px dashed rgba(212,175,55,0.20);
  border-radius: var(--radius-sm);
}
.if-summary b {
  color: var(--gold-4);
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.if-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.if-row {
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

/* 顶部：头像 + 昵称 + 团队人数 */
.if-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.if-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,175,55,0.30), rgba(212,175,55,0.10));
  border: 1px solid rgba(212,175,55,0.40);
  color: var(--gold-4);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  font-family: var(--font-display, var(--font-base));
}
.if-nick {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.if-team {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  padding: 2px 8px;
  background: rgba(110,193,255,0.10);
  border: 1px solid rgba(110,193,255,0.25);
  border-radius: 999px;
}
.if-team-num {
  font-size: 12px;
  font-weight: 700;
  color: #6ec1ff;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.if-team-label {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

/* 底部：投注 + 充值 两列 */
.if-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.if-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.if-stat-label {
  font-size: 9.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.if-stat-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-4);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-align: right;
}

/* 窄屏：投注/充值 改成竖叠 */
@media (max-width: 340px) {
  .if-stats { grid-template-columns: 1fr; }
}

/* =============================================================
   v4.50 我的佣金弹窗 — 复用 .if-summary/.if-list/.if-loading/.if-empty
   ============================================================= */
.mc-row {
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mc-claim-time {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.mc-time-icon { font-size: 13px; line-height: 1; }
.mc-time-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.mc-team-snap {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  padding: 2px 8px;
  background: rgba(110,193,255,0.10);
  border: 1px solid rgba(110,193,255,0.25);
  border-radius: 999px;
}
.mc-team-num {
  font-size: 11px;
  font-weight: 700;
  color: #6ec1ff;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.mc-team-label {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

.mc-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.mc-period-tag {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  font-family: var(--font-mono, monospace);
}
.mc-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--success);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(46,194,126,0.30);
}

/* =============================================================
   v4.51 佣金规则弹窗 — 复用 .if-empty/.if-loading
   ============================================================= */
.cr-intro {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(212,175,55,0.20);
}
.cr-intro strong { color: var(--gold-4); font-weight: 600; }

.cr-tiers-block {
  margin-bottom: 12px;
}
.cr-tiers-title {
  font-size: 11px;
  color: var(--gold-3);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.cr-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cr-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono, monospace);
}
.cr-row.is-current {
  background: linear-gradient(90deg, rgba(212,175,55,0.18), rgba(212,175,55,0.04));
  border-color: var(--gold-3);
  box-shadow: none;
}
.cr-level {
  font-size: 10.5px;
  color: var(--gold-4);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
}
.cr-row.is-current .cr-level { color: var(--gold-5); }
.cr-name {
  font-size: 11.5px;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-row.is-current .cr-name { color: var(--gold-5); font-weight: 600; }
.cr-cond {
  font-size: 10.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cr-rate {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-4);
  font-variant-numeric: tabular-nums;
  min-width: 45px;
  text-align: right;
}
.cr-row.is-current .cr-rate { color: var(--gold-5); }

.cr-formula {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(110,193,255,0.06);
  border: 1px solid rgba(110,193,255,0.20);
  border-radius: var(--radius-sm);
}
.cr-formula-title {
  font-size: 11px;
  color: #6ec1ff;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.cr-formula-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.cr-formula-text strong {
  color: var(--gold-4);
  font-weight: 700;
}
.cr-formula-text small {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.cr-link-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-tertiary);
  padding: 6px 8px;
  background: rgba(212,175,55,0.05);
  border: 1px dashed rgba(212,175,55,0.20);
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}
.cr-link-hint strong {
  color: var(--gold-3);
  font-weight: 600;
}

/* 极窄屏（≤340px）—— 隐藏"≥ R$ X"门槛列 */
@media (max-width: 340px) {
  .cr-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px; padding: 5px 8px; }
  .cr-row .cr-cond { display: none; }
}

/* =============================================================
   通用信息弹窗（获奖说明 / 我的奖励 / 佣金规则 / 已邀好友）
   点击任意位置（含弹窗本体）即关闭
   ============================================================= */
.iv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.iv-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.iv-modal-box {
  width: 100%;
  max-width: 320px;
  max-height: 80vh;
  background: linear-gradient(180deg, #1a1410 0%, #0e0b07 100%);
  border: 1.5px solid var(--gold-3);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.15);
  transform: translateY(10px) scale(0.97);
  transition: transform .18s;
  cursor: pointer;  /* 任意位置点击关闭 */
  /* 头/底固定，body 独立滚动 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.iv-modal-overlay.open .iv-modal-box {
  transform: translateY(0) scale(1);
}
.iv-modal-head {
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(212,175,55,0.20);
  text-align: center;
  position: relative;
  flex-shrink: 0;          /* 固定头部，不被滚动挤压 */
}
.iv-modal-head::before,
.iv-modal-head::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-3));
}
.iv-modal-head::before { left: 22px; }
.iv-modal-head::after  { right: 22px; background: linear-gradient(-90deg, transparent, var(--gold-3)); }
.iv-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-4);
  letter-spacing: 1px;
  line-height: 1.3;
}
.iv-modal-body {
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  min-height: 48px;
  /* 独立滚动：弹出弹窗可承载任意长文本 */
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* 滚动条美化（细金色） */
.iv-modal-body::-webkit-scrollbar { width: 4px; }
.iv-modal-body::-webkit-scrollbar-thumb {
  background: rgba(212,175,55,0.30);
  border-radius: 2px;
}
.iv-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.55); }
.iv-modal-body p { margin: 0 0 10px; }
.iv-modal-body p:last-child { margin-bottom: 0; }
.iv-modal-body ol,
.iv-modal-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
.iv-modal-body li { margin-bottom: 6px; }
.iv-modal-body strong { color: var(--gold-4); font-weight: 600; }
.iv-modal-body .iv-empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 11.5px;
  padding: 16px 0;
  letter-spacing: 0.5px;
}
.iv-modal-foot {
  padding: 10px 18px 14px;
  font-size: 10px;
  color: var(--text-tertiary);
  text-align: center;
  letter-spacing: 1px;
  flex-shrink: 0;          /* 固定底部，与头部一致 */
  border-top: 1px dashed rgba(212,175,55,0.15);
}

/* =============================================================
   极窄屏（≤340px）再收一档
   ============================================================= */
@media (max-width: 340px) {
  .invite-hero-title { font-size: 19px; letter-spacing: 2px; }
  .ms-medal          { height: 40px; }     /* 跟卡同宽，所以只调高度 */
  .ms-val            { font-size: 14px; }
  .ms-head           { font-size: 8.5px; }
  .ms-head b         { font-size: 10px; }
  .iq-icon           { width: 26px; height: 26px; }
  .iq-title          { font-size: 10px; }
  .sb-icon           { width: 30px; height: 30px; }
  .sb-icon svg       { width: 15px; height: 15px; }
}

/* —— 邀请页背景:城堡图(替换原米白底色)—— */
body[data-page="invite"] .phone-shell {
  background: #0b1430 url("/assets/skin/invite-bg.jpg?v3") center top / cover no-repeat;
}

/* =============================================================
   邀请 hero —— 木牌标题 + 羊皮纸卡片(使用素材图),左侧 ~60%
   ============================================================= */
body[data-page="invite"] .invite-hero {
  position: relative; margin: 0; padding: 7% 0 3% 3%;
  background: none; border: none; box-shadow: none; overflow: visible;
}
body[data-page="invite"] .invite-hero-bg { display: none; }

/* —— 木牌标题 —— */
body[data-page="invite"] .ivt-board {
  position: relative; width: 60%; aspect-ratio: 1635 / 834;
  background: url("/assets/skin/invite-board.png?v1") center / contain no-repeat;
  container-type: size;
}
body[data-page="invite"] .invite-hero-title {
  position: absolute; left: 5%; right: 5%; top: 31%; bottom: 9%;
  margin: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5%;
  background: none; -webkit-text-fill-color: currentColor; text-shadow: none;
  line-height: 1; letter-spacing: 1px; font-weight: 900; white-space: nowrap;
}
body[data-page="invite"] .ivt-l1 {
  font-size: 18cqw; color: #ffd23f;
  text-shadow: 0 .3cqw 0 #7a3b00, 0 .5cqw .7cqw rgba(0,0,0,.45);
  -webkit-text-stroke: .85cqw #6a3400;
}
body[data-page="invite"] .ivt-l2 {
  font-size: 12.5cqw; color: #ffd23f; letter-spacing: 0;
  text-shadow: 0 .3cqw 0 #7a3b00, 0 .5cqw .7cqw rgba(0,0,0,.45);
  -webkit-text-stroke: .65cqw #6a3400;
}

/* —— 羊皮纸卡片 —— */
body[data-page="invite"] .ivt-card {
  position: relative; width: 60%; aspect-ratio: 1400 / 684;
  margin-top: -1%;
  background: url("/assets/skin/invite-card.png?v1") center / contain no-repeat;
  container-type: size;
}
/* 您的邀请链接 标签 */
body[data-page="invite"] .ivt-card-label {
  position: absolute; left: 0; right: 0; top: 6.5%; text-align: center;
  color: #5a3a12; font-weight: 800; font-size: 8cqh; letter-spacing: .5px;
}
/* 蓝色输入条 */
body[data-page="invite"] .ivt-input {
  position: absolute; left: 7.5%; right: 7.5%; top: 24.4%; height: 22.2%;
  display: flex; align-items: center;
}
body[data-page="invite"] .ivt-input .invite-code-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: #eaf1ff; font-weight: 700; font-size: 9cqh; letter-spacing: .2px;
  padding: 0 17% 0 5%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
/* 银色复制按钮(叠在素材银牌上) */
body[data-page="invite"] .ivt-copy {
  position: absolute; right: 0; top: 0; height: 100%; width: 15.5%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: #38507e; padding: 0;
}
body[data-page="invite"] .ivt-copy svg { width: 44%; height: 44%; }
/* 您的邀请码 */
body[data-page="invite"] .ivt-code {
  position: absolute; left: 0; right: 0; top: 47.5%; height: 11%;
  display: flex; align-items: center; justify-content: center;
  color: #5a3a12; font-weight: 800; font-size: 8cqh;
}
body[data-page="invite"] .ivt-code span { color: #1552b5; font-weight: 900; margin-left: 3px; letter-spacing: .5px; }
/* 立即邀请(叠在素材金条上) */
body[data-page="invite"] .ivt-action {
  position: absolute; left: 10%; right: 10%; top: 58.9%; height: 21.8%;
  display: flex; align-items: center; justify-content: center; gap: 3%;
  background: transparent; border: none; cursor: pointer;
  color: #6a3a06; font-weight: 900; font-size: 11cqh; letter-spacing: 2px;
}
body[data-page="invite"] .ivt-action svg { width: 9cqh; height: 9cqh; }

/* =============================================================
   里程碑奖励 —— 使用素材(彩带标题 + 卡框 + 奖励图标 + 获奖说明旗)
   仅作用于邀请页,不影响共用 invite.css 的其它页
   ============================================================= */
/* —— 标题彩带 —— */
body[data-page="invite"] .invite-section-title {
  position: relative; width: 44%; margin: 12px auto 8px; padding: 0;
  aspect-ratio: 2139 / 609;
  background: url("/assets/skin/ms-ribbon.webp?v1") center / contain no-repeat;
  display: flex; align-items: center; justify-content: center;
  gap: 0; color: #fff; font-weight: 800; letter-spacing: 1.5px;
  font-size: 0; line-height: 1; text-transform: none;
  text-shadow: 0 2px 2px rgba(0,20,60,.65), 0 1px 0 #0a2a6a;
  padding-top: 3%;                 /* 文字落在王冠下方蓝条 */
  container-type: size;
}
body[data-page="invite"] .invite-section-title .ist-dash { display: none; }
/* 文字用子元素:字号相对彩带自身缩放,永不换行 */
body[data-page="invite"] .invite-section-title .ist-text {
  font-size: 9cqw; white-space: nowrap; line-height: 1; letter-spacing: inherit;
}

/* —— 行容器:5 卡 + 获奖说明旗,整齐一行不横滑 —— */
body[data-page="invite"] .ms-scroll {
  overflow-x: auto; overflow-y: hidden; gap: 4px; align-items: center;
  padding-bottom: 2px; scroll-snap-type: x proximity;
}
body[data-page="invite"] .ms-card { scroll-snap-align: start; }

/* —— 获奖说明旗(素材自带 i 图标)—— */
body[data-page="invite"] .ms-info-card {
  flex: 0 0 calc((100% - 20px) * 0.063);
  aspect-ratio: 633 / 2064;
  background: url("/assets/skin/ms-info.webp?v1") center / contain no-repeat;
  border: none; box-shadow: none; border-radius: 0; padding: 0; gap: 0;
  display: block; position: relative; container-type: size;
}
body[data-page="invite"] .ms-info-card .ms-info-icon { display: none; }
body[data-page="invite"] .ms-info-card .ms-info-label {
  position: absolute; left: 0; right: 0; top: 40%;
  color: #fff; font-size: 9cqh; font-weight: 800; letter-spacing: 0;
  line-height: 1.18; text-shadow: 0 1px 2px rgba(0,20,60,.7);
}
body[data-page="invite"] .ms-info-card .ms-info-arrow {
  position: absolute; left: 0; right: 0; bottom: 7%;
  color: #ffe08a; font-size: 11cqh; line-height: 1; opacity: .95;
}

/* —— 奖章卡框 —— */
body[data-page="invite"] .ms-card {
  flex: 0 0 calc((100% - 20px) * 0.1832);
  aspect-ratio: 949 / 1422;
  background: url("/assets/skin/ms-frame.webp?v1") center / contain no-repeat;
  border: none; box-shadow: none; border-radius: 0; padding: 0;
  overflow: visible; display: block; position: relative;
  container-type: size;
}
body[data-page="invite"] .ms-card.is-claimed { opacity: .9; }

/* 邀请 N 位(蓝色顶部) */
body[data-page="invite"] .ms-card .ms-head {
  position: absolute; left: 5%; right: 5%; top: 15.5%; margin: 0; padding: 0;
  text-align: center; color: #fff; font-weight: 800;
  font-size: 9cqh; letter-spacing: 0; text-transform: none; line-height: 1;
  white-space: nowrap; text-shadow: 0 1px 1px rgba(0,20,60,.6);
}
body[data-page="invite"] .ms-card .ms-head b { font-size: 11cqh; color: #ffe27a; }

/* 图标 + 数字 */
body[data-page="invite"] .ms-card .ms-medal {
  position: absolute; left: 0; right: 0; top: 32%; height: 44%; margin: 0;
  background: none; border: none; box-shadow: none; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2%;
}
body[data-page="invite"] .ms-card .ms-icon {
  display: block; width: 60%; height: 52%;
  background-position: center; background-repeat: no-repeat; background-size: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
body[data-page="invite"] .ms-ic-coins { background-image: url("/assets/skin/ms-coins.webp?v1"); }
body[data-page="invite"] .ms-ic-bag   { background-image: url("/assets/skin/ms-bag.webp?v1"); }
body[data-page="invite"] .ms-ic-chest { background-image: url("/assets/skin/ms-chest.webp?v1"); }
body[data-page="invite"] .ms-card .ms-val {
  font-size: 20cqh; font-weight: 900; color: #2a1c08;
  line-height: 1; letter-spacing: .3px; text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
body[data-page="invite"] .ms-card .ms-val::before {
  content: "R$"; font-size: .56em; font-weight: 800; margin-right: 2px;
  vertical-align: .12em; color: inherit; letter-spacing: 0;
}

/* 彩金 */
body[data-page="invite"] .ms-card .ms-foot { display: none; }

/* 底部深蓝条:状态文字 */
body[data-page="invite"] .ms-card .ms-action.ms-claim {
  position: absolute; left: 12%; right: 12%; top: 83.5%; height: 11%;
  width: auto; margin: 0; padding: 0; border: none; border-radius: 0;
  background: none; box-shadow: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5cqh; font-weight: 800; letter-spacing: .5px; line-height: 1;
}
body[data-page="invite"] .ms-card .ms-action.is-locked {
  color: #ffd98a; background: none; font-size: 8.5cqh; letter-spacing: .5px;
}
body[data-page="invite"] .ms-card .ms-action.is-available {
  color: #fff; text-shadow: 0 0 6px rgba(255,220,120,.95);
}
body[data-page="invite"] .ms-card .ms-action.is-claimed {
  color: rgba(255,255,255,.6); opacity: 1;
}
body[data-page="invite"] .ms-card .ms-action.is-claimed::before { color: #6fe0a0; margin-right: 2px; }

/* =============================================================
   代理中心 —— 使用整条横幅素材(左:头盔徽章 / 中:风景 / 右:金按钮)
   不再显示玩家自定义头像
   ============================================================= */
body[data-page="invite"] .agent-center-card {
  position: relative; width: 100%; margin: 0 0 12px; padding: 0;
  aspect-ratio: 900 / 187;
  background: url("/assets/skin/agent-banner.webp?v1") center / contain no-repeat;
  border: none; box-shadow: none; border-radius: 0;
  display: block; container-type: size;
}
body[data-page="invite"] .agent-center-card:hover  { filter: brightness(1.05); }
body[data-page="invite"] .agent-center-card:active { transform: scale(0.995); }
/* 隐藏玩家头像(改用素材烘焙的头盔徽章)*/
body[data-page="invite"] .agent-center-card .ac-avatar { display: none; }
/* 文字叠在中部风景上 */
body[data-page="invite"] .agent-center-card .ac-text {
  position: absolute; left: 27.5%; right: 30%; top: 50%; transform: translateY(-50%);
  flex: none; min-width: 0; text-align: left;
}
body[data-page="invite"] .agent-center-card .ac-title {
  color: #fff; font-size: 16cqh; font-weight: 900; letter-spacing: .5px; line-height: 1.1;
  text-shadow: 0 2px 3px rgba(0,12,45,.85), 0 1px 0 rgba(0,0,0,.5);
}
body[data-page="invite"] .agent-center-card .ac-sub {
  margin-top: 3px; color: #e8f0ff; font-size: 10.5cqh; font-weight: 700; line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,12,45,.95);
}
/* 立即进入叠在右侧金按钮上 */
body[data-page="invite"] .agent-center-card .ac-enter {
  position: absolute; left: 73.5%; right: 4.5%; top: 61%; transform: translateY(-50%);
  height: 42%; margin: 0; padding: 0; border: none; background: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center; gap: 3%;
  color: #6a3a06; font-weight: 900; font-size: 15.5cqh; letter-spacing: .5px;
}
body[data-page="invite"] .agent-center-card .ac-enter svg { width: 12cqh; height: 12cqh; }

/* =============================================================
   我的佣金 / 佣金规则 / 已邀好友 —— 蓝石框 + 左图标 + 右标题 + 右下金箭头
   ============================================================= */
body[data-page="invite"] .invite-quick-grid {
  grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px;
}
body[data-page="invite"] .iq-card {
  position: relative; aspect-ratio: 1312 / 659; padding: 0;
  background: url("/assets/skin/iq-frame.webp?v1") center / 100% 100% no-repeat;
  border: none; box-shadow: none; border-radius: 0;
  display: block; container-type: size;
}
body[data-page="invite"] .iq-card:hover  { filter: brightness(1.08); background: url("/assets/skin/iq-frame.webp?v1") center / 100% 100% no-repeat; }
body[data-page="invite"] .iq-card:active { transform: scale(0.97); }
/* 左侧图标(素材,隐藏原 svg)*/
body[data-page="invite"] .iq-card .iq-icon {
  position: absolute; left: 5%; top: 50%; transform: translateY(-50%);
  width: 34%; height: 66%; margin: 0; border: none; border-radius: 0;
  display: block; background-color: transparent;
  background-position: center; background-repeat: no-repeat; background-size: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.3));
}
body[data-page="invite"] .iq-card .iq-icon svg { display: none; }
body[data-page="invite"] .iq-card .iq-icon-gift { background-image: url("/assets/skin/iq-coins.webp?v1"); }
body[data-page="invite"] .iq-card .iq-icon-doc  { background-image: url("/assets/skin/iq-scroll.webp?v1"); }
body[data-page="invite"] .iq-card .iq-icon-team { background-image: url("/assets/skin/iq-people.webp?v1"); }
/* 右侧标题 */
body[data-page="invite"] .iq-card .iq-title {
  position: absolute; left: 46%; right: 5%; top: 50%; transform: translateY(-50%);
  color: #fff; font-weight: 800; font-size: 19cqh; letter-spacing: 0; line-height: 1.1;
  text-align: left; white-space: nowrap;
  text-shadow: 0 2px 3px rgba(0,12,45,.9), 0 1px 0 rgba(0,0,0,.45);
}
/* 右下金箭头(素材)*/
body[data-page="invite"] .iq-card .iq-arrow { display: none; }
body[data-page="invite"] .iq-card .iq-sub { display: none; }

/* =============================================================
   分享邀请 —— 背景换成金框牌;移除标题文字 + 彩带标题图
   ============================================================= */
body[data-page="invite"] .invite-section-title--ivory { display: none; }
body[data-page="invite"] .invite-share-box {
  position: relative; width: 100%; margin: 6px 0 12px; padding: 0;
  aspect-ratio: 2172 / 529;
  background: url("/assets/skin/share-plaque.webp?v1") center / 100% 100% no-repeat;
  border: none; box-shadow: none; container-type: size;
}
body[data-page="invite"] .invite-share-box .share-row {
  position: absolute; left: 6%; right: 6%; top: 50%; transform: translateY(-50%);
  gap: 2%; overflow: visible;
}
