* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: #F2F2F7;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body { display: flex; justify-content: center; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  background: #FFFFFF;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* ---------- 顶部信息 ---------- */
.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 0.5px solid #E5E5EA;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #8E8E93;
  background: none;
  border: 0;
  padding: 0;
}
.chip b { color: #000; font-size: 15px; font-weight: 600; }
.chip.mint b { color: #000; }
.chip.accent { color: #007AFF; }
.spacer { flex: 1; }

/* ---------- 视图 ---------- */
#main { position: absolute; inset: 0 0 50px 0; }
.view { position: absolute; inset: 0; display: none; background: #fff; }
.view.active { display: block; }

/* ---------- 卡池 ---------- */
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.user { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }

.pages { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.track { position: absolute; inset: 0; will-change: transform; }
.page {
  position: absolute; top: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: 76px 20px 92px;
  overflow: hidden;
  background: #fff;
}
.page.cur { left: 0; }
.page.prev { left: -100%; }
.page.next { left: 100%; }

.phead { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 500; color: #000;
  background: #E5E5EA !important;
  flex: 0 0 auto;
}
.pinfo { flex: 1; min-width: 0; }
.pname { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.pmeta { font-size: 13px; color: #8E8E93; margin-top: 1px; }
.ptags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.tag {
  font-size: 11px; color: #8E8E93; padding: 1px 7px; border-radius: 6px;
  background: #F2F2F7;
}

.varblock { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.varcount { font-size: 12px; color: #8E8E93; letter-spacing: 0; }
.varname { font-size: 34px; font-weight: 700; line-height: 1.15; margin-top: 4px; letter-spacing: -0.8px; }
.varhint { font-size: 13px; color: #8E8E93; margin-top: 4px; }
.varvalue { font-size: 34px; font-weight: 600; line-height: 1; margin: 16px 0 4px; color: #C7C7CC; }
.varvalue.on { color: #000; }

.vartip { font-size: 11px; color: #C7C7CC; margin-top: 10px; }

.pfoot { margin-top: 12px; }
.pdots { display: flex; justify-content: center; gap: 5px; }
.pdot { width: 5px; height: 5px; border-radius: 999px; background: #D1D1D6; }
.pdot.on { width: 14px; background: #000; }
.phint { text-align: center; font-size: 11px; color: #C7C7CC; margin-top: 8px; }

/* ---------- 主按钮 ---------- */
.cta {
  position: absolute;
  left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom));
  height: 50px; border-radius: 12px;
  background: #007AFF; color: #fff;
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  z-index: 30; cursor: pointer;
}

/* ---------- 底部栏 ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 50px;
  display: flex;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 0.5px solid #E5E5EA;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 40;
}
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #8E8E93; cursor: pointer;
}
.tab.active { color: #007AFF; }
.tab i { display: none; }

/* ---------- 内容页 ---------- */
.scroller { height: 100%; overflow-y: auto; padding: 24px 20px 40px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }

.card {
  background: none;
  border: 0;
  border-bottom: 0.5px solid #E5E5EA;
  border-radius: 0;
  padding: 16px 0;
  margin: 0;
}
.card:last-child { border-bottom: 0; }
.label { font-size: 13px; color: #8E8E93; letter-spacing: 0; }
.tiny { font-size: 13px; color: #8E8E93; line-height: 1.5; }
.big { font-size: 48px; font-weight: 700; line-height: 1.05; letter-spacing: -1.5px; }
.mono { font-variant-numeric: tabular-nums; }

.btn {
  height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 500; cursor: pointer;
}
.btn.primary { background: #007AFF; color: #fff; }
.btn.ghost { background: #F2F2F7; color: #007AFF; }
.btn[disabled] { opacity: 0.35; pointer-events: none; }

.head-title { font-size: 30px; font-weight: 700; letter-spacing: -0.8px; }
.head-sub { font-size: 13px; color: #8E8E93; margin-top: 2px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bar { height: 3px; border-radius: 2px; background: #E5E5EA; overflow: hidden; margin: 8px 0; }
.bar > i { display: block; height: 100%; background: #000; }

/* ---------- 报告 ---------- */
.score-hero { background: none; border-color: #E5E5EA; }
.self-line { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.self-line b { color: #000; font-size: 17px; font-weight: 600; }
.gap { font-size: 13px; color: #8E8E93; }
.dim-row { padding: 12px 0; border-bottom: 0.5px solid #E5E5EA; }
.dim-row:last-child { border-bottom: 0; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; }
.dim-name { font-size: 15px; color: #000; }
.dim-score { font-size: 17px; font-weight: 600; color: #000; }
.dim-foot { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: #8E8E93; }
.up { color: #000; }
.down { color: #8E8E93; }

/* ---------- 行情 ---------- */
.hot-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.hot-name { width: 72px; font-size: 15px; color: #000; }
.hot-bar { flex: 1; height: 3px; border-radius: 2px; background: #E5E5EA; overflow: hidden; }
.hot-bar > i { display: block; height: 100%; background: #000; }
.hot-avg { width: 34px; text-align: right; font-size: 13px; color: #000; }
.hot-uses { width: 44px; text-align: right; font-size: 11px; color: #C7C7CC; }

/* ---------- 我的 ---------- */
.dim-edit { padding: 14px 0; border-bottom: 0.5px solid #E5E5EA; }
.dim-edit:last-child { border-bottom: 0; }
.dim-line { display: flex; gap: 8px; align-items: center; }
input[type="text"] {
  flex: 1; min-width: 0;
  background: #F2F2F7;
  border: 0; border-radius: 10px; padding: 10px 12px;
  color: #000; font-size: 15px; outline: none;
}
input[type="text"]::placeholder { color: #C7C7CC; }
.icon-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #C7C7CC; font-size: 20px; cursor: pointer; }
.publish-card { background: none; border-color: #E5E5EA; }
.dot-status { width: 8px; height: 8px; border-radius: 50%; background: #D1D1D6; }
.dot-status.on { background: #34C759; }

/* ---------- 媒体 ---------- */
.evidence { margin: 10px 0 0; }
.evidence + .evidence { margin-top: 8px; }
.evidence.photo { position: relative; display: flex; justify-content: center; }
.evidence.photo img {
  max-width: 100%; max-height: 24vh; border-radius: 10px; object-fit: cover;
  display: block; background: #F2F2F7;
}
.evidence.photo video {
  max-width: 100%; max-height: 28vh; border-radius: 10px; background: #000;
  display: block;
}
.evidence.text {
  font-size: 14px; line-height: 1.6; color: #3C3C43;
  padding: 0 0 0 12px; border-left: 2px solid #E5E5EA;
  max-height: 22vh; overflow: auto;
}
.ph-tag {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 10px; color: #8E8E93; background: rgba(255,255,255,0.9);
  padding: 1px 6px; border-radius: 4px;
}
.proof-tag {
  position: absolute; left: 6px; top: 6px;
  font-size: 10px; color: #000; background: rgba(255,255,255,0.92);
  padding: 1px 6px; border-radius: 4px;
}
.proof-mini { margin-left: 6px; font-size: 10px; color: #8E8E93; }
.proof-hint { margin-top: 6px; font-size: 11px; color: #8E8E93; }
.mnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08);
}
.mnav.prev { left: 6px; }
.mnav.next { right: 6px; }
.imgdots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.imgdot { width: 4px; height: 4px; border-radius: 999px; background: rgba(0,0,0,0.25); }
.imgdot.on { width: 12px; background: #000; }
.media-missing {
  padding: 40px 20px; font-size: 13px; color: #8E8E93;
  border: 1px dashed #D1D1D6; border-radius: 10px;
}

.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb {
  position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  background: #F2F2F7;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb.add { color: #C7C7CC; font-size: 22px; }
.thumb.add input { display: none; }
.thumb-v {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 13px; text-shadow: 0 0 4px rgba(0,0,0,0.6);
}
.thumb-x {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; font-style: normal; display: flex; align-items: center; justify-content: center;
}
textarea {
  width: 100%; min-height: 64px; margin-top: 10px;
  background: #F2F2F7; border: 0; border-radius: 10px;
  padding: 10px 12px; color: #000;
  font-size: 14px; line-height: 1.5; resize: vertical; outline: none;
  font-family: inherit; box-sizing: border-box;
}
textarea::placeholder { color: #C7C7CC; }

/* ---------- 遮罩 / 弹层 ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px;
}
.ov-card {
  width: 100%; background: #fff; border-radius: 14px;
  padding: 28px 20px 20px; text-align: center;
}
.ov-label { font-size: 12px; color: #8E8E93; }
.ov-main { font-size: 48px; font-weight: 700; color: #000; line-height: 1.1; margin: 4px 0 2px; letter-spacing: -1px; }
.ov-chips { display: flex; justify-content: center; gap: 8px; margin: 14px 0 16px; }
.ov-chip { font-size: 13px; color: #000; background: #F2F2F7; border-radius: 6px; padding: 3px 10px; }
.ov-goal { color: #8E8E93; font-size: 12px; margin: 0 0 14px; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 70;
  background: #fff; border-radius: 14px 14px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 #E5E5EA;
}
.sheet-title { font-size: 17px; font-weight: 600; }
.sheet-sub { font-size: 13px; color: #8E8E93; margin-top: 2px; }
.group { margin-top: 18px; }
.group-k { font-size: 13px; color: #8E8E93; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  padding: 6px 14px; border-radius: 8px; font-size: 14px; color: #000;
  background: #F2F2F7; cursor: pointer;
}
.opt.on { background: #007AFF; color: #fff; }

.toast {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: #1C1C1E; color: #fff;
  font-size: 13px; padding: 8px 14px; border-radius: 8px; z-index: 90;
  white-space: nowrap;
}

/* ---------- 拦截页 ---------- */
.gate { padding: 120px 20px 40px; }
.gate-badge { display: inline-block; font-size: 13px; color: #8E8E93; }
.gate-title { font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: -0.6px; }
.gate-desc { font-size: 15px; color: #3C3C43; line-height: 1.6; margin-top: 10px; }
.gate-list { margin: 24px 0 28px; font-size: 14px; color: #8E8E93; line-height: 2; }

@media (min-width: 520px) {
  body { padding: 12px 0; }
  #app { height: calc(100dvh - 24px); border-radius: 12px; }
}

/* ---------- 分段滑块 ---------- */
.slider {
  position: relative;
  padding: 22px 0 10px;
  touch-action: none;
  cursor: pointer;
}
.s-track {
  position: relative;
  height: 2px;
  margin: 0 11px;
  background: #E5E5EA;
  border-radius: 2px;
}
.s-ticks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.s-tick {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 10px;
  background: #D1D1D6;
  transform: translateX(-0.5px);
  transition: background 120ms ease;
}
.s-tick.on { background: #007AFF; }
.s-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: #007AFF;
  border-radius: 2px;
}
.s-thumb {
  position: absolute;
  top: 50%;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.16);
  transform: translate(-50%, -50%);
  transition: left 90ms linear, transform 120ms ease;
}
.slider.dragging .s-thumb { transform: translate(-50%, -50%) scale(1.18); }
.slider.small { padding: 12px 0 4px; }
.slider.small .s-thumb { width: 16px; height: 16px; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.14); }
.slider.small .s-tick { top: -3px; height: 8px; }
.self-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.self-label { font-size: 12px; color: #8E8E93; }
.self-value { font-size: 14px; font-weight: 600; color: #000; }