/* ==========================================================================
   小满券仓（coupon.zangeng.com）· 优惠券展示专用样式
   复用 tokens.css / main.css 的设计令牌；本文件只放优惠券页独有组件。
   ========================================================================== */

:root {
  /* 京东红，仅用于券面价格与「券」徽标，避免污染全站品牌色 */
  --coupon-red: #e4393c;
  --coupon-red-soft: rgba(228, 57, 60, 0.1);
}

/* ---------------------------------- 工具栏（榜单切换 + 搜索） ---------------------------------- */
.cp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.cp-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.cp-tab {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background .15s ease, color .15s ease;
}
.cp-tab:hover { color: var(--text); }
.cp-tab.is-active { background: var(--accent); color: #fff; }
.cp-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 平台筛选（JS 动态注入 .cp-toolbar；数据带 platform 后才显示，京东/淘宝混合期可见） */
.cp-plat {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.cp-plat[hidden] { display: none; }
.cp-plat-chip {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.cp-plat-chip:hover { color: var(--text); }
.cp-plat-chip.is-active { background: var(--accent-solid); color: #fff; }
.cp-plat-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 排序下拉（C8） */
.cp-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.875rem; }
.cp-sort select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.cp-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.cp-search { display: flex; gap: 8px; }
.cp-search input {
  width: 260px;
  max-width: 60vw;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
}
.cp-search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.cp-search button {
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.cp-search button:hover { background: var(--accent-strong); }

/* ---------------------------------- 优惠券网格 ---------------------------------- */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}
.cp-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* 平台色描边（京东红 / 淘宝橙） */
.cp-card[data-plat="jd"] { border-color: rgba(228, 57, 60, .45); }
.cp-card[data-plat="taobao"] { border-color: rgba(255, 119, 0, .45); }
.cp-card[data-plat="pdd"] { border-color: rgba(226, 33, 32, .42); }
.cp-card[data-plat="douyin"] { border-color: rgba(17, 17, 17, .42); }
/* 悬停放大 + 强阴影（仅精确指针设备，避免触屏点击后 :hover 卡住导致放大/位移冲突） */
@media (hover: hover) {
  .cp-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
  }
  .cp-card[data-plat="jd"]:hover { border-color: var(--coupon-red); }
  .cp-card[data-plat="taobao"]:hover { border-color: #ff7700; }
.cp-card[data-plat="pdd"]:hover { border-color: #e22120; }
.cp-card[data-plat="douyin"]:hover { border-color: #111; }
}
/* 无可点链接的券卡降级（防 featured 死卡）：置灰、取消 hover 位移 */
.cp-card.is-dead { opacity: .55; cursor: not-allowed; }
.cp-card.is-dead:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.cp-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-2);
}
.cp-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  padding: 12px 12px 0;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}
.cp-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px 14px;
}
/* 立减大角标：渐变红 pill，放大加粗，一眼可见力度 */
.cp-off {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a3d, #e4393c);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(228, 57, 60, .32);
}
.cp-final {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.cp-final::before { content: "到手 "; color: var(--text-soft); font-weight: 400; }

/* 超值 / 火爆 飘带（按券面额力度），置于右上星标左侧 */
/* 价格走势 sparkline（M7） */
.cp-spark { vertical-align: middle; margin-left: 6px; }

.cp-hot {
  position: absolute;
  top: 8px;
  right: 80px;
  z-index: 2;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb03a, #ff7a00);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 3px 10px rgba(255, 122, 0, .35);
}
.cp-hot--fire {
  background: linear-gradient(135deg, #ff5a5f, #e4393c);
  box-shadow: 0 3px 10px rgba(228, 57, 60, .35);
}

/* 限时倒计时（couponEndTime 24h 内）：红色脉冲，实时刷新 */
.cp-countdown {
  align-self: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(228, 57, 60, .12);
  color: #e4393c;
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  animation: cp-pulse 1.1s ease-in-out infinite;
}
.cp-countdown.is-ended { background: var(--surface-2); color: var(--text-soft); animation: none; }
@keyframes cp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(228, 57, 60, .35); }
  50% { box-shadow: 0 0 0 4px rgba(228, 57, 60, 0); }
}

/* 今日新增小徽标（createTime 24h 内） */
.cp-fresh {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--coupon-red);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

/* 即将失效小徽标（couponEndTime 3 天内，行内贴在手价旁，避免与 cp-fresh / 星标争位） */
.cp-expire {
  align-self: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--expire-fg);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  animation: cp-pulse 1.6s ease-in-out infinite;
}

/* 热门品类 chip 行（首页券区上方） */
.cp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}
.cp-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.cp-cat-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------------------------------- 状态 / 加载更多 ---------------------------------- */
.cp-state {
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.cp-state .cp-retry { margin-top: 14px; }
/* 后端不可达、用构建快照兜底时：灰化券卡 + 状态区警示（快照券可能已失效，提示用户核对） */
.cp-grid.is-stale .cp-card { opacity: .6; filter: grayscale(.5); transition: opacity .2s ease, filter .2s ease; }
.cp-grid.is-stale .cp-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.cp-grid.is-stale .cp-card.is-dead { opacity: .4; }
.cp-state.is-fallback {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.cp-more-wrap { text-align: center; margin-top: 18px; }
.cp-more-wrap .btn[hidden] { display: none; }

.cp-note {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.8125rem;
}

@media (max-width: 720px) {
  .cp-toolbar { flex-direction: column; align-items: stretch; }
  .cp-search { width: 100%; }
  .cp-search input { flex: 1; max-width: none; width: auto; }
  .cp-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ---------------------------------- 券卡单元（收藏星标包裹层） ---------------------------------- */
/* 星标按钮不能嵌在 <a> 内（非法嵌套），改用 .cp-cell 包裹层承载绝对定位 */
.cp-cell { position: relative; display: flex; flex-direction: column; }
.cp-cell .cp-card { flex: 1; }
.cp-star {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.cp-star:hover { transform: scale(1.12); background: rgba(0, 0, 0, 0.6); }
.cp-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cp-star.is-on { background: var(--coupon-red); }

/* ---------------------------------- 骨架屏加载态 ---------------------------------- */
.cp-skeleton {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  padding-bottom: 14px;
}
.cp-sk-img { width: 100%; aspect-ratio: 1 / 1; background: var(--surface-2); }
.cp-sk-line {
  height: 14px;
  margin: 12px 12px 0;
  border-radius: 6px;
  background: var(--surface-2);
}
.cp-sk-line.is-short { width: 55%; height: 12px; margin-top: 8px; }
.cp-skeleton .cp-sk-img,
.cp-skeleton .cp-sk-line {
  animation: cp-sk-shimmer 1.2s ease-in-out infinite;
}
@keyframes cp-sk-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .cp-skeleton .cp-sk-img, .cp-skeleton .cp-sk-line { animation: none; }
  .cp-star, .cp-star:hover { transform: none; }
  .cp-countdown, .cp-expire { animation: none; }
}

/* ---------------------------------- 搜索历史 / 热门词 chip ---------------------------------- */
.cp-his {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.cp-his[hidden] { display: none; }
.cp-his-label { color: var(--text-soft); font-size: 0.8125rem; }
.cp-his-chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 12px;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, color .15s ease;
}
.cp-his-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cp-his-clear {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
.cp-his-clear:hover { color: var(--coupon-red); }

/* ---------------------------------- 收藏 / 最近看过页 ---------------------------------- */
.cp-fav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cp-fav-count { color: var(--text-muted); font-size: 0.9375rem; }
.cp-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.cp-mini-btn {
  flex: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  padding: 6px 0;
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.cp-mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.cp-mini-btn.is-danger:hover { border-color: var(--coupon-red); color: var(--coupon-red); }
.cp-empty {
  padding: 42px 0;
  text-align: center;
  color: var(--text-muted);
}
.cp-empty .btn { margin-top: 16px; }

/* ---------------------------------- 凑单计算器 ---------------------------------- */
.cal-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.cal-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}
.cal-panel h3 { margin: 0 0 12px; font-size: 1.0625rem; }
.cal-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.cal-row.is-head { color: var(--text-soft); font-size: 0.8125rem; margin-bottom: 6px; }
.cal-input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
}
.cal-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-del {
  border: 0; background: transparent; color: var(--text-soft);
  font-size: 1rem; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
}
.cal-del:hover { color: var(--coupon-red); }
.cal-add { margin-top: 4px; }
.cal-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.cal-result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.cal-result-line:last-child { border-bottom: 0; }
.cal-result-line strong { color: var(--text); }
.cal-total strong { color: var(--coupon-red); font-size: 1.375rem; }
.cal-save strong { color: var(--accent); }
.cal-warn { margin-top: 12px; font-size: 0.8125rem; color: var(--text-soft); }
.cal-tips { margin-top: 14px; font-size: 0.8125rem; color: var(--text-soft); line-height: 1.7; }
@media (max-width: 860px) {
  .cal-wrap { grid-template-columns: 1fr; }
}

/* ---------------------------------- 大促日历 ---------------------------------- */
.hol-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: 24px;
  font-size: 0.9375rem;
}
.hol-next strong { color: var(--accent); }
.hol-list { list-style: none; margin: 0; padding: 0; }
.hol-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.hol-item.is-next { background: var(--accent-soft); border-radius: var(--radius); padding-left: 14px; padding-right: 14px; }
.hol-date { font-weight: 800; color: var(--coupon-red); font-size: 1.0625rem; }
.hol-count { margin-left: 8px; font-weight: 400; color: var(--text-soft); font-size: 0.8125rem; }
.hol-name { margin: 0 0 6px; font-size: 1.0625rem; }
.hol-desc { margin: 0; color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; }
.hol-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--coupon-red-soft);
  color: var(--coupon-red);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 2px;
}
@media (max-width: 720px) {
  .hol-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------------------------------- 猜你喜欢（M1） ---------------------------------- */
.cp-rec-section[hidden] { display: none; }
.cp-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cp-rec-head h2 { font-size: 1.25rem; margin: 0; }
.cp-rec-dismiss {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8125rem;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.cp-rec-dismiss:hover { color: var(--coupon-red); border-color: var(--coupon-red); }

/* 分享按钮（M4）：星标左侧，火爆飘带再左侧（right:80px） */
.cp-share {
  position: absolute;
  top: 8px;
  right: 44px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.cp-share:hover { transform: scale(1.12); background: rgba(0, 0, 0, 0.6); }
.cp-share:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 降价提醒按钮（M2）：价格行内联胶囊 */
.cp-alert {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0 14px;
  /* 触控目标 ≥44px（审计 T5）：降价提醒胶囊 */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.cp-alert.is-on { background: var(--coupon-red); border-color: var(--coupon-red); color: #fff; }
.cp-alert:hover { color: var(--coupon-red); border-color: var(--coupon-red); }
.cp-alert.is-on:hover { color: #fff; }
.cp-expire.is-hot { background: var(--coupon-red); color: #fff; }

/* ---------------------------------- 回到顶部 ---------------------------------- */
.cp-back-top {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 50;
  /* 触控目标 ≥44px（审计 T5） */
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: opacity .15s ease, transform .15s ease;
}
.cp-back-top[hidden] { display: none; }
.cp-back-top:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ------------------------- W1 券详情页 /p/<id> ------------------------- */
.pd-crumbs { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 14px; }
.pd-crumbs a { color: var(--text-muted); text-decoration: none; }
.pd-crumbs a:hover { color: var(--accent); }
.pd-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 720px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-media img { width: 100%; height: auto; border-radius: var(--radius, 12px); border: 1px solid var(--border); background: var(--surface); aspect-ratio: 1 / 1; object-fit: contain; }
.pd-title { font-size: 1.375rem; line-height: 1.35; margin: 0 0 12px; }
.pd-power {
  display: inline-block;
  background: var(--coupon-red);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.pd-final { font-size: 1.0625rem; color: var(--text-muted); margin-bottom: 8px; }
.pd-final strong { color: var(--coupon-red); font-size: 1.75rem; margin-left: 4px; }
.pd-expire { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 14px; }
.pd-expire.is-urgent { color: var(--coupon-red); font-weight: 700; }
.pd-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pd-claim { flex: 1 1 200px; text-align: center; }
.pd-alert.is-on { background: var(--coupon-red); border-color: var(--coupon-red); color: #fff; }
.pd-note { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.7; }
.pd-trend { min-height: 168px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 12px; display: flex; align-items: center; }
.pd-trend svg { display: block; width: 100%; height: auto; }

/* ------------------------- W2 降价热榜 /drops.html ------------------------- */
.dp-drop {
  display: inline-flex;
  align-items: center;
  background: #16a34a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 6px;
}

/* ------------------------- W4 首页情报条 / Top10 / 氛围条 ------------------------- */
.cp-intel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--text-muted);
  width: fit-content;
  max-width: 100%;
}
.cp-intel b { color: var(--coupon-red); font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.cp-intel-sep { color: var(--border-strong); }
.cp-intel-link { margin-left: auto; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.cp-intel-link:hover { text-decoration: underline; }
.cp-mood { margin-top: 12px; font-size: 0.875rem; }
.cp-mood a {
  display: inline-block;
  background: var(--coupon-red-soft);
  color: var(--coupon-red);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  animation: cp-mood-blink 2.4s ease-in-out infinite;
}
.cp-mood a:hover { text-decoration: none; filter: brightness(0.95); }
@keyframes cp-mood-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
@media (prefers-reduced-motion: reduce) { .cp-mood a { animation: none; } }
.cp-top10 {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cp-top-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: border-color .15s ease, transform .15s ease;
}
.cp-top-chip:hover { border-color: var(--coupon-red); transform: translateY(-2px); }
.cp-top-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--coupon-red-soft);
  color: var(--coupon-red);
  font-weight: 800;
  font-size: 0.75rem;
  flex: 0 0 auto;
}
.cp-top-chip:nth-child(-n+3) .cp-top-rank { background: var(--coupon-red); color: #fff; }
.cp-top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-top-off { color: var(--coupon-red); font-weight: 700; white-space: nowrap; }

/* ------------------------- W5 推送底部引导条（app.js initPushGuide） ------------------------- */
.pg-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 96;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: min(680px, calc(100vw - 24px));
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  font-size: 0.875rem;
  color: var(--text);
}
.pg-text { flex: 1 1 220px; min-width: 0; line-height: 1.5; }
.pg-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.pg-btn--go { background: var(--coupon-red); border-color: var(--coupon-red); color: #fff; }
.pg-btn--go:hover { filter: brightness(.95); text-decoration: none; color: #fff; }
.pg-btn--later { color: var(--text-muted); }
.pg-btn--later:hover { border-color: var(--text-muted); }
@media (max-width: 640px) {
  .pg-banner { bottom: 10px; padding: 10px 12px; }
  .pg-btn--later { display: none; } /* 拇指区只留主 CTA，关闭由「以后再说」以外手势退出 */
}

/* ------------------------- W5 降价提醒中心 /my-alerts.html ------------------------- */
.ma-push { border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface); padding: 16px; }
.ma-push-row { display: flex; align-items: center; gap: 12px; }
.ma-push-icon { font-size: 1.5rem; flex: 0 0 auto; }
.ma-push-row > div { flex: 1 1 auto; min-width: 0; }
.ma-push-status { margin: 4px 0 0; font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.ma-push-btn { flex: 0 0 auto; }
.ma-ios {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius, 12px);
  background: var(--coupon-red-soft, rgba(220, 38, 38, .06));
  font-size: 0.875rem;
  line-height: 1.7;
}
.ma-ios ol { margin: 6px 0 8px; padding-left: 22px; }
.ma-ios b { color: var(--coupon-red); }
.ma-cell {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--surface);
}
.ma-cell.is-hit { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }
.ma-img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--surface-2, #f3f4f6); }
.ma-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ma-title { font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ma-cmp { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.7; }
.ma-cmp b { font-weight: 700; }
.ma-hit-txt { color: #16a34a; }
.ma-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.btn-sm { padding: 5px 12px; font-size: 0.8125rem; border-radius: 8px; }
.ma-claim { background: var(--coupon-red); border-color: var(--coupon-red); color: #fff; text-decoration: none; }
.ma-claim:hover { filter: brightness(.95); color: #fff; text-decoration: none; }
.ma-unsub { color: var(--text-muted); }
@media (max-width: 640px) {
  .ma-cell { padding: 12px; }
  .ma-img { flex-basis: 64px; width: 64px; height: 64px; }
  .ma-push-row { flex-wrap: wrap; }
  .ma-push-btn { width: 100%; }
}

/* ------------------------- W5 今日省钱挑战条（challenge.js） ------------------------- */
.ch-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--coupon-red-soft, rgba(228, 57, 60, .06));
  font-size: 0.9375rem;
  line-height: 1.6;
}
.ch-bar.is-new { border-color: var(--coupon-red); box-shadow: 0 0 0 3px var(--coupon-red-soft, rgba(228, 57, 60, .12)); }
.ch-fire { font-size: 1.25rem; flex: 0 0 auto; }
.ch-text { flex: 1 1 240px; min-width: 0; color: var(--text); }
.ch-text b { color: var(--coupon-red); font-variant-numeric: tabular-nums; }
.ch-share {
  flex: 0 0 auto;
  padding: 7px 16px;
  border: none;
  border-radius: 10px;
  background: var(--coupon-red);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.ch-share:hover { filter: brightness(.95); }

/* ------------------------- W3 长文导购页 /guides/*（build.js guide*Shell） ------------------------- */
/* 索引页卡列表 */
.gd-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gd-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.gd-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow, 0 6px 24px rgba(0, 0, 0, .08)); transform: translateY(-2px); text-decoration: none; }
.gd-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--surface-2, #f3f4f6); }
.gd-item-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gd-item-body h3 { margin: 0; font-size: 1.0625rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gd-item-body p { margin: 0; font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gd-date { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 文章页 */
.gd-article .container { max-width: 760px; }
.gd-crumb { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 12px; }
.gd-crumb a { color: var(--text-muted); text-decoration: none; }
.gd-crumb a:hover { color: var(--coupon-red); }
.gd-article h1 { font-size: 1.6rem; line-height: 1.35; margin: 0 0 8px; }
.gd-meta { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 18px; }
.gd-img { width: 100%; border-radius: 12px; margin: 0 0 16px; background: var(--surface-2, #f3f4f6); }
.gd-body { font-size: 1rem; line-height: 1.85; color: var(--text); word-break: break-word; }
.gd-body h2 { font-size: 1.25rem; line-height: 1.5; margin: 26px 0 10px; padding-left: 10px; border-left: 4px solid var(--coupon-red); }
.gd-body h3 { font-size: 1.0625rem; margin: 20px 0 8px; }
.gd-body h4 { font-size: 1rem; margin: 16px 0 6px; }
.gd-body p { margin: 0 0 14px; }
.gd-body ul { margin: 0 0 14px; padding-left: 22px; }
.gd-body li { margin: 4px 0; }
.gd-body a { color: var(--coupon-red); text-decoration: none; }
.gd-body a:hover { text-decoration: underline; }
.gd-body strong { color: var(--coupon-red); }
.gd-body hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.gd-coupon-cta { margin: 22px 0; }
.gd-coupon-cta .btn { display: inline-flex; }
.gd-note {
  margin: 20px 0;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius, 12px);
  background: var(--coupon-red-soft, rgba(220, 38, 38, .06));
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.gd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.gd-tag {
  display: inline-flex;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
}
.gd-tag:hover { border-color: var(--coupon-red); color: var(--coupon-red); text-decoration: none; }
.gd-related { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.gd-related h2 { font-size: 1.125rem; margin: 0 0 12px; }
.gd-more-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gd-more {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
}
.gd-more:hover { border-color: var(--coupon-red); color: var(--coupon-red); text-decoration: none; }
@media (max-width: 640px) {
  .gd-article h1 { font-size: 1.35rem; }
  .gd-more-list { grid-template-columns: 1fr; }
}


