/* ===== 拍照积分 H5 —— 仿小程序红色主题 ===== */
:root {
  --primary: #e6454f;
  --primary-dark: #d33a44;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #222;
  --text-2: #999;
  --hl: #e6454f;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0,0,0,.06);
}

/* 页面切换 */
.page { display: none; min-height: 100vh; padding-bottom: 40px; }
.page.active { display: block; }

/* 导航栏 */
.navbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  height: 48px; background: var(--card);
  border-bottom: 1px solid #eee;
}
.nav-title { font-size: 17px; font-weight: 600; }
.nav-back {
  position: absolute; left: 6px; top: 0;
  width: 40px; height: 48px;
  background: none; border: none; color: #333;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.content { padding: 14px; }

/* 上传卡片 */
.upload-card {
  background: var(--card); border-radius: var(--radius);
  padding: 10px; margin-bottom: 12px;
}
.upload-trigger {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 10px 20px; cursor: pointer;
  border-radius: 8px;
}
.upload-trigger:active { background: #fafafa; }
.cam-icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fdf2f3; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.cam-icon.small { width: 68px; height: 68px; }
.upload-hint { font-size: 15px; color: #666; margin-bottom: 6px; }
.upload-sub { font-size: 12px; color: var(--text-2); text-align: center; }

/* 缩略图列表 */
.thumb-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 4px; }
.thumb { position: relative; width: 84px; height: 84px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.thumb .del {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff;
  border: none; font-size: 13px; line-height: 22px; text-align: center;
  cursor: pointer;
}
.upload-progress { padding: 4px 6px 0; font-size: 12px; color: var(--text-2); text-align: right; }

/* 按钮 */
.btn-primary {
  display: block; width: 100%; height: 48px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 24px;
  font-size: 17px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer; margin-bottom: 16px;
}
.btn-primary:disabled { background: #f0a9ad; cursor: not-allowed; }
.btn-ghost {
  display: block; width: 100%; height: 44px;
  background: none; border: none;
  color: #444; font-size: 15px;
  text-decoration: underline; text-underline-offset: 6px;
  cursor: pointer; margin-bottom: 30px;
}

/* 积分规则 */
.rules-title {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: 16px; font-weight: 600; margin-bottom: 16px;
}
.rules-title span { width: 60px; height: 1px; background: #ddd; }
.rules-list { list-style: none; }
.rules-list li {
  font-size: 14px; line-height: 1.75; color: #444;
  margin-bottom: 12px; padding-left: 0;
}
.rules-list li::before { content: ""; }
.hl { color: var(--hl); }
.rules-list b.hl { font-weight: 600; }

/* ===== 弹窗 ===== */
/* display:flex 会覆盖 hidden 属性，必须显式恢复 display:none */
.mask[hidden] { display: none !important; }
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.dialog {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 340px;
  padding: 22px 20px 20px;
  text-align: center;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.dialog-tip { font-size: 13px; color: #666; margin: 14px 0 16px; }

/* 小票示例纸张 */
.receipt-demo { position: relative; padding: 18px; }
.receipt-corner { position: absolute; width: 18px; height: 18px; border: 2px solid #ccc; }
.receipt-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.receipt-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.receipt-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.receipt-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }
.receipt-paper {
  background: #fff; border: 1px dashed #e5e5e5;
  padding: 12px 10px; font-size: 11px; color: #333;
}
.rp-center { text-align: center; margin-bottom: 6px; font-size: 12px; }
.rp-line { margin-bottom: 3px; }
.rp-split { color: #bbb; margin: 5px 0; overflow: hidden; white-space: nowrap; }
.rp-row { display: flex; justify-content: space-between; margin-bottom: 3px; }

/* ===== 积分记录 ===== */
.points-summary {
  display: flex; background: linear-gradient(135deg, var(--primary), #f07078);
  border-radius: var(--radius); color: #fff;
  padding: 20px 0; margin-bottom: 14px;
}
.summary-item { flex: 1; text-align: center; }
.summary-item b { display: block; font-size: 24px; margin-bottom: 4px; }
.summary-item span { font-size: 12px; opacity: .9; }

.record-item {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.record-main { display: flex; align-items: center; }
.record-reject {
  margin-top: 10px; padding: 8px 10px;
  background: #fdf2f3; border-radius: 8px;
  font-size: 12px; color: #d33a44; line-height: 1.6;
  word-break: break-all;
}
.record-info { flex: 1; min-width: 0; }
.record-shop { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.record-meta { font-size: 12px; color: var(--text-2); }
.record-right { text-align: right; margin-left: 12px; }
.record-points { font-size: 16px; font-weight: 600; }
.record-points.plus { color: var(--primary); }
.record-status { font-size: 12px; margin-top: 4px; }
.st-pending { color: #e6a23c; }
.st-approved { color: #52a56a; }
.st-rejected { color: var(--primary); }
.empty { text-align: center; padding: 70px 0 30px; color: #555; font-size: 15px; }
.empty-sub { font-size: 12px; color: var(--text-2); margin-top: 8px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 200; max-width: 80%;
  text-align: center; animation: pop .2s ease-out;
}
