/* 线上活动详情页（gokite.community/online/<id>）。community.css（底色、字体、顶栏、页脚）和 online.css（状态标签、
   奖励数字、步骤、按钮）先加载，这里只写详情页自己的版块：返回链接、页头、两栏正文、时间线、开奖记录、相关链接、完整规则。 */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.cp-crumb { margin: 4px 0 0; font-size: 14px; }
.cp-crumb a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); transition: color 0.15s ease; }
.cp-crumb a:hover { color: var(--ink); }
.cp-crumb .arrow { transform: scaleX(-1); transition: transform 0.2s; }
.cp-crumb a:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* 页头：合作方标志和状态、活动名、时间、一句话介绍、按钮 */
.cp-hero { padding: 22px 0 52px; max-width: 1000px; }
.cp-hero .camp-top { justify-content: flex-start; gap: 18px 22px; }
.cp-title { margin: 30px 0 0; font-size: clamp(42px, 5vw, 76px); font-weight: 450; line-height: 1.03; letter-spacing: -0.05em; text-wrap: balance; }
.cp-title.whole { letter-spacing: -0.02em; line-height: 1.15; }
.cp-hero .camp-when { margin-top: 16px; }
.cp-blurb { margin: 18px 0 0; max-width: 38em; font-size: 19px; line-height: 1.55; }
.cp-hero .camp-cta { margin-top: 30px; }

/* 正文：左边奖励、怎么参加、完整规则，右边时间线、开奖记录、相关链接 */
.cp-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "main aside" "rules aside";
  column-gap: 72px; align-items: start; padding-bottom: 80px; border-top: 1px solid var(--rule);
}
.cp-main { grid-area: main; min-width: 0; }
.cp-aside { grid-area: aside; display: grid; gap: 16px; padding-top: 32px; min-width: 0; }
.cp-rules { grid-area: rules; min-width: 0; }
.cp-body.aside-only { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aside"; }
.cp-body.aside-only .cp-aside { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }

.cp-sec { padding-top: 30px; }
.cp-sec + .cp-sec { margin-top: 34px; border-top: 1px solid var(--rule); }
.cp-sec > h2, .cp-box > h2, .cp-rules > h2 { margin: 0 0 20px; font: 400 12px var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.cp-main .camp-facts { margin: 0; }
.cp-main .fact:first-child { border-top: 0; padding-top: 4px; }
.cp-main .camp-how ol { margin-top: 0; }

/* 右栏的小卡片 */
.cp-box { padding: 24px 26px 26px; background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; }

/* 时间线：竖线串起圆点，做完的变灰，下一步用强调色 */
.cp-tl ol { margin: 0; padding: 0; list-style: none; }
.cp-tl li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; padding-bottom: 20px; }
.cp-tl li:last-child { padding-bottom: 0; }
.cp-tl li::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: -2px; width: 1px; background: var(--rule); }
.cp-tl li:last-child::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin: 6px 0 0 4px; border: 1px solid var(--rule-strong); border-radius: 50%; background: var(--surface); }
.cp-tl li.done .tl-dot { background: var(--rule-strong); }
.cp-tl li.next .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-halo); }
.tl-label { margin: 0; font-size: 15px; line-height: 1.45; }
.cp-tl li.done .tl-label { color: var(--muted); }
.tl-when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 0; font: 12px/1.5 var(--mono); color: var(--muted); }
.tl-next { padding: 1px 8px; font: 11px/1.6 var(--mono); color: var(--bg); background: var(--accent-soft); border-radius: 999px; }

/* 开奖记录 */
.cp-draw > p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.cp-draw > .cp-phase { display: flex; align-items: center; gap: 9px; margin-top: 16px; font: 12px var(--mono); color: var(--ink); }
.cp-draw > .btn { margin-top: 20px; }

/* 相关链接 */
.cp-links ul { margin: 0; padding: 0; list-style: none; }
.cp-links a { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: 14px; line-height: 1.5; transition: color 0.15s ease; }
.cp-links li:first-child a { padding-top: 0; }
.cp-links li:last-child a { padding-bottom: 0; }
.cp-links li + li a { border-top: 1px solid var(--rule); }
.cp-links a:hover { color: var(--accent-soft); }
.cp-links .arrow { flex: none; margin-top: 4px; color: var(--muted); }

/* 完整规则：「标签：内容」的段落排成两栏（规则排版和单场抽奖页共用 ui.js 的 rulesView） */
.cp-rules { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--rule); }
.cp-muted { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.cp-inline { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cp-rules-note { display: grid; gap: 6px; margin: 0 0 18px; padding: 12px 16px; font-size: 13px; line-height: 1.6; color: var(--muted); background: var(--surface-2); border-radius: 12px; }
.cp-rules-note p { margin: 0; }
/* 宽屏上规则正文每行控制在 70 个英文字符、35 个汉字左右，长条款读起来不累 */
.cp-rules-note, .cp-rules > .rules-text { max-width: 46rem; }
.rules { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 0 28px; margin: 0; }
.rules dt, .rules dd { margin: 0; padding: 16px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.65; }
.rules dt { font-weight: 500; }
.rules dd { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.rules-text > p { margin: 0 0 14px; font-size: 15px; line-height: 1.65; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .cp-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "aside" "rules"; }
  .cp-aside { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); align-items: start; }
}
@media (max-width: 650px) {
  .cp-hero { padding: 10px 0 36px; }
  .cp-title { margin-top: 24px; font-size: 40px; letter-spacing: -0.045em; }
  .cp-title.whole { font-size: 32px; }
  .cp-blurb { font-size: 16px; }
  .cp-hero .camp-cta .btn { width: 100%; justify-content: space-between; }
  .cp-aside { grid-template-columns: minmax(0, 1fr); }
  .cp-box { padding: 22px 20px 24px; border-radius: 16px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules dd { padding-top: 0; border-top: 0; }
}
