/* side-scan.css —— 首屏 Hero 右侧扫码窗（颜色全部用既有 token，零字面量） */
.hero {
  position: relative;
}

.side-scan-dock {
  position: absolute;
  top: 50%;
  right: 7%;
  transform: translateY(-50%);
  width: 360px;
  max-width: calc(100vw - 32px);
  z-index: 5;
}

/* hero 内嵌模式：还原卡片自身外观，隐藏左侧说明栏 */
.side-scan-dock .scan-portal {
  padding: 0;
  background: transparent;
}

.side-scan-dock .scan-portal-inner {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

.side-scan-dock .scan-portal-text {
  display: none;
}

/* 窄屏：退出悬浮，随 Hero 文档流居中铺排（卡片自带表头，深底上仍清晰） */
@media (max-width: 1100px) {
  .side-scan-dock {
    position: static;
    transform: none;
    width: auto;
    max-width: 420px;
    margin: var(--sp-6) auto 0;
    padding: 0 var(--sp-5);
  }
}

/* ==== 二维码盒子：对齐 register.html 的成熟实现（防溢出/裁微信标题栏） ==== */
.side-scan-dock .scan-qr-wrap,
.side-scan-dock #qr-wrap {
  position: relative;
  display: inline-block;
  width: 260px;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  margin: 12px 0 16px;
  background: transparent;
}

.side-scan-dock #qrcode-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
}

/* 裁微信"微信登录"标题栏；multiply 把 iframe 白底抠掉透出卡片色，黑码点保留（对齐 register/admin） */
.side-scan-dock .scan-qr-wrap iframe,
.side-scan-dock #qr-wrap iframe,
.side-scan-dock #qrcode-container iframe {
  position: absolute;
  top: -52px;
  left: -20px;
  width: 300px;
  height: 400px;
  border: none;
  mix-blend-mode: multiply;
}

/* 扫码成功遮罩：对齐 register（JS 控制显示 flex） */
.side-scan-dock .scan-scanned {
  position: absolute;
  inset: 0;
  background: rgba(7, 193, 96, 0.92);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 10;
}

/* 卡片内边距与文本：紧凑居中，避免顶部裁切 */
.side-scan-dock .scan-card {
  padding: 28px 24px 20px;
}

.side-scan-dock .scan-header {
  margin-bottom: 4px;
}

.side-scan-dock .scan-header h1 {
  font-size: 17px;
  margin: 0 0 4px;
}

.side-scan-dock .scan-header p {
  font-size: 13px;
  margin: 0;
}

.side-scan-dock .scan-tip {
  font-size: 13px;
  line-height: 1.6;
}

.side-scan-dock .scan-error {
  font-size: 13px;
  min-height: 18px;
}

/* ==== 移除 Hero 背景照片（接口动态注入的 inline 背景图），回归 token 渐变 ==== */
.hero {
  background: var(--grad-hero) !important;
}

/* ==== 隐藏失效 logo 图（/uploads/logo/logo_0.png 404 产生裂图）；上传有效 logo 换 src 后自动恢复 ==== */
.navbar-logo-img[src$="logo_0.png"],
.scan-logo-img[src$="logo_0.png"],
.footer-logo-img[src$="logo_0.png"] {
  display: none;
}

/* ==== 导航链接组移至 logo 后方（默认 space-between 推到右侧） ==== */
.navbar-container {
  justify-content: flex-start;
}

.navbar-nav {
  margin-left: var(--sp-7, 40px);
}

/* ==== 字体统一（修正方向）：基准字体保留 Georgia/宋体衬线，全站系统黑体一律并入衬线 ==== */
:root {
  --font-sans: var(--font-serif);
}
