/* 49 主题 · 粘性功能（收藏 / 提醒 / 投票 / 走势图） */

/* ---------- 收藏悬浮按钮 ---------- */
.t49-fav {
  position: fixed;
  right: 14px;
  bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--color-bg-card);
  color: var(--color-text-tertiary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: transform var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard), opacity var(--dur-base) var(--ease-standard);
}
.t49-fav.is-show { opacity: 1; pointer-events: auto; transform: none; }
.t49-fav:active { transform: scale(0.92); }
.t49-fav__label { font-size: 9px; line-height: 1; }
.t49-fav.is-on {
  color: var(--color-text-inverse);
  background: var(--gradient-primary);
}
.t49-fav.is-on svg { fill: currentColor; }

/* ---------- 轻提示 ---------- */
.t49-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 80px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  transform: translate(-50%, 8px);
  padding: 8px 16px;
  border-radius: var(--radius-16);
  background: rgba(0, 0, 0, 0.78);
  color: var(--color-text-inverse);
  font-size: var(--font-size-13);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.t49-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 开奖提醒引导（卡片内联，不浮动） ---------- */
.t49-notify-tip {
  display: block;
  width: calc(100% - var(--space-20));
  margin: var(--space-10) var(--space-10) 0;
  padding: 7px 0;
  border: 0;
  border-radius: var(--radius-8);
  background: rgba(7, 193, 96, 0.10);
  color: var(--color-primary);
  font-family: inherit;
  font-size: var(--font-size-12);
  font-weight: 500;
  cursor: pointer;
  animation: t49-tip-in 0.3s var(--ease-standard);
  transition: opacity 0.35s var(--ease-standard);
}
.t49-notify-tip:active { background: rgba(7, 193, 96, 0.18); }
.t49-notify-tip.is-hide { opacity: 0; }
@keyframes t49-tip-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 竞猜本地投票 ---------- */
/* 竞猜选项：选中 = 左侧竖条 + 淡绿渐变 + 序号变圆勾 */
.t49-gs-opts .t49-gu-option {
  position: relative;
  padding-left: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), padding-left var(--dur-base) var(--ease-standard);
}
.t49-gs-opts .t49-gu-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--gradient-primary);
  transform: translateY(-50%);
  transition: height var(--dur-base) var(--ease-standard);
}
.t49-gs-opts .t49-gu-option:active { padding-left: 14px; }
.t49-gs-opts .t49-gu-option.is-picked {
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.13) 0%, rgba(7, 193, 96, 0.02) 72%);
}
.t49-gs-opts .t49-gu-option.is-picked::before { height: 58%; }

/* 序号 → 绿色圆勾 */
.t49-gs-opts .t49-gu-option.is-picked .t49-gs-opt__rank {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: transparent;
  box-shadow: 0 1px 3px rgba(7, 193, 96, 0.35);
}
.t49-gs-opts .t49-gu-option.is-picked .t49-gs-opt__rank::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* 名称与进度条同步强调 */
.t49-gs-opts .t49-gu-option.is-picked .t49-gs-opt__name {
  color: var(--color-primary);
  font-weight: 600;
}
.t49-gs-opts .t49-gu-option.is-picked .t49-gs-opt__track i {
  background: var(--gradient-primary);
}
.t49-gu-hint {
  padding: var(--space-10) var(--space-15) 0;
  font-size: var(--font-size-12);
  color: var(--color-text-tertiary);
  text-align: center;
}

/* ---------- 走势图 ---------- */
.t49-ch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-10) var(--space-10) 0;
}
.t49-ch-title { font-size: var(--font-size-16); font-weight: 600; }
.t49-ch-sub { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.t49-ch-tabs { margin: 0; }
.t49-ch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-10);
  padding: var(--space-5) var(--space-15) var(--space-10);
  font-size: var(--font-size-12);
  color: var(--color-text-tertiary);
}
.t49-ch-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  vertical-align: middle;
}
.t49-ch-svg { display: block; width: 100%; height: auto; }

/* 号码频次柱状图：49 根柱子，横轴等分 */
.t49-ch-bars { display: flex; align-items: flex-end; gap: 1px; height: 120px; padding: 0 var(--space-10); }
.t49-ch-bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  background: var(--color-ball-grey);
}
.t49-ch-bar--red { background: var(--color-ball-red); }
.t49-ch-bar--blue { background: var(--color-ball-blue); }
.t49-ch-bar--green { background: var(--color-ball-green); }
.t49-ch-axis {
  display: flex;
  justify-content: space-between;
  padding: var(--space-5) var(--space-10) 0;
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--color-text-placeholder);
  font-variant-numeric: tabular-nums;
}

/* 生肖频次横条 */
.t49-ch-zodiac { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-10); padding: var(--space-10) var(--space-15); }
.t49-ch-zodiac__row { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-12); }
.t49-ch-zodiac__name { flex: none; width: 16px; color: var(--color-text-secondary); }
.t49-ch-zodiac__track { flex: 1; height: 6px; border-radius: 3px; background: var(--color-bg-subtle); overflow: hidden; }
.t49-ch-zodiac__fill { display: block; height: 100%; border-radius: 3px; background: var(--gradient-primary); }
.t49-ch-zodiac__num { flex: none; width: 26px; text-align: right; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }

/* 候选号码方块 */
.t49-ch-hot { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-10) 6px; padding: var(--space-10) var(--space-15); }
.t49-ch-hot__item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.t49-ch-hot__count { font-size: 10px; color: var(--color-text-tertiary); }
