/* 卡密站点嵌入区：保留原卡片顶部的福利标题区，下方嵌入卡密站表单
   第三方页面自带的标题横幅通过 --kami-crop 向上裁掉，不再重复显示 */
:root {
  --kami-h: 604px;
  --kami-crop: 180px;
}

.kami-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5edf9;
  border-radius: 24px;
  box-shadow: 0 10px 35px #2c61ad07;
}

/* 保留的原有标题区：本期精选福利 / 领取5元话费 / 三步流程 */
.kami-head {
  flex: 0 0 auto;
  padding: 29px 30px 0;
}

/* 可视窗口：高 --kami-h，超出部分裁掉 */
.kami-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: var(--kami-h);
  overflow: hidden;
  background: #fff;
}

/* 宽出容器 18px：把第三方页面自带的滚动条推到卡片外裁掉；
   上移 --kami-crop：把第三方页面自带的标题横幅藏到可视窗口上方 */
.kami-frame {
  position: absolute;
  top: calc(-1 * var(--kami-crop));
  left: 0;
  display: block;
  width: calc(100% + 18px);
  height: calc(100% + var(--kami-crop));
  border: 0;
  background: #fff;
  overflow: auto;
}

/* 底部渐隐：示意下方还有内容，可继续滑动查看 */
.kami-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 82%);
  pointer-events: none;
}

.kami-tip {
  margin-top: 11px;
  color: #a3b0c2;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.kami-tip a {
  color: #4b7ec8;
  text-decoration: none;
  border-bottom: 1px dashed #a9c4e8;
}

.kami-tip a:hover {
  color: #2169df;
}

@media (max-width: 760px) {
  :root {
    --kami-h: 620px;
    --kami-crop: 180px;
  }

  .kami-card {
    border-radius: 19px;
    border-color: #e3ecfb;
    box-shadow: 0 8px 26px #1a57a00a;
  }

  .kami-head {
    padding: 23px 23px 0;
  }
}

/* 首页自定义公告 */
.kami-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid #f7e0b6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf0, #fff4e2);
  color: #8a5a10;
  font-size: 13.5px;
  line-height: 1.68;
  box-shadow: 0 6px 18px rgba(196, 138, 26, .07);
}
.kami-notice svg { flex: 0 0 auto; margin-top: 2px; color: #c98a1a; }
.kami-notice p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.kami-notice a.kami-notice-link {
  color: #c2410c;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.kami-notice a.kami-notice-link:hover { color: #9a3412; }

/* ===== 领取渠道切换（稳定渠道 / 备用渠道） ===== */
.ch-wrap { position: relative; }

.ch-radio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.ch-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid #e5edf9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(21, 58, 120, .06);
}

.ch-tabs label {
  flex: 1 1 0;
  padding: 10px 0;
  border-radius: 11px;
  color: #5b6b85;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, color .18s, box-shadow .18s;
}

#chA:checked ~ .ch-tabs label[for="chA"],
#chB:checked ~ .ch-tabs label[for="chB"] {
  background: #2169df;
  color: #fff;
  box-shadow: 0 6px 14px rgba(33, 105, 223, .28);
}

/* 两个渠道只显示一个 */
#chA:checked ~ #chPaneB,
#chB:checked ~ #chPaneA { display: none; }

/* 备用渠道：整块第三方表单，不做上移裁剪 */
.ch-pane-b .kami-body {
  height: 566px;
}

.ch-pane-b::after { display: none; }

.ch-frame {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* 自动切换倒计时 */
.ch-tip-box,
.kami-empty.ch-tip-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
}

.ch-tip-err {
  color: #c0392b;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}

.ch-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ch-count .ch-num {
  min-width: 56px;
  color: #e3321f;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  animation: ch-pulse 1s ease-in-out infinite;
}

.ch-count-txt {
  color: #2169df;
  font-size: 14.5px;
  font-weight: 600;
}

@keyframes ch-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@media (max-width: 760px) {
  .ch-tabs { border-radius: 13px; margin-bottom: 9px; }
  .ch-tabs label { padding: 9px 0; font-size: 13.5px; }
  .ch-pane-b .kami-body { height: 600px; }
  .ch-count .ch-num { font-size: 42px; }
  .ch-count-txt { font-size: 13.5px; }
}
/* ===== 三个领取渠道 chA / chB / chC ===== */
#chA:checked ~ #chPaneA,
#chB:checked ~ #chPaneB,
#chC:checked ~ #chPaneC { display: flex; }
#chA:checked ~ #chPaneC,
#chB:checked ~ #chPaneC,
#chC:checked ~ #chPaneA,
#chC:checked ~ #chPaneB { display: none; }
#chC:checked ~ .ch-tabs label[for="chC"] {
  background: #2169df; color: #fff; box-shadow: 0 6px 14px rgba(33, 105, 223, .28);
}
.ch-wrap.with-tabs .ch-switch { display: none; }
.ch-pane-c .kami-body { height: 566px; }
@media (max-width: 760px) {
  .ch-pane-c .kami-body { height: 600px; }
}