* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1677ff;
  --blue-deep: #0b3b8c;
  --red: #f5222d;
  --field-bg: #eef4ff;
  --navy-1: #1b3b8f;
  --navy-2: #2f5fce;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #d7e3f5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding: 28px;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
}

/* 手机外壳：以 px 绝对坐标对齐 Figma */
.phone {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 14px 44px rgba(22, 119, 255, 0.22);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.phone.register {
  width: 396px;
  height: 747px;
  background-image: url("assets/page-register.png");
}

/* ===== 登记页：整页图叠加的透明交互热区 ===== */
.hotspot {
  position: absolute;
  cursor: pointer;
  background: transparent;
  border: none;
  display: block;
  text-decoration: none;
}
.ov-input {
  position: absolute;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: #1a1a2e;
  padding: 0 8px;
  border-radius: 6px;
}
.ov-input::placeholder { color: transparent; }
/* 聚焦或已填写时用白底覆盖底图占位文字（仅 input，select 单独处理） */
input.ov-input:focus,
input.ov-input:not(:placeholder-shown) { background: #ffffff; }
select.ov-input {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  /* 未选择前保持透明，露出底图的「请选择 ▼」占位 */
  background: transparent;
  color: transparent;
}
/* 选中后用白底黑字覆盖底图占位，显示「是/否」 */
select.ov-input.filled { background: #ffffff; color: #1a1a2e; }
.qr-overlay { position: absolute; object-fit: cover; border-radius: 6px; }

/* 证书页手机号透明输入框 */
.cert-ov-input {
  position: absolute;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: #1a1a2e;
  padding: 0 14px;
  z-index: 2;
}
.cert-ov-input::placeholder { color: transparent; }
.cert-ov-input:focus,
.cert-ov-input:not(:placeholder-shown) { background: #ffffff; border-radius: 10px; border: 1px solid #d6e4ff; }
.cert-ov-input:focus { border-color: var(--blue); }

/* 结果提示 */
.toast {
  position: fixed;
  left: 50%;
  top: 40px;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: rgba(22, 119, 255, 0.95); }
.toast.err { background: rgba(245, 34, 45, 0.95); }
.phone.cert {
  width: 402px;
  height: 747px;
  background-image: url("assets/page-cert.png");
}

/* 绝对定位基类 */
.abs { position: absolute; }

.card {
  position: absolute;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.10);
}

/* ----- 文本 ----- */
.t { position: absolute; line-height: 1.4; color: #1a1a2e; }
.title {
  font-size: 23px;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.intro { font-size: 7.5px; line-height: 1.55; color: #6b7280; }

/* ----- 顶部按钮 ----- */
.btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  gap: 4px;
}
.btn-report { background: #e8f1ff; color: var(--blue); border: 1px solid #b9d3ff; }
.btn-share { background: var(--blue); color: #fff; }
.btn-submit { background: var(--blue); color: #fff; font-size: 13px; font-weight: 500; }
.btn-query { background: #fff; color: var(--blue); border: 1px solid var(--blue); font-size: 13px; }
.btn:hover { filter: brightness(0.97); }

/* ----- 奖励标签 ----- */
.badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-1), var(--navy-2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 5px 5px 10px 5px;
}

/* ----- 奖励一 列表 ----- */
.reward-num {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.reward-text { position: absolute; font-size: 7px; line-height: 1.4; color: #3a4256; }
.reward-text .hl { color: var(--red); font-weight: 700; }
.note {
  position: absolute;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  border-radius: 4px;
  color: #b8860b;
  font-size: 6px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

/* ----- 登记表 ----- */
.sec-head {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
}
.field {
  position: absolute;
  background: var(--field-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  font-size: 11px;
}
.field .ic { width: 14px; height: 14px; flex: 0 0 14px; color: var(--blue); }
.field .lbl { color: #1a1a2e; white-space: nowrap; }
.field .ph { color: #9aa3b2; }
.field .arrow { position: absolute; right: 8px; color: #9aa3b2; font-size: 8px; }
.asset-note { position: absolute; font-size: 6px; color: #ff7a2f; line-height: 1.3; }

/* ----- 二维码 ----- */
.qr-box {
  position: absolute;
  background: #f0f0f0;
  border: 1px dashed #c8c8c8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3b3b3;
  font-size: 9px;
}
.qr-title { position: absolute; font-size: 9px; font-weight: 600; color: var(--blue-deep); white-space: nowrap; }
.qr-cap { position: absolute; font-size: 9px; color: #5a6275; white-space: nowrap; }

/* ----- 奖励二/三 行 ----- */
.brow {
  position: absolute;
  background: var(--field-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
}
.brow .ic { width: 16px; height: 16px; flex: 0 0 16px; }
.brow .txt { font-size: 11px; color: #1a1a2e; }
.brow .txt .hl { color: var(--red); font-weight: 700; }
.redpack { position: absolute; width: 15px; height: 15px; }

.tline { position: absolute; font-size: 11px; color: #1a1a2e; display: flex; align-items: center; gap: 6px; }
.tline .ic { width: 14px; height: 14px; flex: 0 0 14px; }
.tline .hl { color: var(--red); font-weight: 700; }

/* ----- 温馨提示 ----- */
.tip {
  position: absolute;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
}
.tip-title { position: absolute; font-size: 12px; font-weight: 700; color: #d48806; display: flex; align-items: center; gap: 4px; }
.tip-body { position: absolute; font-size: 7px; line-height: 1.55; color: #9c7400; }

/* ============ 证书页 ============ */
.cert-banner {
  position: absolute;
  left: 0; top: 0;
  width: 402px;
  height: 190px;
}
.cert-img { position: absolute; }
.cert-input {
  position: absolute;
  border: 1px solid #d6e4ff;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  color: #5a6275;
  outline: none;
  background: #fff;
}
.cert-input::placeholder { color: #9aa3b2; }
.cert-input:focus { border-color: var(--blue); }
.cert-save {
  position: absolute;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-save:hover { background: #0b59d6; }
.cert-sec {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
}

/* ===== 手机端自适应：整页等比缩放铺满屏宽（fit.js 负责计算 scale） ===== */
@media (max-width: 640px) {
  body {
    padding: 0;
    gap: 0;
    background: #eaf2ff;
    display: block;
    overflow-x: hidden;
  }
  .phone {
    box-shadow: none;
    transform-origin: top left;
  }
}
