/* 活动中心（云白）：主视觉（tt-hero-card）+ 签到卡 + 抽奖卡 + 奖励记录；颜色、圆角、阴影、字阶都引用令牌 */
.tt-act-loading,
.tt-act-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-2);
}
.tt-act-loading { gap: 10px; font: var(--t-body); }
.tt-act-empty { flex-direction: column; gap: 8px; text-align: center; }
.tt-act-empty strong { font: var(--t-title); color: var(--text-1); }
.tt-act-empty span { font: var(--t-body-secondary); color: var(--text-2); }

.tt-act-content > :not(:last-child) { margin-bottom: var(--section-gap); }

/* ---------- 签到 / 抽奖两张卡：并排等高，窄了换成一列 ---------- */
.tt-act-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--section-gap);
  align-items: stretch;
  container-type: inline-size;
}
.tt-act-cards.has-single-panel { grid-template-columns: minmax(0, 1fr); }
.tt-act-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  container-type: inline-size;
}

.tt-act-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tt-act-head-copy { flex: 1; min-width: 0; }
.tt-act-title { margin: 0; font: var(--t-title); color: var(--text-1); }
.tt-act-sub { margin: 4px 0 0; font: var(--t-caption); color: var(--text-3); }
.tt-act-stat { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 2px; margin-inline-start: 8px; }
.tt-act-stat > span { font: var(--t-caption); color: var(--text-3); }
.tt-act-stat > b { font: var(--t-stat); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--text-1); }
.tt-act-stat > b.is-active { color: var(--primary-text); }

/* 卡内浅灰容器：被拉高时内容垂直居中，两张卡的头部和按钮上下对齐 */
.tt-act-inset {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

/* ---------- 签到：日圈 + 本周期进度 ---------- */
.tt-act-days {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 16px 0;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tt-act-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}
.tt-act-day-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: var(--radius-full);
  background: var(--control-fill);
  color: var(--text-3);
  font: var(--t-body-strong);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tt-act-day-badge .tt-icon { font-size: var(--icon-20); }
.tt-act-day-badge.is-done { background: var(--primary); color: var(--text-1); }
.tt-act-day-badge.is-today { background: var(--bg-card); box-shadow: var(--ring-focus); color: var(--primary-text); }
/* 最后一天：奖杯占日圈位置（无圆底），领取后右下角压一个陶土底、深色勾 */
.tt-act-day-badge.is-trophy { background: none; box-shadow: none; }
.tt-act-day-badge i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 0 1.5px var(--bg-sunken);
  color: var(--text-1);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
}
.tt-act-day-badge i .tt-icon { width: 9px; height: 9px; font-size: 0; }
.tt-act-day-badge i .tt-icon svg { width: 9px; height: 9px; }
.tt-act-day-badge.is-done i { transform: scale(1); }
.tt-act-day-reward { font: var(--t-caption); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.tt-act-day-name { font: var(--t-caption); color: var(--text-3); white-space: nowrap; }
/* 卡片窄时（每格不到 56）奖励去掉「+」，避免相邻两格的文字挤在一起 */
@container (max-width: 472px) {
  .tt-act-plus { display: none; }
}
.tt-act-day.is-today .tt-act-day-reward,
.tt-act-day.is-today .tt-act-day-name { color: var(--primary-text); font-weight: 600; }
.tt-act-day.is-last .tt-act-day-reward { color: var(--warning-text); }

.tt-act-progress {
  width: 100%;
  max-width: 560px;
  margin-top: 16px;
  /* 进度行左右和首尾两个日圈的外沿对齐 */
  padding-inline: calc(50% / var(--cols, 7) - 20px);
}
.tt-act-progress-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tt-act-progress-row > span { font: var(--t-caption); color: var(--text-2); }
.tt-act-progress-row > b { font: var(--t-label); font-variant-numeric: tabular-nums; color: var(--text-1); }
.tt-act-bar { height: 4px; border-radius: var(--radius-full); background: var(--control-fill); overflow: hidden; }
.tt-act-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width var(--dur-slow) var(--ease);
}

/* ---------- 抽奖：奖品格 ---------- */
.tt-act-prizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  container-type: inline-size;
}
/* 只剩抽奖一张卡、宽度够时奖品排成一行 8 个，不在大面板里缩成一小块 */
@container (min-width: 840px) {
  .has-single-panel .tt-act-prizes { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.tt-act-prize {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 0 4px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tt-act-prize-body { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.tt-act-prize-name {
  max-width: 100%;
  overflow: hidden;
  font: var(--t-title);
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-act-prize.is-empty .tt-act-prize-name { font: var(--t-body-strong); color: var(--text-2); }
.tt-act-prize.is-lit { border-color: var(--primary); }
.tt-act-prize.is-lit .tt-act-prize-name { color: var(--primary-text); }
.tt-act-prize.is-won { background: var(--primary); border-color: var(--primary); }
.tt-act-prize.is-won .tt-act-prize-name { color: var(--text-1); }
.tt-act-prize-corner { display: contents; }
.tt-act-prizes.is-spinning .tt-act-prize { transition: none; }
.tt-act-prize-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--primary);
}
.tt-act-prize-check .tt-icon { width: 10px; height: 10px; font-size: 0; }
.tt-act-prize-check .tt-icon svg { width: 10px; height: 10px; }
/* 大奖角标（tt-badge-prize 提供配色和字阶）：格子宽时压在右上角里，窄时压在外沿，不挡住中间的图标 */
.tt-act-prize-jackpot { position: absolute; top: 6px; right: 6px; }
@container (max-width: 430px) {
  .tt-act-prize-jackpot { top: -6px; right: -6px; }
  .tt-act-prize { padding: 0 2px; }
  /* 格子窄时「谢谢惠顾」降一档字阶，整句放得下 */
  .tt-act-prize.is-empty .tt-act-prize-name { font: var(--t-caption); font-weight: 500; }
}
.tt-act-pool-empty { grid-column: 1 / -1; padding: 24px 0; font: var(--t-caption); color: var(--text-3); text-align: center; }

/* ---------- 卡片底部：提示 + 主按钮 ---------- */
.tt-act-foot { display: flex; flex-direction: column; gap: 12px; }
.tt-act-hint { flex: 1; min-width: 0; min-height: 18px; margin: 0; font: var(--t-caption); color: var(--text-3); }
.tt-act-hint b { font: var(--t-body-strong); color: var(--primary-text); }
.tt-act-foot .tt-btn { width: 100%; }
/* 卡片很宽（只剩一张卡）时提示在左、按钮在右 */
@container (min-width: 640px) {
  .tt-act-foot { flex-direction: row; align-items: center; gap: 24px; }
  .tt-act-foot .tt-btn { flex: none; width: 220px; }
}

/* ---------- 奖励记录 ---------- */
.tt-act-records-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tt-act-record-list {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 1), auto);
  column-gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tt-act-record {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}
/* 分隔线从文字起点开始，不贯穿图标；每列最后一行不画 */
.tt-act-record::after {
  content: '';
  position: absolute;
  left: 40px;
  right: 0;
  bottom: 0;
  height: var(--hairline);
  background: var(--border);
}
.tt-act-record:last-child::after,
.tt-act-record.is-col-end::after { display: none; }
.tt-act-record > .tt-illus { flex: none; }
.tt-act-record-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.tt-act-record-copy b {
  overflow: hidden;
  font: var(--t-body-strong);
  color: var(--text-1);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-act-record-copy time { font: var(--t-caption); font-variant-numeric: tabular-nums; color: var(--text-3); }
.tt-act-record-amount { display: flex; flex: none; flex-direction: column; align-items: flex-end; }
.tt-act-record-amount b { font: var(--t-body-strong); font-variant-numeric: tabular-nums; color: var(--text-1); }
.tt-act-record-amount span { font: var(--t-caption); color: var(--text-3); }
.tt-act-record-amount small { font: var(--t-caption); color: var(--warning-text); }
.tt-act-record-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 56px; font: var(--t-caption); color: var(--text-3); }

/* 全部记录弹窗：单列 */
.tt-act-modal .tt-act-record-list { display: block; }
.tt-act-modal .tt-act-record:last-child::after { display: none; }
.tt-act-modal .tt-act-record.is-col-end:not(:last-child)::after { display: block; }
.tt-act-records-loading,
.tt-act-records-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  font: var(--t-caption);
  color: var(--text-3);
}

@media (prefers-reduced-motion: reduce) {
  .tt-act-day-badge,
  .tt-act-day-badge i,
  .tt-act-bar > span,
  .tt-act-prize { transition: none; }
}

@media (max-width: 768px) {
  /* 主视觉标题在逗号处断行 */
  .tt-act-hero .tt-hero-card-title > span { display: block; }
  /* 手机顶栏右侧已有「签到记录」，页头里的那颗收起来 */
  .tt-act .tt-portal-head > .tt-btn { display: none; }
  .tt-act-cards { gap: 12px; }
  .tt-act-content > :not(:last-child) { margin-bottom: 12px; }
  .tt-act-inset { padding: 16px 12px; }
  .tt-act-day-badge { width: 34px; height: 34px; }
  .tt-act-progress { padding-inline: calc(50% / var(--cols, 7) - 17px); }
  .tt-act-prizes { gap: 8px; }
  /* 窄屏日圈折成 4 + 3 */
  .tt-act-days { gap: 14px 0; }
  /* 记录列表一列 */
  .tt-act-record-list { display: block; }
  .tt-act-record.is-col-end:not(:last-child)::after { display: block; }
  /* 全部记录从底部弹出：沿用 tt-modal 的底部弹层 */
}
@media (max-width: 380px) {
  .tt-act-days { grid-template-columns: repeat(var(--cols-narrow), minmax(0, 1fr)); }
  .tt-act-progress { padding-inline: calc(50% / var(--cols-narrow, 4) - 17px); }
}
