/* ============================================================
   伴生一体机页 新增样式（不修改原 pg1 style.css）
   - 补齐报告里 style.css 未单独命中的组合选择器
   - 二维码扫描浮层（舌诊/面诊双阶段流程）
   ============================================================ */

/* 报告：score-section 组合选择器（原 pg1 靠 .score-section.constitution-analysis 命中） */
.score-section.constitution-analysis { flex: 1 1 300px; }

/* 头部账号类按钮在一体机模式下隐藏（无用户登录体系） */
#auth-login-btn, #auth-user-info, #nav-history-btn, #logout-btn {
  display: none !important;
}

/* ============ 二维码扫描浮层 ============ */
.scan-flow {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #0f3a1a 0%, #06160b 70%, #04100a 100%);
  padding: 24px;
  animation: scanFade .25s ease;
}
@keyframes scanFade { from { opacity: 0; } to { opacity: 1; } }

.scan-flow-inner {
  position: relative;
  width: 100%;
  max-width: 460px;
  text-align: center;
  color: #eafff0;
}

.scan-cancel {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(255,255,255,.12);
  color: #cfeede;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.scan-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0 0 10px;
  color: #4ade80;
  text-shadow: 0 0 18px rgba(74,222,128,.4);
}
.scan-sub {
  font-size: 15px;
  line-height: 1.6;
  color: #bfe9d0;
  margin: 0 0 22px;
}

.scan-qr-wrap {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 2px rgba(74,222,128,.35);
}
.scan-qr {
  display: block;
  width: 280px;
  height: 280px;
  image-rendering: pixelated;
}

.scan-tip {
  margin-top: 18px;
  font-size: 13px;
  color: #8fcfae;
}

.scan-success {
  font-size: 20px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 8px;
}

/* 等待手机拍面部（单码流程第二阶段） */
.scan-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(74,222,128,.12);
  border: 1px solid rgba(74,222,128,.3);
  color: #bfe9d0;
  font-size: 14px;
}
.scan-loading .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #4ade80;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.scan-state { animation: scanFade .25s ease; }

.scan-spinner {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border: 5px solid rgba(74,222,128,.2);
  border-top-color: #4ade80;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan-error-icon { font-size: 48px; margin-bottom: 10px; }
.scan-retry {
  margin-top: 16px;
  background: #4ade80;
  color: #06210f;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* 报告页「再次检测」回到首页 */
#btn-recheck { margin-top: 8px; }
