:root {
  --accent: #e26a8d;
  --accent-soft: #f4a9bd;
  --deep: #2a1020;
  --ok: #0f9d8f;
  --ink: #241a20;
  --muted: #8d7d85;
  --line: #f0e6ea;
  --surface: #ffffff;
  --canvas: #f7f4f5;
  --radius: 8px;
  --shadow: 0 6px 20px rgba(74, 26, 45, .08);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100vh; }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 88px;
}

/* ---------------- 顶部 ---------------- */

.hero {
  background: linear-gradient(160deg, #ffffff 0%, #fdf4f7 55%, #fbe9ef 100%);
  border-bottom: 1px solid var(--line);
  padding: 22px 16px 20px;
}

.hero-inner { text-align: center; }

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-spark { color: var(--accent); font-size: 18px; }

.hero h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
  font-weight: 700;
}

.hero-slogan {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: #6d5a63;
}

.hero-proof b { color: var(--accent); font-size: 15px; }

/* ---------------- 通道 ---------------- */

.main { padding: 0 16px; }

.channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: -8px;
}

.channel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-card.is-vip { border-color: #f2d6a8; background: linear-gradient(180deg, #fffdf6, #fff); }

.channel-card h2 { margin: 0; font-size: 17px; }
.channel-card p { margin: 0; color: var(--muted); font-size: 13px; }

.channel-card .channel-btn {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.channel-card.is-vip .channel-btn { background: #d29a3a; }
.channel-card .channel-btn:active { opacity: .86; }

/* ---------------- 区块 ---------------- */

.block { margin-top: 22px; }

/* 快捷入口 */
.quick-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-top: 16px;
}

.quick-head { margin-bottom: 10px; }

.quick-head h2 {
  margin: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-head h2::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fdf7f9;
  color: #6d5a63;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}

.quick-link:hover { border-color: var(--accent-soft); color: #a4506f; }

.quick-more {
  margin-left: auto;
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 2px;
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.block-head h2 { margin: 0; font-size: 16px; }
.block-hint { color: var(--muted); font-size: 12px; }

.hot-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.hot-scroll::-webkit-scrollbar { display: none; }

.hot-card {
  flex: 0 0 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.hot-card .hot-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  overflow: hidden;
  margin-bottom: 8px;
}

.hot-thumb img, .item-icon img { width: 100%; height: 100%; object-fit: cover; }

.hot-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  height: 36px;
  overflow: hidden;
}

.hot-card small { color: var(--muted); font-size: 11px; }

/* ---------------- 搜索与分类 ---------------- */

.toolbar { margin-bottom: 10px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  box-shadow: var(--shadow);
}

.search-box input {
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 14px;
  background: transparent;
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: #6d5a63;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------------- 资源列表 ---------------- */

.item-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.item-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

.item-main { flex: 1; min-width: 0; }

.item-main strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

.tag {
  font-size: 11px;
  color: #b0668a;
  background: #fdeef3;
  border-radius: 4px;
  padding: 1px 6px;
}

.item-meta {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.item-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.item-star { color: #f0a03c; }

.item-action { flex: 0 0 auto; }

.btn-get {
  border: 0;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
}

.btn-get:active { opacity: .85; }

.empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }

/* ---------------- FAQ / 页脚 ---------------- */

.faq-block .faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.faq-item summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.faq-item p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.footer {
  margin-top: 26px;
  padding: 18px 16px 26px;
  text-align: center;
  color: #a99aa2;
  font-size: 11px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
}

/* ---------------- 弹层 ---------------- */

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(30, 12, 22, .48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
  padding: 0;
}

.sheet[hidden] { display: none; }

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 22px 18px 20px;
  animation: rise .22s ease-out;
}

@keyframes rise { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }

@media (min-width: 720px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: var(--radius); max-height: 84vh; }
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.sheet-panel h2 { margin: 0 0 10px; font-size: 17px; }

.sheet-actions { margin-top: 16px; }

.btn-primary {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}

.btn-primary:active { opacity: .88; }

.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  width: 100%;
  border: 1px dashed var(--accent-soft);
  background: #fff8fb;
  color: #b0668a;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13px;
  cursor: pointer;
}

.btn-small { width: auto; padding: 10px 16px; font-size: 13px; }

.input {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  outline: 0;
  color: var(--ink);
}

.input:focus { border-color: var(--accent-soft); }

/* 详情 */

.detail-head { display: flex; gap: 12px; align-items: center; padding-right: 26px; }

.detail-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
}

.detail-head h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.4; }
.detail-meta { margin: 0; color: var(--muted); font-size: 12px; }

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.detail-gallery img { width: 100%; border-radius: var(--radius); display: block; }

.detail-body {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #4b3a42;
}

.detail-body img { max-width: 100%; border-radius: var(--radius); }

/* 领取 */

.claim-desc { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.claim-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #55424b;
  font-size: 13px;
  line-height: 1.9;
}

.claim-reward-img { width: 100%; border-radius: var(--radius); margin-bottom: 10px; }

.upload-box { margin-top: 4px; }

.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  border: 0;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 1;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.claim-tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

.notice-panel { text-align: center; }
.notice-panel h2 { color: var(--accent); }
.notice-body { text-align: left; font-size: 13px; line-height: 1.8; color: #55424b; }
.notice-body p { margin: 0 0 10px; }

.claim-result { text-align: center; font-size: 14px; line-height: 1.8; }
.claim-result a {
  display: inline-block;
  margin-top: 10px;
  word-break: break-all;
  color: var(--ok);
  font-size: 13px;
}

/* 客服 */

.fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  padding: 11px 16px;
  box-shadow: 0 8px 22px rgba(226, 106, 141, .35);
  cursor: pointer;
}

.chat-panel { display: flex; flex-direction: column; height: 70vh; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.chat-msg.user { align-self: flex-end; background: var(--accent); color: #fff; }
.chat-msg.admin { align-self: flex-start; background: #fff; border: 1px solid var(--line); }

.chat-input { display: flex; gap: 8px; align-items: center; }
.chat-input .input { margin-top: 10px; }
.chat-input .btn-small { margin-top: 10px; flex: 0 0 auto; }

/* 轻提示 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: rgba(36, 22, 29, .92);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 90;
  max-width: 86vw;
  text-align: center;
}

.toast[hidden] { display: none; }
