/* ============================================================
   绘聚·次元屋 活动页 样式
   暖色系设计 token，还原 .pen 设计稿 zw9sX
   ============================================================ */
:root {
  --bg: #fffbf2;
  --card: #fcf6ea;
  --primary: #f5811f;
  --primary-deep: #d95f0b;
  --gold: #b9852b;
  --title: #7a4f1d;
  --text: #4a3b2a;
  --text-sub: #8c7a63;
  --line: #f0e2c8;
  --grad: linear-gradient(135deg, #ffa53c 0%, #f0730f 100%);
  --nav-h: 52px;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(240, 115, 15, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  background: #f3ece0;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 手机宽度居中的活动页 */
.page {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, .06);
  padding-bottom: 84px; /* 给底部吸底栏留位 */
}

/* ---------- 顶部栏：logo + 登录/用户态 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 22px; background: var(--bg);
}
.topbar__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar__logo { height: 24px; width: auto; display: block; }
.topbar__name { font-weight: 900; color: var(--title); font-size: 15px; letter-spacing: .5px; }
.topbar__auth { display: flex; align-items: center; gap: 10px; }
.topbar__user { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 900; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(240,115,15,.3); }
.topbar__nick { font-size: 13px; font-weight: 700; color: var(--text); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-mini { display: inline-block; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--grad); color: #fff9ee; text-decoration: none; box-shadow: var(--shadow); border: none; cursor: pointer; }
.btn-mini--ghost { background: #fff; color: var(--primary-deep); border: 1px solid #f0a868; box-shadow: none; }

/* ---------- 顶部主视觉 ---------- */
.hero { position: relative; }
.hero__banner { width: 100%; display: block; }
/* 数据带 + CTA 按钮：共用一个外框包裹（浮于 banner 底边） */
.hero__cta { margin: -22px 22px 7px; position: relative; padding: 14px 14px 16px; }
.hero__stats { display: block; width: 100%; }

/* ---------- 吸顶导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s;
}
.nav.is-stuck { box-shadow: 0 4px 16px rgba(122, 79, 29, .12); border-color: var(--line); }
.nav__inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 12px;
}
.nav__tabs { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav__tabs::-webkit-scrollbar { display: none; }
.nav__tab {
  display: inline-flex; align-items: center; line-height: 1; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--text);
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  transition: all .2s;
}
.nav__tab.is-active { color: #fff; background: var(--grad); border-color: transparent; }

/* ---------- 区块通用 ---------- */
.section { padding: 18px 22px 0; scroll-margin-top: calc(var(--nav-h) + 6px); }
/* 首个区块：上边距收紧，使 Tab 上下留白与卡片间距(18px)一致 */
#intro { padding-top: 7px; }
/* 外框：包裹标题 + 内容 */
.frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 14px;
}
.section__title {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 14px;
}
.section__banner { display: block; height: 46px; width: auto; max-width: 74%; margin: 0 auto; object-fit: contain; }
.section__sub { font-size: 12px; color: var(--text-sub); font-style: normal; }

/* 活动作品：CSS 仿笔刷标题 */
.section__title .brush {
  position: relative; display: inline-block;
  font-size: 18px; font-weight: 900; color: #fff; letter-spacing: 1px;
  padding: 7px 22px; transform: rotate(-2deg);
  background: var(--grad);
  border-radius: 16px 12px 18px 10px / 12px 18px 10px 16px;
  box-shadow: 0 4px 10px rgba(240,115,15,.28);
}
.section__title .brush::before { content: "👑"; position: absolute; right: -4px; top: -16px; font-size: 15px; transform: rotate(12deg); }
.section__title .brush::after { content: "✨"; position: absolute; left: -16px; bottom: -4px; font-size: 14px; }

/* 引言关键词高亮 */
.hl { padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.hl--orange { color: var(--primary-deep); background: rgba(245, 129, 31, .16); }
.hl--green { color: #2f7d4f; background: rgba(80, 180, 120, .18); }
.hl--pink { color: #d6478f; background: rgba(230, 120, 180, .2); }

/* ---------- 活动引言 ---------- */
.intro { background: none; border: none; border-radius: 0; padding: 0; }
.intro__lead { font-size: 14px; color: var(--text); }
.intro__lead strong { color: var(--title); }
.accent { color: var(--primary-deep); }
.intro__meta { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.meta-item { font-size: 13px; color: var(--text); display: flex; gap: 8px; }
.meta-item__k { flex: none; font-weight: 700; color: #fff; background: var(--gold); border-radius: 6px; padding: 1px 8px; font-size: 12px; height: fit-content; }
.cta-row { display: flex; gap: 12px; margin: 12px 0 0; }
.btn { flex: 1; text-align: center; font-weight: 700; font-size: 15px; padding: 11px 0; border-radius: 999px; transition: transform .15s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn--primary { color: #fff9ee; background: var(--grad); box-shadow: var(--shadow); }
.btn--ghost { color: var(--primary-deep); background: #fff; border: 1.5px solid #f0a868; }

/* ---------- 赛事进程 日期看板 ---------- */
.timeline { background: var(--grad); border-radius: var(--radius); padding: 16px 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.timeline::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(20deg, rgba(255,255,255,.06) 0 2px, transparent 2px 26px); pointer-events: none; }
.timeline__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; position: relative; z-index: 1; }
.tblock { text-align: center; color: #fff; }
.tblock__name { font-size: 12px; font-weight: 700; color: #fff1de; margin-bottom: 4px; }
.tblock__date { font-size: 19px; font-weight: 900; letter-spacing: .5px; }
.tblock__date--sm { font-size: 17px; }
.tblock__arrow { font-size: 12px; color: #ffd9a8; vertical-align: middle; }
.timeline__note { text-align: center; color: #fff3df; font-size: 11px; margin-top: 14px; position: relative; z-index: 1; }

/* ---------- 奖项设置 ---------- */
.prize { display: flex; flex-direction: column; gap: 10px; }
.prize__main { display: flex; align-items: center; justify-content: space-between; background: var(--grad); color: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.prize__main-t { font-size: 16px; font-weight: 900; }
.prize__main-s { font-size: 12px; color: #fff3df; margin-top: 3px; }
.prize__badge { flex: none; background: #fff; color: var(--primary-deep); font-size: 12px; font-weight: 900; border-radius: 999px; padding: 5px 12px; }
.prize__row { display: flex; gap: 10px; }
.prize__card { flex: 1; background: #fff; border: 1px solid #f3d9b4; border-radius: 10px; padding: 10px 12px; }
.prize__card-t { font-size: 13px; font-weight: 700; color: var(--title); }
.prize__card-v { font-size: 12px; color: var(--primary-deep); margin-top: 2px; }
.prize__note { font-size: 11px; color: var(--text-sub); text-align: center; margin-top: 2px; }

/* ---------- 参赛须知 ---------- */
.rules { display: flex; flex-direction: column; gap: 14px; }
.rules__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rules__no { width: 22px; height: 22px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.rules__ht { font-size: 15px; font-weight: 900; color: var(--title); }
.rules__list { display: flex; flex-direction: column; gap: 7px; }
.rules__list li { font-size: 13px; color: var(--text); padding-left: 16px; position: relative; }
.rules__list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.rules__list b { color: var(--primary-deep); }

/* 参赛须知 · 社群咨询 + 二维码 */
.rules__contact { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px; background: #fff; border: 1px solid #f3d9b4; border-radius: 12px; }
.rules__contact-txt { flex: 1; min-width: 0; }
.rules__contact-t { font-size: 13px; font-weight: 700; color: var(--title); }
.rules__contact-s { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.rules__contact-s b { color: var(--primary-deep); font-weight: 700; }
.rules__qr { flex: none; width: 84px; height: 84px; object-fit: contain; border-radius: 8px; background: #fff; }
/* 占位二维码：图片到位前的虚线框样式 */
.rules__qr--placeholder { display: grid; place-items: center; border: 1.5px dashed #f0a868; background: repeating-linear-gradient(45deg, #fff 0 6px, #fdf3e3 6px 12px); }
.rules__qr--placeholder span { font-size: 11px; color: var(--primary-deep); text-align: center; line-height: 1.4; }

/* ---------- 活动作品墙 ---------- */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-card { background: #fff; border: 1px solid #f3d9b4; border-radius: 12px; overflow: hidden; }
.work-card__img { width: 100%; aspect-ratio: 3 / 4; background-size: cover; background-position: center top; background-color: #f3e4cc; position: relative; }
.work-card__top { position: absolute; left: 8px; top: 8px; background: var(--grad); color: #fff; font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(240,115,15,.4); }
.work-card__info { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; }
.work-card__artist { font-size: 13px; font-weight: 700; color: var(--text); }
.work-card__title { font-size: 11px; color: var(--text-sub); }
.work-card__likes { font-size: 12px; font-weight: 700; color: var(--primary-deep); white-space: nowrap; }
.works__empty { text-align: center; font-size: 13px; color: var(--text-sub); padding: 28px 10px; }

/* ---------- 法务 & 吸底栏 ---------- */
.legal { text-align: center; font-size: 11px; color: var(--text-sub); padding: 22px 24px 10px; }
.dock {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 60;
  background: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.dock__btn { display: block; text-align: center; color: #fff9ee; font-weight: 900; font-size: 15px; background: var(--grad); border-radius: 999px; padding: 13px 0; box-shadow: 0 4px 12px rgba(240, 115, 15, .35); }

@media (max-width: 380px) {
  .tblock__date { font-size: 17px; }
}
