:root {
  --primary-color: #1677ff;
  --primary-light: #ebf2ff;
  --tabbar-active-color: #ff6b35;
  --orange: #ff6b35;
  --red: #ff4d4f;
  --green: #52c41a;
  --green-bg: #f6ffed;
  --yellow: #faad14;
  --yellow-bg: #fffbe6;
  --text1: #1a1a2e;
  --text2: #5b6475;
  --text3: #8c95a6;
  --text4: #c4c9d4;
  --bg: #f2f5fa;
  --card: #ffffff;
  --border: #eaecf0;
  --shadow: 0 2px 12px rgba(22, 119, 255, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: #e6ebf5;
  color: var(--text1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}

.app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.boot-loading {
  margin: auto;
  color: var(--text2);
  font-size: 14px;
}

/* 顶部栏（任务大厅三栏与通用内页导航） */
.hall-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, #e8f1ff 0%, var(--bg) 100%);
  position: sticky;
  top: 0;
  z-index: 30;
}

.city-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(22, 119, 255, 0.12);
  box-shadow: 0 3px 9px rgba(22, 119, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--text1);
  cursor: pointer;
}

.city-pin {
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 50% 0;
  background: var(--primary-color);
  transform: rotate(-45deg);
  position: relative;
  flex-shrink: 0;
}

.city-pin::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 4px;
  top: 4px;
}

.hall-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text1);
  letter-spacing: 0.3px;
}

.proto-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(22, 119, 255, 0.14);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text1);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  min-width: 56px;
}

.sub-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text1);
  text-align: center;
  flex: 1;
}

.sub-header-right {
  min-width: 56px;
  text-align: right;
  font-size: 13px;
  color: var(--primary-color);
  cursor: pointer;
}

/* 演示模式顶部轻提示条 */
.demo-mode-strip {
  margin: 0 14px 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #ad6800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* 接单场景卡片 */
.scene-card {
  margin: 4px 14px 10px;
  padding: 12px 14px 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.section-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 12px;
}

.section-bar {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--primary-color);
}

.scene-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 4px 4px;
}

.scene-item {
  position: relative;
  min-width: 82px;
  height: 90px;
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  opacity: 0.82;
}

.scene-item.active {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  outline: 2px solid rgba(22, 119, 255, 0.35);
}

.scene-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.scene-name {
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.scene-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  background: linear-gradient(135deg, #ff4d4f, #ff7875);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(255, 77, 79, 0.35);
}

/* 常驻地址行 */
.location-row {
  margin: 0 14px 10px;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text2);
}

.location-text {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
}

.location-action {
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* 任务列表与卡片 */
.page-body {
  flex: 1;
  padding-bottom: 76px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 16px;
}

.task-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1px solid rgba(22, 119, 255, 0.06);
}

.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.task-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.35;
}

.task-price {
  color: var(--orange);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.task-price small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
}

.tag.pkg {
  background: #fff7e6;
  color: #d46b08;
}

.tag.done {
  background: var(--green-bg);
  color: var(--green);
}

.task-addr-box {
  background: #f8fafd;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.addr-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.addr-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.addr-dot.pick {
  background: var(--primary-color);
}

.addr-dot.drop {
  background: var(--orange);
}

.task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text3);
}

.btn-primary-sm {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline-sm {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* 原站风格空状态信箱 */
.empty-box {
  padding: 54px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.empty-title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #8c95a6;
}

.empty-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #b4bcc8;
}

/* 底部四栏导航（复刻原站 Colorful14 TabBar） */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(26, 20, 16, 0.06);
  display: flex;
  align-items: center;
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #c4c9d4;
  cursor: pointer;
  user-select: none;
}

.tab-item.active {
  color: var(--tabbar-active-color);
}

.tab-icon {
  width: 21px;
  height: 21px;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
}

/* 登录弹窗与通用模态框（复刻原站 renderLoginModal） */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 200;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 18px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text1);
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f3f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text2);
  cursor: pointer;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border-radius: 11px;
  background: #f5f7fb;
  border: 1px solid transparent;
  margin-bottom: 12px;
}

.input-box:focus-within {
  border-color: var(--primary-color);
  background: #ffffff;
}

.input-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text1);
  min-width: 0;
}

.code-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  cursor: pointer;
  white-space: nowrap;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.code-btn.disabled {
  color: var(--text3);
  cursor: not-allowed;
}

.demo-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.quick-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #edf4ff;
  color: var(--primary-color);
  cursor: pointer;
  border: 1px dashed rgba(22, 119, 255, 0.35);
}

.sms-demo-banner {
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #237804;
  font-size: 12px;
  cursor: pointer;
}

.btn-block {
  width: 100%;
  height: 45px;
  border: none;
  border-radius: 11px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-block:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-block.secondary {
  background: #ffffff;
  color: var(--text1);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.agreement-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 13px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.45;
}

.checkbox-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.checkbox-box.checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.link-text {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
}

/* 个人中心（我的）Colorful14 复刻 */
.mine-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3b8eff 100%);
  color: #ffffff;
  padding: 22px 16px 34px;
  border-radius: 0 0 22px 22px;
}

.mine-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mine-user-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mine-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}

.mine-name {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
}

.badge-verify {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.badge-verify.ok {
  background: rgba(82, 196, 26, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.badge-verify.no {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.mine-phone {
  font-size: 12.5px;
  opacity: 0.9;
  margin-top: 3px;
}

.mine-wallet-card {
  margin: -20px 14px 12px;
  background: #ffffff;
  border-radius: 15px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 5;
}

.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wallet-title {
  font-size: 15px;
  font-weight: 800;
}

.wallet-safe {
  font-size: 11.5px;
  color: #389e0d;
  background: #f6ffed;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.wallet-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-panel {
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.wallet-panel.primary {
  background: linear-gradient(135deg, #eef5ff 0%, #dbeafe 100%);
}

.wallet-panel.secondary {
  background: #f8fafd;
  border: 1px solid var(--border);
}

.wallet-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}

.wallet-amt {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
}

.wallet-amt.dark {
  color: var(--text1);
}

.section-card {
  margin: 0 14px 12px;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.section-hd {
  font-size: 14px;
  font-weight: 800;
  color: var(--text1);
  margin-bottom: 12px;
}

.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
}

.stat-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--text1);
}

.stat-lbl {
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px;
}

.menu-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 6px;
  text-align: center;
}

.menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f2f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.menu-lbl {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}

/* 通用表单、协议段落、切换栏与手写签字板 */
.tabs-strip {
  display: flex;
  background: #ffffff;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab-pill {
  flex: 1;
  text-align: center;
  padding: 11px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}

.tab-pill.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 800;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
}

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
}

.chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
}

.form-group {
  margin-bottom: 13px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-control,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafc;
  font-size: 14px;
  color: var(--text1);
  outline: none;
}

.form-control:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-color);
  background: #ffffff;
}

.protocol-container {
  padding: 16px;
  background: #ffffff;
  min-height: calc(100dvh - 48px);
}

.proto-sec-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text1);
  margin: 14px 0 6px;
}

.proto-sec-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: 8px;
}

.sig-canvas-wrap {
  border: 1.5px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  text-align: center;
}

.sig-canvas {
  width: 100%;
  height: 150px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.detail-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--border);
  z-index: 85;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f2f4f8;
  font-size: 13px;
  gap: 12px;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-label {
  color: var(--text3);
  flex-shrink: 0;
}

.kv-val {
  color: var(--text1);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.icp-footer {
  text-align: center;
  padding: 16px 12px 24px;
  font-size: 11.5px;
  color: var(--text3);
}

/* Toast 轻提示 */
.toast-root {
  position: fixed;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  pointer-events: none;
}

.toast-msg {
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* ================= 动态人脸活体检测与炫彩防翻拍界面 ================= */
.liveness-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 28px;
  transition: background-color 0.25s ease;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6ff 100%);
}

.liveness-page.flash-blue {
  background: radial-gradient(circle at 50% 38%, rgba(22, 119, 255, 0.34), #dcebff 75%);
}

.liveness-page.flash-green {
  background: radial-gradient(circle at 50% 38%, rgba(82, 196, 26, 0.34), #e4f9da 75%);
}

.liveness-page.flash-amber {
  background: radial-gradient(circle at 50% 38%, rgba(255, 107, 53, 0.32), #ffe8dc 75%);
}

.liveness-steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}

.liveness-step-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf2fa;
  color: var(--text3);
  transition: all 0.2s ease;
}

.liveness-step-pill.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(22, 119, 255, 0.28);
}

.liveness-step-pill.done {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #b7eb8f;
}

.liveness-prompt-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text1);
  text-align: center;
  min-height: 28px;
  margin-bottom: 4px;
}

.liveness-prompt-sub {
  font-size: 12.5px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 16px;
}

.liveness-ring-box {
  position: relative;
  width: 248px;
  height: 248px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 14px;
}

.liveness-ring-svg {
  position: absolute;
  inset: 0;
  width: 248px;
  height: 248px;
  transform: rotate(-90deg);
  z-index: 6;
  pointer-events: none;
}

.liveness-viewport {
  width: 218px;
  height: 218px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #0f172a;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45), 0 8px 26px rgba(22, 119, 255, 0.18);
}

.liveness-video,
.liveness-sim-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.liveness-video {
  transform: scaleX(-1);
}

.liveness-scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #38bdf8 50%, transparent 100%);
  box-shadow: 0 0 10px #38bdf8;
  animation: livenessScanMove 2.1s ease-in-out infinite;
  z-index: 4;
  pointer-events: none;
}

@keyframes livenessScanMove {
  0% {
    top: 16%;
    opacity: 0.35;
  }
  50% {
    top: 82%;
    opacity: 0.95;
  }
  100% {
    top: 16%;
    opacity: 0.35;
  }
}

.liveness-face-guide {
  position: absolute;
  inset: 18px 34px 22px;
  border: 1.5px dashed rgba(255, 255, 255, 0.58);
  border-radius: 48% 48% 44% 44%;
  z-index: 3;
  pointer-events: none;
}

.liveness-telemetry-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  background: #ebf3ff;
  border: 1px solid rgba(22, 119, 255, 0.18);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.liveness-tips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 8px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  text-align: center;
}

.liveness-tip-icon {
  font-size: 20px;
  margin-bottom: 3px;
}

.liveness-tip-txt {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
}

.liveness-demo-dock {
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  border: 1px dashed rgba(22, 119, 255, 0.3);
}

.liveness-dock-hd {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.liveness-dock-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.snapshot-preview-box {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 3px solid var(--green);
  box-shadow: 0 6px 18px rgba(82, 196, 26, 0.22);
}

.snapshot-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.snapshot-watermark {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(15, 23, 42, 0.68);
  color: #ffffff;
  font-size: 9.5px;
  padding: 3px 4px;
  text-align: center;
}

/* ================= 身份证正反面拍照上传与原站四宫格注意事项 ================= */
.idcard-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.idcard-slot {
  position: relative;
  height: 126px;
  border-radius: 12px;
  border: 1.5px dashed #93c5fd;
  background: #f4f8ff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
}

.idcard-slot.uploaded {
  border-style: solid;
  border-color: var(--green);
  background: #f8fafc;
}

.idcard-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.idcard-slot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.idcard-del-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
}

.idcard-examples-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
  text-align: center;
}

.idcard-ex-box {
  background: #f8fafd;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 4px;
}

.idcard-ex-card {
  height: 36px;
  border-radius: 4px;
  background: #dbeafe;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #1e40af;
  position: relative;
  overflow: hidden;
}

.idcard-ex-lbl {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
}

/* ================= 全流程仿真增强：手机短信横幅、多步核验动画与演示导览悬浮台 ================= */
.sim-sms-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 452px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  z-index: 460;
  cursor: pointer;
  animation: smsSlideDown 0.28s ease-out;
}

@keyframes smsSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -18px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.sim-sms-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.sim-sms-body {
  font-size: 13px;
  line-height: 1.45;
  color: #f8fafc;
}

.sim-sms-code {
  color: #38bdf8;
  font-weight: 800;
  font-size: 15px;
  margin: 0 3px;
}

.ocr-scan-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  z-index: 8;
}

.ocr-laser-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  box-shadow: 0 0 12px #38bdf8;
  animation: ocrLaserSweep 0.9s linear infinite;
}

@keyframes ocrLaserSweep {
  0% {
    top: 8%;
  }
  100% {
    top: 92%;
  }
}

.pipeline-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafd;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text2);
  transition: all 0.2s ease;
}

.pipeline-step-row.active {
  background: #ebf3ff;
  color: var(--primary-color);
  font-weight: 700;
}

.pipeline-step-row.done {
  background: var(--green-bg);
  color: #237804;
  font-weight: 700;
}

.demo-fab-btn {
  position: fixed;
  right: max(12px, calc(50% - 228px));
  bottom: 72px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  z-index: 160;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.demo-guide-sheet {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.demo-step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 14px;
}

.demo-step-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafd;
  font-size: 12px;
  font-weight: 700;
  color: var(--text1);
  cursor: pointer;
}

.demo-step-btn:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
}

/* ================= 人证合一 1:1 特征比对可视化卡片（活体页与结果页共用） ================= */
.id-ref-strip {
  width: 100%;
  max-width: 356px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f0f6ff;
  border: 1px solid #bfdbfe;
  text-align: left;
}

.id-ref-thumb {
  width: 66px;
  height: 44px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #93c5fd;
  flex-shrink: 0;
}

.id-ref-meta {
  flex: 1;
  min-width: 0;
}

.id-ref-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e3a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.id-ref-sub {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
}

.id-ref-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  white-space: nowrap;
}

.id-ref-badge.matching {
  background: #fef3c7;
  color: #b45309;
}

.id-ref-badge.passed {
  background: #dcfce7;
  color: #15803d;
}

.id-face-compare-box {
  width: 100%;
  max-width: 368px;
  margin: 0 auto 14px;
  padding: 12px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f0f6ff 100%);
  border: 1.5px solid #bfdbfe;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.id-face-compare-box.failed {
  background: linear-gradient(180deg, #fffafa 0%, #fff1f0 100%);
  border-color: #ffa39e;
}

.compare-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.compare-photo-frame {
  width: 116px;
  height: 86px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-face-compare-box.failed .compare-photo-frame {
  border-color: #ff7875;
}

.compare-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compare-photo-frame.live-face img {
  object-fit: cover;
}

.compare-photo-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
}

.compare-vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
}

.compare-vs-pill {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: var(--primary-color);
  color: #ffffff;
  white-space: nowrap;
}

.compare-vs-pill.ok {
  background: #16a34a;
}

.compare-vs-pill.fail {
  background: #dc2626;
}

.compare-score-val {
  font-size: 15px;
  font-weight: 900;
  color: #15803d;
}

.id-face-compare-box.failed .compare-score-val {
  color: #dc2626;
}

.compare-thresh-txt {
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
}
