:root {
  --bg-top: #6e1510;
  --bg-bot: #3a0c0a;
  --card: #fff6e8;
  --card-inner: #ffffff;
  --text: #3a2412;
  --muted: #a08060;
  --red: #e53935;
  --red-deep: #c62828;
  --orange: #ff7a2e;
  --gold: #f5c542;
  --green: #2ecc71;
  --green-bg: #3ecf7a;
  --blue: #4da3ff;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--font);
  background: #1a0808;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.phone {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 42% at 50% 10%, rgba(255,140,50,.32), transparent 55%),
    linear-gradient(180deg, #7a1812 0%, #6b1410 28%, #3a0c0a 65%, #1a0605 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 0 40px rgba(0,0,0,.4);
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 10px 0 6px;
  background: transparent;
  color: #fff;
}
.nav__back {
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 26px; font-weight: 300; color: #fff;
}
.nav__title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 17px; font-weight: 800; letter-spacing: .04em;
}
.nav__right { display: flex; gap: 6px; }
.nav__pill {
  display: inline-flex; align-items: center; gap: 3px;
  height: 26px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.35);
}
.nav__pill .ico {
  width: 12px; height: 12px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 900;
  background: rgba(255,255,255,.2);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 8px 12px 20px;
  color: #fff;
  overflow: hidden;
}
.hero__glow {
  position: absolute; left: 50%; top: 20%; transform: translate(-50%, -40%);
  width: 280px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,150,50,.35), rgba(180,30,20,.15) 45%, transparent 70%);
  pointer-events: none;
}
.hero__row {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center; /* 文案 + 图 居中 */
  gap: 0; /* 文案与图更靠近 */
  min-height: 150px;
}
.hero__copy {
  flex: 0 0 auto;
  text-align: left;
  padding: 4px 0;
  /* 文案倾斜 15° */
  transform: rotate(-15deg);
  transform-origin: center center;
}
.hero__copy h1 {
  margin: 0 0 6px;
  display: flex; flex-direction: column; gap: 0;
}
.hero__copy .line {
  display: block;
  font-size: 28px; font-weight: 900; letter-spacing: .06em;
  line-height: 1.15;
  color: #fff;
  text-shadow:
    0 1px 0 #ffe08a,
    0 2px 0 #e0a020,
    0 3px 0 #c48810,
    0 5px 12px rgba(0,0,0,.45);
  white-space: nowrap;
}
.hero__copy .line--accent {
  font-size: 32px;
  background: linear-gradient(180deg, #fff8e0 0%, #ffe08a 40%, #f0c14b 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #c48810) drop-shadow(0 4px 10px rgba(0,0,0,.4));
}
.hero__copy .sub {
  font-size: 11px; font-weight: 700;
  color: rgba(255,240,210,.95);
  letter-spacing: .02em;
  text-shadow: 0 1px 4px rgba(0,0,0,.35);
  white-space: nowrap;
}
.hero__art {
  flex: 0 0 auto;
  width: 158px;
  position: relative;
  z-index: 2;
  margin-left: -6px;
  pointer-events: none;
}
/* 礼盒周围氛围光，消掉方图硬边 */
.hero__art::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 140%; height: 140%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,170,60,.45) 0%, rgba(160,30,20,.4) 38%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}
.hero__art img {
  display: block; width: 100%; height: auto;
  object-fit: contain;
  /* 边缘羽化，红底图融入页面，去掉方框感 */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 78%);
}

/* ===== Main cream card ===== */
.main-card {
  margin: -6px 12px 0;
  position: relative; z-index: 2;
  background: var(--card);
  border-radius: 18px;
  padding: 16px 12px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.cumu {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 12px; padding: 0 2px;
}
.cumu__left {
  font-size: 14px; font-weight: 800; color: var(--text);
}
.cumu__left b {
  color: var(--red); font-size: 22px; font-weight: 900;
  margin: 0 2px; font-variant-numeric: tabular-nums;
}
.cumu__right {
  font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap;
}

/* week day cards · 分组翻页（箭头 / 轻扫） */
.week-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.week-nav {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; line-height: 1;
  color: #8b1010;
  background: #fff;
  border: 1px solid #f0d2a8;
  box-shadow: 0 2px 6px rgba(120,60,20,.1);
}
.week-nav:disabled {
  opacity: .35; color: #b0a090; cursor: default;
}
.week-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  /* 边缘渐隐，提示还有内容 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.week {
  --day-w: 64px;
  --day-gap: 8px;
  --visible: 4;
  display: flex;
  gap: var(--day-gap);
  padding: 4px 2px 6px;
  will-change: transform;
  transition: transform .32s cubic-bezier(.22, .9, .3, 1);
}
.week.is-dragging {
  transition: none;
}
.day {
  flex: 0 0 var(--day-w);
  width: var(--day-w);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0e0c8;
  padding: 8px 4px 9px;
  text-align: center;
  min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 6px rgba(120,60,20,.06);
}
.week-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 14px; min-height: 22px;
}
.week-meta #weekRange {
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.week-today {
  font-size: 11px; font-weight: 800; color: var(--red);
  padding: 3px 10px; border-radius: 999px;
  background: rgba(229,57,53,.1); border: 1px solid rgba(229,57,53,.25);
}
.week-today[hidden] { display: none !important; }
.day__num {
  font-size: 12px; font-weight: 800; color: #8a6a4a;
}
.day__ico {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 900;
  overflow: hidden;
}
.day__ico img {
  display: block; width: 100%; height: 100%;
  object-fit: contain;
}
.day__label {
  font-size: 11px; font-weight: 800; line-height: 1.15;
}
.day.is-done .day__ico {
  background: linear-gradient(180deg, #5dde90, #2ecc71);
  color: #fff;
  box-shadow: 0 2px 6px rgba(46,204,113,.35);
}
.day.is-done .day__label { color: #2a9d5c; }
.day.is-today {
  border: 1.5px solid #e53935;
  box-shadow: 0 0 0 2px rgba(229,57,53,.12), 0 4px 10px rgba(229,57,53,.12);
  background: #fffaf5;
}
.day.is-today .day__num { color: var(--red); }
.day.is-today .day__ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.day.is-today .day__ico img {
  width: 38px; height: 38px;
  filter: drop-shadow(0 2px 4px rgba(180,40,20,.25));
}
.day.is-today .day__label { color: var(--red); }
.day.is-lock { opacity: .75; background: #f7f2ea; }
.day.is-lock .day__ico {
  background: #e8e0d4; color: #9a9080; font-size: 15px;
  border-radius: 50%;
}
.day.is-lock .day__label { color: #9a9080; }

/* stage */
.sec-title {
  font-size: 15px; font-weight: 900; color: var(--text);
  margin-bottom: 10px; padding: 0 2px;
}
.stage {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  margin-bottom: 18px;
}
.stage__item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f0e0c8;
  padding: 8px 2px 7px;
  text-align: center;
  min-height: 78px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.stage__day {
  font-size: 11px; font-weight: 900; color: var(--text);
}
.stage__ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(155deg, #ff8a65, #e53935);
  position: relative;
  box-shadow: 0 2px 6px rgba(200,40,20,.2);
}
.stage__ico::before {
  content: "";
  width: 14px; height: 10px; border-radius: 2px;
  background: linear-gradient(180deg, #ffe08a, #f0c14b);
}
.stage__status {
  font-size: 10px; font-weight: 800; color: var(--muted);
}
.stage__item.is-claimable {
  background: linear-gradient(180deg, #5dde90, #2ecc71);
  border-color: #27ae60;
  box-shadow: 0 3px 10px rgba(46,204,113,.3);
}
.stage__item.is-claimable .stage__day,
.stage__item.is-claimable .stage__status { color: #fff; }
.stage__item.is-claimable .stage__ico {
  background: transparent; box-shadow: none;
  font-size: 22px; font-weight: 900; color: #fff;
}
.stage__item.is-claimable .stage__ico::before { display: none; }
.stage__item.is-claimable .stage__ico::after { content: "✓"; }
.stage__item.is-claimed {
  background: #eef8f0;
  border-color: #b8e0c4;
}
.stage__item.is-claimed .stage__status { color: #2a9d5c; }
.stage__item.is-claimed .stage__ico {
  background: linear-gradient(180deg, #5dde90, #2ecc71);
}
.stage__item.is-claimed .stage__ico::before { display: none; }
.stage__item.is-claimed .stage__ico::after {
  content: "✓"; color: #fff; font-size: 16px; font-weight: 900;
}
.stage__more {
  display: block; width: 100%;
  margin: -8px 0 16px;
  font-size: 12px; font-weight: 800; color: var(--red);
  text-align: center;
}

/* 奖励一览 */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.prize-card {
  background: #fff;
  border: 1px solid #f0e0c8;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.prize-card--bonus {
  background: linear-gradient(180deg, #fff6d8, #ffe8a8);
  border-color: #e0a020;
}
.prize-card__tag {
  font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 4px;
}
.prize-card__amt {
  font-size: 20px; font-weight: 900; color: var(--red); line-height: 1.2;
}
.prize-card__amt small { font-size: 12px; margin-left: 1px; }
.prize-card__name {
  margin-top: 4px; font-size: 12px; font-weight: 700; color: #5a3a22;
}

/* 活动说明 */
.content-list {
  margin: 0 0 8px;
  padding-left: 1.15em;
  font-size: 12px; font-weight: 600; color: #6a4a32;
}
.content-list li { margin-bottom: 7px; line-height: 1.55; }

/* task */
.task-box {
  background: var(--card-inner);
  border-radius: 12px;
  border: 1px solid #f0e0c8;
  padding: 12px;
  margin-bottom: 12px;
}
.task-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.task__ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #64b5f6, #1e88e5);
  box-shadow: 0 3px 8px rgba(30,136,229,.28);
  color: #fff; font-size: 20px;
}
.task__body { flex: 1 1 auto; min-width: 0; }
.task__name {
  font-size: 14px; font-weight: 900; color: var(--text);
}
.task__desc {
  font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px;
}
.task__bar-wrap { margin-top: 8px; }
.task__bar {
  height: 6px; border-radius: 999px; background: #e8eef5; overflow: hidden;
}
.task__bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #64b5f6, #1e88e5);
  transition: width .3s ease; border-radius: inherit;
}
.task__reward {
  flex: 0 0 auto;
  font-size: 12px; font-weight: 900; color: var(--red);
  padding-top: 2px; white-space: nowrap;
}
.task-cta {
  display: block; width: 100%;
  height: 44px; margin-top: 12px; border-radius: 999px;
  font-size: 16px; font-weight: 900; letter-spacing: .08em; color: #fff;
  background: linear-gradient(180deg, #ff9a4a 0%, #ff6a1a 45%, #e53935 100%);
  box-shadow: 0 4px 0 #b71c1c, 0 8px 16px rgba(220,60,20,.28);
}
.task-cta:active { transform: translateY(1px); box-shadow: 0 3px 0 #b71c1c; }
.task-cta.is-claim {
  background: linear-gradient(180deg, #ffe08a, #f0c14b 50%, #e0a020);
  color: #8b1010; box-shadow: 0 4px 0 #c48810, 0 8px 16px rgba(200,140,20,.25);
}
.task-cta.is-done {
  background: #d8d0c8; color: #8a8078; box-shadow: none; cursor: default;
}

.task-empty {
  text-align: center; padding: 22px 10px 10px;
}
.task-empty__ico {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; color: #fff;
  background: linear-gradient(180deg, #58d68d, #27ae60);
}
.task-empty__txt { font-size: 13px; font-weight: 800; color: var(--muted); }

/* footer rules */
.foot-rules {
  margin: 14px 16px 8px;
  text-align: center;
  font-size: 11px; font-weight: 600; color: rgba(255,230,200,.55);
  line-height: 1.55;
}
.foot-rules button {
  display: inline; color: rgba(255,230,200,.7); font-size: 11px; font-weight: 700;
}
.foot-rules .chev { display: inline-block; margin-left: 2px; transform: scaleY(.8); }

.demo-bar {
  margin: 8px 12px 0; padding: 6px;
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: center;
  opacity: .7;
}
.demo-bar button {
  padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700;
  color: rgba(255,230,200,.8); border: 1px solid rgba(255,220,160,.25);
  background: rgba(0,0,0,.2);
}

/* toast */
.tip {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(12px);
  z-index: 300; padding: 10px 16px; border-radius: 999px;
  background: rgba(30,10,10,.9); color: #fff; font-size: 12px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: .25s ease; max-width: 86vw;
}
.tip.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* modals */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal__mask { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.modal__panel { position: relative; z-index: 1; width: min(320px, 90vw); }

.reward-pop { text-align: center; color: #fff; }
.reward-pop__title {
  font-size: 22px; font-weight: 900; letter-spacing: .06em;
  text-shadow: 0 2px 8px rgba(0,0,0,.4); margin-bottom: 6px;
}
.reward-pop__sub {
  font-size: 13px; font-weight: 700; color: rgba(255,236,200,.9); margin-bottom: 14px;
}
.reward-ticket {
  margin: 0 auto 16px; width: 220px; padding: 22px 16px; border-radius: 14px;
  background: linear-gradient(160deg, #fff8e8, #ffe0a0 50%, #f5c542);
  border: 2px solid #fff; box-shadow: 0 12px 28px rgba(0,0,0,.3); color: #8b1010;
}
.reward-ticket__amt { font-size: 40px; font-weight: 900; line-height: 1; }
.reward-ticket__amt small { font-size: 16px; }
.reward-ticket__name { margin-top: 6px; font-size: 14px; font-weight: 800; }
.reward-pop__btn {
  min-width: 180px; height: 44px; padding: 0 28px; border-radius: 999px;
  font-size: 16px; font-weight: 900; color: #8b1010;
  background: linear-gradient(180deg, #ffe08a, #f0c14b 55%, #e0a020);
  box-shadow: 0 4px 0 #c48810, 0 10px 20px rgba(0,0,0,.25);
}
.modal-x {
  display: block; margin: 14px auto 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.65); color: #fff; font-size: 20px;
}

.sheet-pop {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,.4);
}
.sheet-pop__head {
  position: relative; padding: 14px 40px; text-align: center;
  font-size: 16px; font-weight: 900; color: var(--text);
  border-bottom: 1px solid #f0e4d4;
}
.sheet-pop__close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; font-size: 20px; color: #999;
}
.sheet-pop__body {
  padding: 14px 16px 18px; max-height: 60vh; overflow: auto;
  font-size: 13px; color: #5a3a22;
}
.rule-block { margin-bottom: 14px; }
.rule-block h4 {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 900; color: var(--text); margin-bottom: 6px;
}
.rule-block h4::before {
  content: ""; width: 6px; height: 14px; border-radius: 2px; background: var(--red);
}
.rule-block p, .rule-block li {
  font-size: 12px; color: #6a4a32; font-weight: 600; line-height: 1.6;
}
.rule-block ul { padding-left: 1.1em; }

.record-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.record-table th, .record-table td {
  padding: 10px 6px; text-align: center; border-bottom: 1px solid #f0e4d4;
}
.record-table th { color: var(--muted); font-weight: 800; }
.record-table .empty { color: var(--muted); padding: 28px; }

.stage-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stage-table th, .stage-table td {
  padding: 10px 6px; text-align: center; border-bottom: 1px solid #f0e4d4;
}
.stage-table th { color: var(--muted); font-weight: 800; }
.stage-table .amt {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: rgba(255,122,46,.12); color: var(--orange); font-weight: 900;
}
.stage-table .ok { color: #2a9d5c; font-weight: 800; }
.stage-table .no { color: var(--muted); font-weight: 700; }
.stage-table .claimable { color: var(--orange); font-weight: 800; }
