/* ==========================================================================
   推荐官中心 · TDesign 企业级设计体系
   规范来源：TDesign DESIGN.md（腾讯开源）
   变量命名与语义对齐 --td-*，落地时可直接替换为 tdesign-vue-next 主题变量
   ========================================================================== */

:root {
  /* —— 背景 —— */
  --mb-bg-page: #eeeeee;
  --mb-bg-container: #ffffff;
  --mb-bg-secondarycontainer: #f3f3f3;
  --mb-bg-component: #e8e8e8;
  --mb-bg-component-disabled: #eeeeee;

  /* —— 品牌色 ——
     对齐 app.css（证书查询页）的红：主按钮 / 链接 / 选中态用 --main-red。
     ⚠️ 全站不使用蓝色；hover / active 是主红机械加深两档。 */
  --mb-brand: #e70012;
  --mb-brand-hover: #c50a12;
  --mb-brand-active: #a50a10;
  --mb-brand-light: #fff1f0;

  /* —— 功能色 —— */
  --mb-success: #2ba471;
  --mb-warning: #e37318;
  --mb-error: #d54941;
  --mb-error-light: #fff0ed;

  /* —— 文字 —— */
  --mb-text-primary: rgba(0, 0, 0, 0.9);
  --mb-text-secondary: rgba(0, 0, 0, 0.6);
  --mb-text-placeholder: rgba(0, 0, 0, 0.4);
  --mb-text-disabled: rgba(0, 0, 0, 0.26);
  --mb-text-anti: #ffffff;

  /* —— 边框 / 分割线 —— */
  --mb-border-1: #e8e8e8;
  --mb-border-2: #dddddd;

  /* —— 圆角 —— */
  --mb-radius-s: 2px;
  --mb-radius: 3px;
  --mb-radius-m: 6px;
  --mb-radius-l: 9px;
  --mb-radius-round: 999px;

  /* —— 阴影 —— */
  --mb-shadow-1: 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
  --mb-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 0.05), 0 16px 24px 2px rgba(0, 0, 0, 0.04), 0 8px 10px -5px rgba(0, 0, 0, 0.08);

  /* —— 控件尺寸 —— */
  --mb-ctrl-h: 40px;
  --mb-ctrl-h-lg: 44px;

  /* 导航栏高度：抽屉要从它下沿开始下推，必须同源 */
  --mb-nav-h: 48px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mb-text-primary);
  background: var(--mb-bg-page);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 22px;
}

button, input, select, textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

a { color: var(--mb-brand); text-decoration: none; }
a:hover { color: var(--mb-brand-hover); }

/* ==========================================================================
   顶部导航栏（推荐官中心 / 邀请页共用）
   ========================================================================== */

.mb-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--mb-bg-container);
  border-bottom: 1px solid var(--mb-border-1);
}

/* 导航内层：与页面内容同宽居中，避免桌面端元素散落到两端 */
.mb-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(720px, 100%);
  height: var(--mb-nav-h);
  margin: 0 auto;
  padding: 0 16px;
}

.mb-nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--mb-radius-s);
  color: var(--mb-text-primary);
  background: transparent;
  cursor: pointer;
}

.mb-nav-back:hover { background: var(--mb-bg-secondarycontainer); }

.mb-nav-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--mb-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-nav-aside {
  flex: none;
  font-size: 14px;
  color: var(--mb-text-secondary);
}

/* 品牌位：全页唯一，仅存在于导航栏（TDesign 唯一品牌位约束） */
.mb-brand-lockup {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* 页头品牌标识 = 《雷锋》杂志社公共事业服务中心（logo.png，1057×144 ≈ 7.34:1，
   由 2357×321 的原图缩到「桌面显示高 44px 的 2 倍屏」尺寸；比例未变，所以下面按比例
   算出来的字号关系都还成立）。
   同时限制高度与可用宽度，窄屏时等比缩小，避免挤压右侧菜单。 */
.mb-brand-lockup-mark {
  flex: none;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 112px);
  max-height: 36px;
  object-fit: contain;
}

.mb-nav-link {
  flex: none;
  padding: 0;
  border: 0;
  font-size: 14px;
  color: var(--mb-brand);
  background: transparent;
  cursor: pointer;
}

/* 导航右侧区：上下文标签 + 汉堡
   margin-left:auto 保证右侧区恒定贴右。
   桌面端本来靠 .mb-tabs{flex:1} 撑开，但移动端 tabs 隐藏后，
   品牌是收缩宽度的 span，右侧区就会紧贴 logo —— 这里兜底。 */
.mb-nav-right {
  flex: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   移动端抽屉导航
   参照参考站移动版：汉堡 28×28（图标 24×24、描边 1.4、直角线帽），
   抽屉从导航栏下沿向下推出，遮罩 60% 黑，位移/遮罩同为 .28s
   cubic-bezier(.38,0,.24,1)。
   ========================================================================== */

/* 汉堡只在小屏出现；参考站桌面端是横向 tabs，没有汉堡 */
.mb-nav-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--mb-radius-s);
  color: var(--mb-text-primary);
  background: transparent;
  cursor: pointer;
}

/* 只在真有 hover 能力的设备上给悬停底色。
   触屏上点一下会让 :hover 卡住不放，白底 + 白图标 = 汉堡整个消失（2026-09-19 用户截图点出）。 */
@media (hover: hover) {
  .mb-nav-menu:hover { background: var(--mb-bg-secondarycontainer); }
}

/* 汉堡 / 关闭两态：按钮自身的 aria-expanded 就是唯一状态源（JS 只翻这一个属性） */
.mb-menu-icon--close { display: none; }

.mb-nav-menu[aria-expanded='true'] .mb-menu-icon--menu { display: none; }

.mb-nav-menu[aria-expanded='true'] .mb-menu-icon--close { display: block; }

/* 容器从导航栏下沿开始 —— 导航栏本身不被遮住，仍可点击收起。
   z-index 必须高于页面内其它固定元素（底部操作条是 30），否则遮罩盖不住它们。 */
.mb-drawer {
  position: fixed;
  top: var(--mb-nav-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.mb-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mb-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.38, 0, 0.24, 1);
}

.mb-drawer.is-open .mb-drawer-mask { opacity: 1; }

/* 收起时上移一个自身高度，被容器的 overflow 裁掉 */
.mb-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  background: var(--mb-bg-container);
  box-shadow: 0 3px 14px 2px rgba(0, 0, 0, 0.05),
              0 8px 10px 1px rgba(0, 0, 0, 0.06),
              0 5px 5px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.38, 0, 0.24, 1),
              visibility 0.28s cubic-bezier(0.38, 0, 0.24, 1);
}

.mb-drawer.is-open .mb-drawer-panel { transform: translateY(0); }

.mb-drawer-menu {
  margin: 23px 0 0;
  padding: 0 33px 23px;
  list-style: none;
}

.mb-drawer-item a {
  display: flex;
  align-items: center;
  height: 80px;
  font-size: 23px;
  font-weight: 500;
  color: var(--mb-text-primary);
  text-decoration: none;
}

.mb-drawer-item a:active { color: var(--mb-brand); }

/* ==========================================================================
   邀请页覆盖式页头（照搬参考站两端的页头行为）
   桌面：76px 白条（居中彩色品牌）+ 60px 透明导航压在 hero 上沿（横向 tabs）
   移动：无白条，60px 固定透明页头（白色品牌 + 白色汉堡），滚过 hero 翻白底
   ========================================================================== */

/* 桌面白条：仅 ≥769px 出现 */
.mb-logo-strip { display: none; }

/* 覆盖式导航：默认透明，位置按断点切换 */
.mb-nav--overlay {
  background: transparent;
  border-bottom: 0;
}

/* 桌面 tabs：默认隐藏，≥769px 出现 */
.mb-tabs { display: none; }

@media (min-width: 769px) {
  .mb-logo-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 76px;
    background: var(--mb-bg-container);
  }

  .mb-logo-strip .mb-brand-lockup { flex: 0 0 auto; }

  /* 透明导航叠在 hero 上沿（紧接 76px 白条之下） */
  .mb-nav--overlay {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
  }

  /* 桌面导航不显示品牌（白条里已有），只显示 tabs */
  .mb-nav--overlay .mb-overlay-brand { display: none; }

  .mb-nav--overlay .mb-nav-inner {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  .mb-tabs {
    display: flex;
    flex: 1;
    gap: 40px;
    height: 100%;
  }

  .mb-tabs a {
    display: flex;
    align-items: center;
    padding-top: 2px;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
  }

  .mb-tabs a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.9);
  }

  .mb-nav--overlay .mb-nav-aside { color: rgba(255, 255, 255, 0.9);   }
}

@media (max-width: 768px) {
  /* 移动端：固定透明页头压在 hero 上（hero 从 y=0 开始） */
  .mb-nav--overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
  }

  /* 白色汉堡（透明压在红 hero 上） */
  .mb-nav--overlay .mb-nav-menu { color: #fff; }

  /* 滚过 hero 后翻白底（参考站 TG-flexd 滚动态） */
  .mb-nav--overlay.is-scrolled {
    background: var(--mb-bg-container);
    border-bottom: 1px solid var(--mb-border-1);
  }

  .mb-nav--overlay.is-scrolled .mb-nav-menu { color: var(--mb-text-primary); }
}

/* ==========================================================================
   页面骨架
   ========================================================================== */

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 96px;
  background: var(--mb-bg-page);
}

/* 桌面端：页面底色必须铺满整个视口。
   .shell 只有 720/440px 宽，之前背景色只画出中间一条竖带，
   两侧保持浏览器默认白 —— 视觉上像「页面没加载完」。
   用 body 承载底色，.shell 自身透明即可。 */
@media (min-width: 960px) {
  body { background: var(--mb-bg-page); }
  .shell { background: transparent; }
}

/* ==========================================================================
   卡片
   ========================================================================== */

.card {
  margin-top: 16px;
  padding: 24px;
  background: var(--mb-bg-container);
  border: 1px solid var(--mb-border-1);
  border-radius: var(--mb-radius-m);
}

/* ==========================================================================
   卡片内间距容器
   推荐官中心卡片里的按钮行用它撑开节奏；表单字段一律走 .f-item（见下）。
   ========================================================================== */

.field { margin: 0 0 20px; }

/* 推荐官中心：两个按钮并排一行（复制邀请链接 + 生成我的海报）。 */
.action-row {
  display: flex;
  gap: 12px;
}

.action-row > button {
  flex: 1 1 0;
  min-width: 0;
  /* 抵消按钮基类 .primary/.secondary 的 width:100%，让两个按钮严格等宽同行 */
  width: auto;
}

.required-mark {
  font-style: normal;
  color: var(--mb-error);
}

/* 字段下方的辅助说明（补资料页的证书照片格式提示） */
.brand-form .f-item small.muted {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 20px;
  color: var(--mb-text-secondary);
}

/* ==========================================================================
   表单控件（TDesign 对齐）—— 只服务邀请页的榜样案例征集表
   .f-item 是字段容器，邀请页把它渲染成白卡（见 .brand-form）。
   ========================================================================== */

.f-item { margin: 0 0 24px; }

.f-item:last-child { margin-bottom: 0; }

.f-label {
  display: block;
  margin: 0 0 20px;
  padding-right: 24px;
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  color: var(--mb-text-primary);
}

.f-label .required-mark { margin-left: 4px; }

/* —— 文本 / 多行 —— */

.f-input,
.f-textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--mb-border-2);
  border-radius: 4px;
  background: var(--mb-bg-container);
  color: var(--mb-text-primary);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.f-input {
  height: var(--mb-ctrl-h);
  padding: 0 12px;
}

/* 只读值（「我的资料」详情卡）：与 f-label 同结构，无边框纯文本 */
.f-value {
  font-size: 16px;
  line-height: 24px;
  color: rgba(0, 0, 0, 0.6);
}

/* 证书照片预览：我的资料卡 / 变更资料表单里展示已上传的照片 */
.profile-avatar {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--mb-border-2);
}

.profile-avatar-item .profile-avatar { margin-bottom: 0; }

/* 上传证书照片：隐藏原生 file 控件，整块可点；左边方形缩略图，右边两行文案。
   有照片时缩略图就是照片本身，点一下直接换，不再另开预览区。 */
.f-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--mb-bg-secondarycontainer);
  cursor: pointer;
  transition: background 0.2s ease;
}

.upload-box:active { background: var(--mb-brand-light); }

.upload-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px dashed var(--mb-border-2);
  border-radius: 12px;
  background: var(--mb-bg-container);
  color: var(--mb-brand);
}

.upload-thumb.is-filled { border: 0; }

.upload-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.upload-thumb svg { width: 30px; height: 30px; }

.upload-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.upload-title { color: rgba(0, 0, 0, 0.85); font-size: 15px; font-weight: 500; line-height: 1.3; }

.upload-hint { color: rgba(0, 0, 0, 0.42); font-size: 12px; font-style: normal; line-height: 1.4; }

.upload-hint.is-pending { color: var(--mb-brand); }

.f-textarea {
  min-height: 74px;
  padding: 5px 8px;
  line-height: 22px;
  resize: vertical;
}

.f-input::placeholder,
.f-textarea::placeholder { color: var(--mb-text-placeholder); }

.f-input:hover,
.f-textarea:hover { border-color: var(--mb-brand); }

.f-input:focus,
.f-textarea:focus {
  outline: none;
  border-color: var(--mb-brand);
  box-shadow: 0 0 0 2px rgba(231, 0, 18, 0.15);
}

.f-input[readonly],
.f-input:disabled,
.f-textarea:disabled {
  color: var(--mb-text-secondary);
  background: var(--mb-bg-secondarycontainer);
  border-color: var(--mb-border-1);
  cursor: not-allowed;
}

.f-counter {
  display: block;
  margin-top: 6px;
  text-align: right;
  font-size: 12px;
  color: var(--mb-text-secondary);
}

/* —— 圆形单选（TDesign Radio）—— */

.f-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}

.f-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 24px;
  cursor: pointer;
}

.f-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.f-option-box {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--mb-border-2);
  border-radius: 50%;
  background: var(--mb-bg-container);
  transition: border-color 0.2s ease;
}

.f-option-box::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--mb-brand);
  transform: scale(0.5);
  opacity: 0;
  transition: all 0.2s ease;
}

.f-option-text {
  margin-left: 8px;
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  color: var(--mb-text-primary);
}

.f-option:hover .f-option-box { border-color: var(--mb-brand); }

.f-option:hover .f-option-text {
  color: var(--mb-brand);
  font-weight: 500;
}

.f-option:has(input:checked) .f-option-box { border-color: var(--mb-brand); }

.f-option:has(input:checked) .f-option-box::after { opacity: 1; }

.f-option:has(input:focus-visible) .f-option-box {
  box-shadow: 0 0 0 2px rgba(231, 0, 18, 0.2);
}

/* ==========================================================================
   邀请页提交成功弹窗
   ========================================================================== */

body.invite-success-open { overflow: hidden; }

.invite-success-dialog {
  position: fixed;
  inset: 0;
  /* 全站成功消息是 3000；弹窗低一层，让提交结果提示保持可见。 */
  z-index: 2990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.invite-success-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: default;
  animation: invite-success-backdrop-in 0.24s ease-out both;
}

.invite-success-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 12px;
  background: var(--mb-bg-container);
  box-shadow: var(--mb-shadow-3);
  animation: invite-success-panel-in 0.32s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes invite-success-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes invite-success-panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes invite-success-sheet-in {
  from { opacity: 0; transform: translateY(48px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .invite-success-backdrop,
  .invite-success-panel { animation: none; }
}

.invite-success-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 18px 64px;
  border-bottom: 1px solid var(--mb-border-1);
}

.invite-success-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 36px;
}

.invite-success-close {
  position: absolute;
  top: 50%;
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--mb-text-placeholder);
  background: var(--mb-bg-secondarycontainer);
  cursor: pointer;
  transform: translateY(-50%);
}

.invite-success-close:hover { color: var(--mb-text-primary); }

.invite-success-close:focus-visible {
  outline: 2px solid var(--mb-brand);
  outline-offset: 2px;
}

.invite-success-body {
  padding: 30px 36px 36px;
  text-align: center;
}

.invite-success-body p {
  margin: 0 0 22px;
  color: var(--mb-text-primary);
  font-size: 18px;
  line-height: 28px;
}

.invite-success-body img {
  display: block;
  width: min(320px, 100%);
  /* 多了「领取证书」按钮后要压一压二维码，否则小屏上按钮会被挤出弹窗 */
  max-height: min(480px, 40vh);
  margin: 0 auto;
  object-fit: contain;
}

/* 「领取证书」：点了直接进推荐官中心（已自动登录），先设密码再补资料 */
.invite-success-claim {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 15px 0;
  border-radius: var(--mb-radius-round);
  background: var(--mb-brand);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.invite-success-claim:active { background: var(--mb-brand-active); }

/* ==========================================================================
   按钮
   ========================================================================== */

.primary,
.secondary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--mb-ctrl-h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--mb-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary {
  color: var(--mb-text-anti);
  background: var(--mb-brand);
}

.primary:hover { background: var(--mb-brand-hover); }

.primary:active { background: var(--mb-brand-active); }

.primary:disabled {
  color: var(--mb-text-anti);
  background: #b5c7ff;
  cursor: not-allowed;
}

.secondary {
  color: var(--mb-brand);
  background: var(--mb-bg-container);
  border-color: var(--mb-border-2);
}

.secondary:hover {
  color: var(--mb-brand-hover);
  border-color: var(--mb-brand-hover);
  background: var(--mb-brand-light);
}

.ghost {
  color: var(--mb-text-primary);
  background: var(--mb-bg-secondarycontainer);
}

.ghost:hover { background: var(--mb-bg-component); }

/* ==========================================================================
   生成海报加载遮罩（loading-ui AnalyzingImage，红色扫描图）
   ========================================================================== */

.mb-poster-loading {
  position: fixed;
  inset: 0;
  z-index: 2950;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mb-poster-loading.is-show {
  opacity: 1;
  pointer-events: auto;
}

.mb-poster-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mb-ai-icon {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
  color: var(--mb-brand);
}

.mb-ai-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mb-ai-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12%;
  border-radius: 999px;
  background: var(--mb-brand);
  opacity: 0.4;
  animation: mb-ai-scan 2.4s ease-in-out infinite;
}

@keyframes mb-ai-scan {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(733%); }
  100% { transform: translateX(-100%); }
}

.mb-poster-loading-text {
  font-size: 14px;
  line-height: 20px;
  color: rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   海报预览（生成完先打开看图，可再下载）
   ========================================================================== */

.mb-poster-preview {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mb-poster-preview.is-show {
  opacity: 1;
  pointer-events: auto;
}

.mb-poster-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mb-poster-close:hover { background: rgba(255, 255, 255, 0.28); }

.mb-poster-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.mb-poster-tip {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.mb-poster-actions {
  display: flex;
  gap: 12px;
}

.mb-poster-download {
  min-width: 120px;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: var(--mb-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.mb-poster-download:hover { background: var(--mb-brand-hover); }

/* ==========================================================================
   数据 / 状态
   ========================================================================== */

.tag {
  flex: none;
  padding: 1px 8px;
  border-radius: var(--mb-radius);
  font-size: 12px;
  line-height: 20px;
  color: var(--mb-text-secondary);
  background: var(--mb-bg-secondarycontainer);
}

.tag.ok {
  color: var(--mb-text-anti);
  background: var(--mb-success);
}

.muted {
  font-size: 13px;
  line-height: 21px;
  color: var(--mb-text-secondary);
}

/* 顶部弹窗提示与全屏 Preloader 都在 /static/feedback.css 里（全站共用一份），
   本文件不再重复定义 .mb-messages / .mb-message / .mb-preloader / .mb-infinity。 */

/* 整页失败态（邀请链接失效等）仍是内联提示 —— 那种情况没有「还可以继续操作」的页面，
   弹窗飘在空页面上反而奇怪。配色与弹窗同源，全站只有一套红。 */
.error {
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--mb-radius);
  font-size: 13px;
  line-height: 22px;
  color: #f56c6c;
  background: #fef0f0;
  border: 1px solid #fde2e2;
}

/* ==========================================================================
   邀请页 Hero（品牌色块）
   参照「技术公益·数字化自测问卷」：大标题 + 一排 60% 品牌蓝卡片，
   卡片只在外侧两角收圆，整排读作一块通栏面板。移动端卡片转透明纵向堆叠。
   ========================================================================== */

.brand-hero {
  /* 132 = 60px 透明导航压顶 + 72px 原有留白 */
  padding: 132px 24px 60px;
  color: var(--mb-text-anti);
  /* hero 用证书查询页的两档红：主红 → footer 红，亮到深 */
  background: linear-gradient(135deg, #e70012 0%, #b91c1c 100%);
}

/* hero 内层：与内容区同宽（1008px），桌面端不把文本甩到屏幕两端 */
.brand-hero-inner {
  width: min(1008px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.brand-hero-kicker {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.8);
}

.brand-hero-title {
  margin: 0 0 30px;
  font-size: 52px;
  font-weight: 500;
  line-height: 74px;
  color: var(--mb-text-anti);
}

.brand-hero-cards {
  display: flex;
  gap: 4px;
}

.brand-hero-card {
  flex: 1;
  padding: 30px;
  /* 深色半透明面板：红色系下用黑 20%，保证卡片始终比横幅底色深 */
  background: rgba(0, 0, 0, 0.2);
  /* 单独一张（登录页只有说明列）时四角都收圆 */
  border-radius: 16px;
}

/* 成排时只有整排的外侧两角收圆，中间卡片保持直角 */
.brand-hero-card:not(:only-child):first-child { border-radius: 16px 0 0 16px; }

.brand-hero-card:not(:only-child):last-child { border-radius: 0 16px 16px 0; }

.brand-hero-card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  color: var(--mb-text-anti);
}

.brand-hero-card-desc {
  margin: 0;
  padding-top: 12px;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

/* hero 里的说明文字列：沿用卡片的面板语言，但占更宽的一列（推荐官卡 : 文字列 = 1 : 2） */
.brand-hero-note { flex: 2; }

.brand-hero-note p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

/* 首段不加上边距，段间才加（卡片标题到正文的 12px 视觉间距） */
.brand-hero-note p + p { padding-top: 12px; }

/* ==========================================================================
   品牌页骨架（邀请页 / 登录页共用，JS 侧出口是 brandPage()）
   覆盖式页头 + 红色 hero + 灰底内容区 + 页脚；两页「长得一样」只需改这一处。
   ========================================================================== */

.brand-page {
  position: relative;
  /* 覆盖式页头统一 60px 高（参考站手机/桌面页头同为 60px），
     抽屉 top 与导航高度同源 */
  --mb-nav-h: 60px;
  min-height: 100vh;
  color: var(--mb-text-primary);
  background: var(--mb-bg-page);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 有底部固定操作条的页面（只有邀请页）：给操作条留高度 + 安全区，避免挡住表单末尾 */
.brand-page--actions { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

.brand-page *,
.brand-page *::before,
.brand-page *::after { box-sizing: border-box; }

.brand-page button,
.brand-page input,
.brand-page textarea,
.brand-page select { font: inherit; }

.brand-page button { -webkit-tap-highlight-color: transparent; }

/* 灰底区：分区标题与表单共用同一灰底 */
.brand-body {
  padding-bottom: 40px;
  background: #f4f4f4;
}

/* 分区标题：灰底上的大标题，与表单卡左边缘对齐 */
.brand-sec-title {
  max-width: 1008px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  font-size: 30px;
  font-weight: 500;
  line-height: 36px;
  color: var(--mb-text-primary);
}

.brand-body-inner {
  width: min(1008px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.brand-form { display: block; }
.brand-form[hidden] { display: none; }

/* 推荐官登录方式切换与短信验证码输入。 */
.login-methods {
  display: flex;
  width: min(520px, 100%);
  margin: 0 auto 24px;
  border-bottom: 1px solid var(--mb-border-1);
}

.login-method {
  flex: 1;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--mb-text-secondary);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.login-method.is-active {
  border-bottom-color: var(--mb-brand);
  color: var(--mb-brand);
  font-weight: 500;
}

.login-code-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.login-code-row .f-input { flex: 1; min-width: 0; }

.login-code-button {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 0 14px;
  border: 1px solid var(--mb-brand);
  border-radius: 4px;
  color: var(--mb-brand);
  background: var(--mb-bg-container);
  font: inherit;
  cursor: pointer;
}

.login-code-button:hover { background: var(--mb-brand-light); }

.login-code-button:disabled {
  color: var(--mb-text-disabled);
  border-color: var(--mb-border-1);
  background: var(--mb-bg-component-disabled);
  cursor: not-allowed;
}

.login-forgot {
  display: block;
  margin: 14px auto 0;
  padding: 0;
  border: 0;
  color: var(--mb-brand);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.login-forgot:hover { text-decoration: underline; }

/* 邀请页：每个字段一张白卡 */
.brand-form .f-item {
  padding: 30px;
  margin-bottom: 24px;
  background: var(--mb-bg-container);
  border-radius: 8px;
}

.brand-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  min-height: 64px;
  margin: 36px auto 0;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--mb-text-anti);
  background: var(--mb-brand);
  cursor: pointer;
  transition: background 0.2s ease;
}

.brand-submit:hover { background: var(--mb-brand-hover); }

.brand-submit:active { background: var(--mb-brand-active); }

.brand-submit:disabled {
  color: var(--mb-text-disabled);
  background: var(--mb-bg-component-disabled);
  cursor: not-allowed;
}

/* ==========================================================================
   底部快捷操作条
   参照活动详情页的两枚并列胶囊按钮（主按钮实心品牌色 / 次按钮描边），
   移动端吸底；桌面端转内联右对齐，避免横跨整屏的「移动 App」观感。
   ========================================================================== */

.invite-bottom-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  background: var(--mb-bg-container);
  border-top: 1px solid var(--mb-border-1);
  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.05);
}

.invite-bottom-actions-inner {
  display: flex;
  gap: 10px;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
}

.invite-bottom-actions a,
.invite-bottom-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--mb-brand);
  border-radius: var(--mb-radius-round);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.invite-bottom-actions a {
  color: var(--mb-brand);
  background: var(--mb-bg-container);
}

.invite-bottom-actions a:hover {
  color: var(--mb-brand-hover);
  border-color: var(--mb-brand-hover);
  background: var(--mb-brand-light);
}

.invite-bottom-actions button {
  color: var(--mb-text-anti);
  background: var(--mb-brand);
}

.invite-bottom-actions button:hover { background: var(--mb-brand-hover); border-color: var(--mb-brand-hover); }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 520px) {
  .shell { padding: 12px 12px 88px; }
  .card { padding: 16px; }
}

/* ==========================================================================
   邀请页移动版式（≤ 768px —— 与参考页断点一致）
   hero 卡片转透明纵向堆叠、分区标题变通栏白条、字段卡内边距收紧、
   单选转两列网格 + 分隔线、输入框加高到 60px、提交按钮满宽。
   ========================================================================== */

@media (max-width: 768px) {

  .invite-success-dialog {
    align-items: flex-end;
    padding: 0;
  }

  .invite-success-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    animation-name: invite-success-sheet-in;
  }

  .invite-success-header {
    min-height: 66px;
    padding: 15px 58px;
  }

  .invite-success-header h2 {
    font-size: 21px;
    line-height: 32px;
  }

  .invite-success-close { right: 16px; }

  .invite-success-body { padding: 24px 24px calc(28px + env(safe-area-inset-bottom)); }

  .invite-success-body p {
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 26px;
  }

  .invite-success-body img {
    width: min(280px, 86vw);
    /* 小屏要留给「领取证书」按钮 */
    max-height: 40vh;
  }

  /* 导航：小屏只留品牌 + 汉堡（参考站移动端就是这两个），上下文标签收起 */
  .mb-nav-menu { display: inline-flex; }

  .mb-nav-right .mb-nav-aside { display: none; }

  .brand-hero { padding: 96px 16px 36px; }

  .brand-hero-inner { padding: 0 16px; }

  .brand-hero-title {
    margin-bottom: 24px;
    font-size: 20px;
    line-height: 30px;
  }

  .brand-hero-cards {
    flex-direction: column;
    gap: 20px;
  }

  /* 移动端卡片去掉面板底色，退化为纯文字列表。
     必须把桌面端那两条 :not(:only-child) 圆角规则原样列出来才能压住
     ——媒体查询不提权，靠的是同权重 + 源码在后。 */
  .brand-hero-card,
  .brand-hero-note,
  .brand-hero-card:not(:only-child):first-child,
  .brand-hero-card:not(:only-child):last-child {
    flex: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .brand-hero-card-title {
    font-size: 16px;
    line-height: 24px;
  }

  /* 分区标题变通栏白条，与 hero 无缝相接 */
  .brand-sec-title {
    max-width: none;
    padding: 28px 16px;
    font-size: 18px;
    line-height: 28px;
    background: var(--mb-bg-container);
  }

  .brand-body-inner { padding: 10px 16px 0; }

  .login-methods { margin-bottom: 16px; }

  .login-code-row { gap: 8px; }

  .login-code-button {
    min-width: 104px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .brand-form .f-item {
    padding: 20px 16px;
    margin-bottom: 10px;
    border-radius: var(--mb-radius-m);
  }

  .brand-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 24px;
  }

  /* —— 表单控件 —— */
  .f-label {
    margin-bottom: 20px;
    padding-right: 0;
    font-size: 16px;
  }

  .f-input {
    height: 60px;
    padding: 0 20px;
  }

  .f-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    row-gap: 0;
  }

  .f-option {
    display: flex;
    margin-right: 0;
    padding: 20px 0 20px 20px;
    border-bottom: 1px solid var(--mb-border-1);
  }

  /* 末行两项去掉分隔线，避免卡片底部多出一条悬空的线 */
  .f-option:last-child,
  .f-option:nth-last-child(2) { border-bottom: 0; }

  .f-option-text { font-size: 14px; }

  .f-option:hover .f-option-text {
    color: var(--mb-text-primary);
    font-weight: 500;
  }
}

/* ==========================================================================
   桌面端适配（≥ 960px）
   移动端优先布局在小屏成立，桌面端需要：更宽的呼吸感、更克制的层级、
   以及把「为拇指设计」的固定底栏改回内联，避免横跨整屏。
   ========================================================================== */

@media (min-width: 960px) {
  :root { --mb-nav-h: 56px; }

  .mb-nav-inner { padding: 0 24px; }

  .mb-nav-title { font-size: 18px; }
  .mb-brand-lockup-mark {
    width: auto;
    height: auto;
    max-width: min(520px, 42vw);
    max-height: 44px;
  }

  .shell { padding: 24px 24px 48px; }

  .card { padding: 28px; }

  /* 邀请页统一列宽：导航 / hero / 内容 / 底栏共享同一条中线与同一宽度 */
  .mb-nav-inner.is-wide,
  .invite-bottom-actions-inner { width: min(1008px, 100%); }

  /* 桌面端不再吸底：改为内联按钮区，按钮靠右收束，去掉「移动 App」观感 */
  .brand-page--actions { padding-bottom: 0; }

  .invite-bottom-actions {
    position: static;
    box-shadow: none;
    border-top: 1px solid var(--mb-border-1);
  }

  .invite-bottom-actions-inner {
    justify-content: flex-end;
    padding: 16px 24px;
  }

  .invite-bottom-actions a,
  .invite-bottom-actions button {
    flex: 0 0 auto;
    min-width: 180px;
    border-radius: var(--mb-radius);
    font-size: 15px;
  }

  .metric strong { font-size: 34px; line-height: 42px; }
  .metric { padding: 24px 16px; }

  .field textarea { min-height: 160px; }

  .f-textarea { min-height: 160px; }
}

/* 超宽屏：内容区托到更舒适的阅读宽度 */
@media (min-width: 1441px) {
  .mb-nav-inner { width: min(960px, 100%); }
  /* 邀请页各层同步加宽，仍共享同一条中线 */
  .mb-nav-inner.is-wide,
  .invite-bottom-actions-inner { width: min(1056px, 100%); }
  .shell { width: min(880px, 100%); }
}

/* ==========================================================================
   滚动固定顶栏（照搬参考站：下滑后出现的全局导航条）
   桌面端滚过 hero 后从顶部滑入；移动端复用覆盖式页头的 is-scrolled，不渲染。
   ========================================================================== */

.sticky-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 25;
  /* 置顶态照搬参考站 .tech4good-new-header.is-pinned：黑 40% + 10px 毛玻璃，
     文字/链接反白，不再画下边框与投影（参考站置顶时 border-bottom-color 也是 transparent） */
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: hsla(0, 0%, 100%, 0.9);
  transform: translateY(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header.is-visible {
  transform: translateY(0);
}

.sticky-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(1008px, 100%);
  height: 56px;
  margin: 0 auto;
  padding: 0 24px;
}

.sticky-header-inner .mb-brand-lockup { flex: 0 0 auto; }

.sticky-header-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 32px;
  margin-left: 24px;
}

.sticky-header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: hsla(0, 0%, 100%, 0.9);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.sticky-header-nav a:hover {
  color: #fff;
}

.sticky-header-right {
  flex: none;
  display: flex;
  align-items: center;
}

.sticky-header-context {
  font-size: 13px;
  color: hsla(0, 0%, 100%, 0.9);
}

/* 移动端不渲染独立固定顶栏（与覆盖式页头 is-scrolled 复用） */
@media (max-width: 768px) {
  .sticky-header { display: none; }
}

/* ==========================================================================
   站点页脚（照搬参考站：品牌区 + 链接区 + 版权区）
   ========================================================================== */

.site-footer {
  background-color: #f3f3f3;
  color: rgba(0, 0, 0, .9);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 品牌区：logo + 标语，参考站 footer-belong
   容器宽度对齐参考站：内容区 1264px、左右各留 24px 栏距（1440 下内容起于 x=88） */
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  width: min(1264px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0;
  border-bottom: 1px solid #dcdcdc;
}

/* 品牌区：必须撑满整行，space-between 才能把二维码推到最右
   （参考站 footer-belong 本身就是满宽行，故 figure 落在 x=1076、右缘 1352） */
.site-footer-brand {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

/* 页脚品牌：ggsylogo.png 本身就是「雷锋杂志社｜公共事业服务中心」的完整组合标识，
   不再是「logo 图 + 竖线 + HTML 文字」，所以没有 divider / name 两个节点。
   对齐参考站 footer-logos > img：高 36px、宽度自适应。 */
.site-footer-logo {
  height: 36px;
  width: auto;
}

.site-footer-qr-group {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* 二维码区（照搬参考站 footer-belong > figure）：说明文字 + 二维码横排 */
.site-footer-figure {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
}

.site-footer-figure figcaption {
  font-size: 16px;
  line-height: 24px;
  color: rgba(0, 0, 0, .9);
  white-space: nowrap;
}

.wx-qr-code > img {
  width: 80px;
  height: 80px;
  display: block;
}

/* 链接区：多列分类导航，参考站 footer-links */
.site-footer-links {
  display: flex;
  gap: 80px;
  padding: 40px 0;
  width: min(1264px, calc(100% - 48px));
  margin: 0 auto;
  border-bottom: 1px solid #dcdcdc;
}

.site-footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-links li {
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, .6);
}

.site-footer-links li:first-child {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: rgba(0, 0, 0, .9);
}

.site-footer-links a {
  color: rgba(0, 0, 0, .6);
  text-decoration: none;
  transition: color .15s;
}

.site-footer-links a:hover {
  color: var(--mb-brand);
}

/* 版权区：参考站 footer-copyright（电脑端 space-between、左块多行、右块一句话） */
.site-footer-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, .6);
  width: min(1264px, calc(100% - 48px));
  margin: 0 auto;
}

.site-footer-copy-left {
  display: flex;
  flex-direction: column;
}

.site-footer-copy-right {
  display: flex;
}

/* 电脑版采用参考站的紧凑页脚密度。两组二维码增加了横向信息量，
   因此整体尺寸比参考站单二维码版本再收一档，避免页脚喧宾夺主。 */
@media (min-width: 769px) {
  .site-footer-inner {
    padding: 40px 0;
  }

  .site-footer-logo {
    height: 28px;
  }

  .site-footer-qr-group {
    gap: 24px;
  }

  .site-footer-figure {
    gap: 12px;
  }

  .site-footer-figure figcaption {
    font-size: 14px;
    line-height: 20px;
  }

  .wx-qr-code > img {
    width: 64px;
    height: 64px;
  }

  .site-footer-links {
    align-items: flex-start;
    gap: 80px;
    padding: 28px 0;
  }

  .site-footer-links ul {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-footer-links li {
    font-size: 14px;
    line-height: 22px;
  }

  .site-footer-links li:first-child {
    font-size: 16px;
    line-height: 24px;
    margin-right: 0;
  }

  .site-footer-copy {
    padding: 12px 0;
    font-size: 13px;
    line-height: 20px;
  }

  .site-footer-copy-left {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 18px;
  }

  .site-footer-copy-left span:first-child {
    grid-column: 1 / -1;
  }

  .site-footer-copy-left span:nth-child(3)::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin-right: 18px;
    vertical-align: -1px;
    background: #d0d0d0;
  }
}

@media (max-width: 768px) {
  /* ===== 移动端页脚：逐项对齐参考站的独立移动组件 mobile_tech_footer =====
     参考站手机布局与电脑端是**两个不同组件**，尺寸按 390 视口实测：
       .mobile_foot      padding 45.87px 22.93px、text-align center
       footer-belong     column / gap 45.87px / border-bottom 1px
       footer-logos      justify center / gap 5.73px / img 高 20.63px
       figure            column-reverse / gap 11.47px / padding 0 0 45.87px
       footer-links      row / padding 45.87px 0 / border-bottom 1px
         ul              column / gap 22.93px / padding 0 22.93px / 居中
         ul + ul         border-left 1px（列间竖线）
       footer-copyright  column / align center / gap 22.93px / padding 45.87px 0 0
     下列数值取整到 1px。 */

  /* 品牌区（含二维码）= footer-belong：横向栏距 23px，底部留 0 由 figure 自己撑 */
  .site-footer-inner {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 46px 23px 0;
    border-bottom: 1px solid #dcdcdc;
  }

  .site-footer-brand {
    flex-direction: column;
    align-items: center;
    gap: 46px;
    width: 100%;
  }

  .site-footer-qr-group {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
  }

  /* 参考站手机 footer-logos 是一张 293×20.63 的整图（约 14:1，字占高度 85%）。
     我方 ggsylogo.png 裁白边后是 6.53:1、字占高度 66%，照搬 20.63px 会让字只剩 13.6px。
     按「字形高与参考站观感相当」取 28px（字形高 ≈18.5px，与旧版 HTML 文字 18px 一致）。 */
  .site-footer-logo { height: 28px; }

  /* 二维码区 = footer-belong > figure：竖排（二维码在上、说明在下） */
  .site-footer-figure {
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    gap: 11px;
    text-align: center;
  }

  .site-footer-qr-group {
    padding: 0 0 46px;
  }

  .site-footer-figure figcaption {
    font-size: 14px;
    line-height: 19.5px;
  }

  .wx-qr-code > img {
    width: 103px;
    height: 103px;
  }

  /* 链接区 = footer-links：整块居中、两列并排、列间竖线。
     必须显式写 gap: 0 —— 桌面基类的 gap: 80px 会漏进来，把两列挤到换行。 */
  .site-footer-links {
    display: flex;
    gap: 0;
    width: 100%;
    padding: 46px 23px;
    border-bottom: 1px solid #dcdcdc;
    text-align: center;
  }

  /* 参考站每列 = 内容宽的 50%（344 下的 172px）、列内 23px 内边距、内容居中 */
  .site-footer-links ul {
    flex: 1;
    flex-direction: column;
    gap: 23px;
    padding: 0 23px;
  }

  .site-footer-links ul:nth-child(even) {
    border-left: 1px solid #dcdcdc;
  }

  .site-footer-links li {
    font-size: 14px;
    line-height: 19.5px;
  }

  .site-footer-links li:first-child {
    font-size: 18px;
    font-weight: 600;
    line-height: 27.5px;
  }

  /* 版权区 = footer-copyright：居中竖排，块间距 23px */
  .site-footer-copy {
    flex-direction: column;
    align-items: center;
    gap: 23px;
    width: 100%;
    /* 底部留白 = 固定操作条高度 + 呼吸空间。
       操作条 .invite-bottom-actions 高 = 10 + 48(min-height) + 10 + 1(border-top) = 69px */
    padding: 46px 23px calc(109px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 14px;
    line-height: 19.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   推荐官中心（用户后台）· 版式照搬「腾讯技术公益-管理台」
   复用品牌页骨架：overlayHeader + stickyHeader + brand-body + siteFooter；
   hero 换成团队头（姓名/已实名/邀请码/白胶囊退出），配色沿用品牌红。
   ========================================================================== */

.mgmt-hero {
  /* 128 = 60px 透明导航压顶 + 68px 留白（管理台蓝头部导航下的空隙） */
  padding: 128px 24px 60px;
}

.mgmt-hero-inner {
  position: relative;
  /* 与推荐页品牌框同宽（1008），不用管理台的 1264 —— 用户明确要求同框 */
  width: min(1008px, 100%);
  margin: 0 auto;
}

.mgmt-hero-heading { display: flex; align-items: center; }

.mgmt-hero-name {
  margin: 0;
  font-size: 48px;
  font-weight: 500;
  line-height: 56px;
  color: var(--mb-text-anti);
}

/* 桌面：胶囊与姓名同行右对齐（管理台「切换团队」位）；手机回文档流落到最下 */
.mgmt-hero-btn {
  position: absolute;
  top: 8px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 99px;
  background: #fff;
  color: rgba(0, 0, 0, 0.9);
  font-size: 14px;
  cursor: pointer;
}

.mgmt-hero-btn:hover { background: rgba(255, 255, 255, 0.9); }

.mgmt-hero-btn svg { width: 20px; height: 20px; }

/* 桌面端统一 1008 容器（= 推荐页品牌框宽度，.brand-hero-inner 同款）：
   用户明确否决管理台参考的 1264（「管理员页面的内容远远超出框太大了」），
   要求管理员页与推荐页共用同一个框 —— 左右留白、内容居中。
   覆盖 ≥1441 断点 is-wide 的 1056 与基础 720，保证与 hero/内容区同框。 */
@media (min-width: 769px) {
  .mgmt-page .mb-nav--overlay .mb-nav-inner {
    width: min(1008px, calc(100% - 48px));
    padding: 0;
  }

  .mgmt-page .sticky-header-inner {
    width: min(1008px, calc(100% - 48px));
    padding: 0;
  }
}

/* hero 链接行：照搬参考 account-org-recoginze —— flex、白字、16px、
   每项后跟一条 1px 白半透明竖线（::after），末项隐藏。
   桌面在姓名下方左对齐，手机在姓名与胶囊按钮之间。 */
.mgmt-hero-links {
  display: flex;
  align-items: center;
  margin-top: 20px;
  font-size: 16px;
  color: #fff;
}

.mgmt-hero-link {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.mgmt-hero-link::after {
  content: "";
  width: 1px;
  height: 21px;
  margin: 0 18px;
  background: rgba(255, 255, 255, 0.5);
}

.mgmt-hero-link:last-child::after { display: none; }

@media (hover: hover) {
  .mgmt-hero-link:hover { opacity: 0.85; }
}

/* 横向 tabs：手机端替代侧栏（桌面隐藏） */
.mgmt-tabs-strip { display: none; }

.mgmt-body-inner {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  /* 与推荐页品牌框同宽（1008）：侧栏 344 + gap 30 + 卡片 634。
     横向留白并进 width（calc），不用 padding 挤内容。 */
  width: min(1008px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0 80px;
}

.mgmt-menu {
  position: sticky;
  top: 16px;
  flex: 0 0 344px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 9px;
}

.mgmt-menu ul { margin: 0; padding: 0; list-style: none; }

.mgmt-menu-item {
  display: flex;
  align-items: center;
  height: 100px;
  padding: 0 10px 0 34px;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 500;
  color: var(--mb-text-primary);
  cursor: pointer;
}

.mgmt-menu-item svg { width: 32px; height: 32px; flex: none; }

.mgmt-menu-item span { margin-left: 8px; }

.mgmt-menu-item.is-active {
  background: #fff;
  color: var(--mb-brand);
}

.mgmt-content { flex: 1; min-width: 0; }

.mgmt-sec + .mgmt-sec { margin-top: 30px; }

.mgmt-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 500;
  color: #161616;
}

.mgmt-card {
  padding: 30px;
  background: var(--mb-bg-container);
  border-radius: 24px;
}

.mgmt-list { padding: 30px 0; }

.mgmt-list:first-child { padding-top: 0; }

.mgmt-list:last-child { padding-bottom: 0; }

.mgmt-list p {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}

.mgmt-value { font-size: 14px; color: rgba(0, 0, 0, 0.6); }

.mgmt-cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
}

.mgmt-cert-row:first-child { padding-top: 0; }

.mgmt-cert-row:last-child { padding-bottom: 0; }

.mgmt-cert-name {
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}

/* 证书行右侧：状态 tag + 查看证书链接并排 */
.mgmt-cert-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mgmt-cert-view {
  font-size: 14px;
  color: var(--mb-brand);
  text-decoration: none;
  white-space: nowrap;
}

.mgmt-cert-view:hover { text-decoration: underline; }

.mgmt-badge-claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
}

.mgmt-badge-claim p {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}

.mgmt-badge-claim img {
  display: block;
  width: 180px;
  height: auto;
  flex: none;
}

.mgmt-invite-url {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.6);
  word-break: break-all;
}

/* 邀请链接可直接点开：走品牌红 + 下划线，和右侧按钮区分开 */
a.mgmt-invite-url {
  display: block;
  color: var(--mb-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.mgmt-invite-url:hover { color: var(--mb-brand-hover); }

.mgmt-case { padding: 30px 0; }

.mgmt-case:first-child { padding-top: 0; }

.mgmt-case:last-child { padding-bottom: 0; }

.mgmt-case b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}

.mgmt-case p { margin: 10px 0 0; font-size: 14px; color: rgba(0, 0, 0, 0.6); }

/* 推荐记录分页（首屏那页由 dashboard 带回，翻页走 /member/api/cases） */
.mgmt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.55);
  font-size: 13px;
}

/* display:flex 会盖掉 [hidden] 的 UA 样式，必须显式关掉 */
.mgmt-pagination[hidden] { display: none; }

.mgmt-pagination .secondary { width: auto; min-width: 88px; }

.mgmt-pagination .secondary:disabled { cursor: not-allowed; opacity: 0.45; }

.mgmt-empty { margin: 0; font-size: 14px; color: rgba(0, 0, 0, 0.4); }

.mgmt-publication {
  position: relative;
  display: block;
  width: 100%;
  padding: 30px 36px 30px 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mgmt-publication:first-child { padding-top: 0; }

.mgmt-publication:last-child { padding-bottom: 0; border-bottom: 0; }

.mgmt-publication:hover .mgmt-publication-title { color: var(--mb-brand); }

.mgmt-publication-meta { display: flex; align-items: center; gap: 12px; color: rgba(0, 0, 0, 0.45); font-size: 13px; }

.mgmt-publication-kind { display: inline-flex; padding: 3px 9px; border-radius: 3px; color: #2468a2; background: #e8f3ff; line-height: 1.4; }

.mgmt-publication-kind.is-announcement { color: #ad6800; background: #fff7e6; }

.mgmt-publication-title { display: block; margin-top: 14px; color: rgba(0, 0, 0, 0.9); font-size: 20px; font-weight: 600; line-height: 1.45; transition: color 0.2s ease; }

.mgmt-publication-arrow { position: absolute; top: 50%; right: 2px; color: rgba(0, 0, 0, 0.3); font-size: 30px; line-height: 1; transform: translateY(-50%); }

.mgmt-publications-more { display: block; padding-top: 18px; color: var(--mb-brand); text-align: center; font-size: 14px; font-weight: 500; text-decoration: none; }

.mgmt-publications-more:hover { color: var(--mb-brand-hover); }

/* 新手引导：聚光框（box-shadow 挖洞遮罩）+ 说明气泡；不锁滚动，位置跟着页面走 */

.guide-spot {
  position: fixed;
  z-index: 3100;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.guide-bubble {
  position: fixed;
  z-index: 3101;
  width: min(320px, calc(100vw - 40px));
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.guide-count { margin: 0; color: var(--mb-brand); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.guide-title { margin: 8px 0 0; color: #161616; font-size: 17px; font-weight: 600; }

.guide-text { margin: 8px 0 0; color: rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 1.6; }

.guide-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }

.guide-skip { padding: 8px 4px; border: 0; background: none; color: rgba(0, 0, 0, 0.45); font-size: 14px; cursor: pointer; }

.guide-next { padding: 9px 22px; border: 0; border-radius: var(--mb-radius-round); background: var(--mb-brand); color: #fff; font-size: 14px; cursor: pointer; }

.guide-next:active { background: var(--mb-brand-active); }

/* 年度推荐榜入口卡：前三名预览 + 查看更多（完整榜单在独立页 /ranking） */
.rank-preview { padding: 22px 26px 18px; }

.rank-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rank-preview-head b { color: rgba(0, 0, 0, 0.9); font-size: 17px; font-weight: 500; }

.rank-preview-more { flex: none; color: var(--mb-brand); font-size: 13px; text-decoration: none; }

.rank-preview-more:hover { color: var(--mb-brand-hover); }

/* 行样式直接复用独立页的 .rk-list / .rk-row，前后台看到的是同一套排名 */
.rank-preview-list { margin-top: 4px; }

.rank-preview-me { margin: 14px 0 0; color: rgba(0, 0, 0, 0.55); font-size: 13px; line-height: 1.6; }

.rank-preview-me b { color: var(--mb-brand); }

/* 冲榜提示：距离上一名 / 上一段位还差几份 */
.rank-preview-gap { margin: 6px 0 0; color: rgba(0, 0, 0, 0.45); font-size: 13px; line-height: 1.6; }

.rank-preview-gap b { color: var(--mb-brand); font-weight: 600; }

.rank-preview-empty { margin: 16px 0 4px; }

.publication-list-card { padding: 36px 42px; border-radius: 16px; background: #fff; }

.publication-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(0, 0, 0, 0.08); color: rgba(0, 0, 0, 0.55); font-size: 13px; }

.publication-pagination .secondary { width: auto; min-width: 88px; }

.publication-pagination .secondary:disabled { cursor: not-allowed; opacity: 0.45; }

.publication-detail { padding: 40px 48px; border-radius: 16px; background: #fff; }

.publication-detail-header { padding-bottom: 18px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }

.publication-detail-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: rgba(0, 0, 0, 0.45); font-size: 13px; line-height: 1.5; }

.publication-detail-title { max-width: 820px; margin: 0; color: rgba(0, 0, 0, 0.9); font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.4; }

.publication-markdown { padding-top: 18px; color: rgba(0, 0, 0, 0.78); font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }

.publication-markdown > :first-child { margin-top: 0; }

.publication-markdown > :last-child { margin-bottom: 0; }

.publication-markdown h1,
.publication-markdown h2,
.publication-markdown h3,
.publication-markdown h4 { margin: 1.5em 0 0.65em; color: rgba(0, 0, 0, 0.9); line-height: 1.4; }

.publication-markdown h1 { font-size: 28px; }
.publication-markdown h2 { padding-bottom: 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 24px; }
.publication-markdown h3 { font-size: 20px; }
.publication-markdown h4 { font-size: 18px; }
.publication-markdown p { margin: 0 0 1em; }
.publication-markdown ul,
.publication-markdown ol { margin: 0 0 1em; padding-left: 2em; }
.publication-markdown a { color: #2468a2; text-decoration: underline; }
.publication-markdown img { display: block; max-width: 100%; height: auto; margin: 22px auto; border-radius: 8px; }
.publication-markdown blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--mb-brand); background: #f7f7f7; color: rgba(0, 0, 0, 0.62); }
.publication-markdown pre { max-width: 100%; padding: 16px; overflow: auto; border-radius: 8px; background: #1f2329; color: #f2f3f5; line-height: 1.6; }
.publication-markdown code { padding: 2px 5px; border-radius: 4px; background: #f2f3f5; font-family: Consolas, monospace; font-size: 0.9em; }
.publication-markdown pre code { padding: 0; background: transparent; color: inherit; }
.publication-markdown table { width: 100%; margin: 1em 0; border-collapse: collapse; }
.publication-markdown th,
.publication-markdown td { padding: 10px 12px; border: 1px solid rgba(0, 0, 0, 0.12); text-align: left; }
.publication-markdown th { background: #f7f7f7; }
.publication-back { margin-top: 32px; }

/* 移动端 ≤768：侧栏换横向滚动 tabs，蓝头部收紧、卡片缩小（与管理台手机版同构） */
@media (max-width: 768px) {
  .mgmt-menu { display: none; }

  /* 管理台手机端：固定页头（logo 栏）底部加白色半透明横线 ——
     参考管理台手机版 header 的 border-bottom:1px rgba(255,255,255,.2)。
     仅 mgmt-page 生效（邀请页参考无此线，共用 overlayHeader 不受影响）。
     滚到白底态时改用灰线，白半透明在白底上不可见。 */
  .mgmt-page .mb-nav--overlay { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
  .mgmt-page .mb-nav--overlay.is-scrolled { border-bottom: 1px solid var(--mb-border-1); }

  .mgmt-tabs-strip {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding: 9px 18px;
    background: #f4f4f4;
  }

  .mgmt-tab-item {
    flex: none;
    padding: 9px 0;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
  }

  .mgmt-tab-item.is-active { color: var(--mb-brand); font-weight: 500; }

  .mgmt-hero { padding: 96px 18px 34px; }

  .mgmt-hero-heading { display: block; }

  .mgmt-hero-name { font-size: 40px; line-height: 48px; }

  .mgmt-hero-btn { position: static; margin-top: 35px; }

  /* width:auto 抵消基类 calc(100%-48px)（390 下会缩成 342）；横向留白由 padding 18 负责 */
  .mgmt-body-inner { display: block; width: auto; padding: 0 18px 69px; }

  .mgmt-sec { padding-top: 35px; }

  .mgmt-sec + .mgmt-sec { margin-top: 0; }

  .mgmt-sec-title {
    margin-bottom: 27px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
  }

  .mgmt-card { padding: 18px; border-radius: 14px; }

  .mgmt-list p { font-size: 17px; }

  .mgmt-cert-name { font-size: 17px; }

  .mgmt-badge-claim { flex-direction: column; align-items: center; text-align: center; }

  .mgmt-badge-claim p { font-size: 17px; }

  .mgmt-case b { font-size: 17px; }

  .mgmt-pagination { gap: 10px; margin-top: 18px; padding-top: 16px; }

  .mgmt-pagination .secondary { min-width: 76px; padding-right: 12px; padding-left: 12px; }

  .mgmt-publication { padding: 24px 0; }

  .mgmt-publication-title { font-size: 18px; }

  .rank-preview { padding: 18px; }

  .rank-preview-head b { font-size: 16px; }

  .rank-preview-me { margin-top: 12px; }

  .publication-list-card { padding: 24px 18px; border-radius: 14px; }

  .publication-pagination { gap: 10px; margin-top: 24px; padding-top: 20px; }

  .publication-pagination .secondary { min-width: 76px; padding-right: 12px; padding-left: 12px; }

  .publication-detail { padding: 26px 20px; border-radius: 14px; }

  .publication-detail-header { padding-bottom: 16px; }

  .publication-detail-meta { gap: 10px; margin-top: 10px; font-size: 12px; }

  .publication-detail-title { font-size: 23px; line-height: 1.45; }

  .publication-markdown { padding-top: 16px; font-size: 15px; }

  .publication-markdown h1 { font-size: 24px; }
  .publication-markdown h2 { font-size: 21px; }
  .publication-markdown h3 { font-size: 18px; }
}

/* ============ 年度推荐榜（独立页 /ranking） ============
   版式参考活动榜单页：红色主视觉 → 白色圆角卡片上翻 → 虚线档位 tab → 头像行。
   和推荐官中心其它页面刻意不同：这里是一次性的活动页，不是后台。 */

.rk-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--mb-bg-container);
}

/* 微信/移动端地址栏收起时 100vh 会多出一截，支持 dvh 就用真实可视高度 */
@supports (min-height: 100dvh) {
  .rk-page { min-height: 100dvh; }
}

.rk-hero {
  position: relative;
  padding: 26px 24px 64px;
  background: linear-gradient(158deg, #e70012 0%, #c50a12 55%, #9c0d13 100%);
  color: #fff;
  text-align: center;
}

/* 主视觉底纹：两团淡光，避免整片纯红发闷 */
.rk-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 120px at 88% 10%, rgba(255, 214, 150, 0.24), transparent 70%),
    radial-gradient(200px 200px at 8% 92%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.rk-back {
  position: absolute;
  top: 14px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
}

.rk-back svg { width: 22px; height: 22px; }

.rk-back:active { background: rgba(255, 255, 255, 0.16); }

.rk-kicker {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.rk-title {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.rk-desc {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.rk-me {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 18px 0 0;
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--mb-radius-round);
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  line-height: 1.5;
}

.rk-me b { font-weight: 600; }

.rk-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: -34px;
  padding: 8px 18px 0;
  background: var(--mb-bg-container);
  border-radius: 24px 24px 0 0;
}

.rk-tabs {
  display: flex;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.28);
}

.rk-tab {
  position: relative;
  flex: 1;
  padding: 15px 0 14px;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.rk-tab.is-active { color: var(--mb-brand); font-weight: 600; }

/* 选中态：下划线压住虚线底边 + 中央小三角（照参考页的 on-line / on-triangle） */
.rk-tab.is-active::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--mb-brand);
}

.rk-tab.is-active::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  border-right: 4px solid transparent;
  border-bottom: 5px solid var(--mb-brand);
  border-left: 4px solid transparent;
}

/* 前三名领奖台：2-1-3 排列，第一名居中且更高 */
.rk-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 10px;
}

.rk-podium-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  max-width: 118px;
  padding: 16px 6px 14px;
  border-radius: 14px;
  background: #f7f8fa;
}

.rk-podium-item.is-1 {
  padding-top: 22px;
  padding-bottom: 18px;
  background: linear-gradient(180deg, #fff7e0, #fffdf8);
  box-shadow: inset 0 0 0 1px rgba(224, 162, 27, 0.25);
}

.rk-podium-item.is-2 {
  background: linear-gradient(180deg, #f2f5f8, #fbfcfd);
  box-shadow: inset 0 0 0 1px rgba(120, 136, 152, 0.16);
}

.rk-podium-item.is-3 {
  background: linear-gradient(180deg, #fbf1e7, #fdfaf6);
  box-shadow: inset 0 0 0 1px rgba(178, 118, 64, 0.18);
}

/* 自己在前三时整张卡描红，和列表里「我」的高亮同一套语义 */
.rk-podium-item.is-me { box-shadow: inset 0 0 0 2px var(--mb-brand); }

.rk-podium-avatar { position: relative; display: block; width: 52px; height: 52px; }

.rk-podium-item.is-1 .rk-podium-avatar { width: 60px; height: 60px; }

.rk-podium-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mb-brand-light);
  color: var(--mb-brand);
  font-size: 17px;
  font-weight: 500;
}

.rk-podium-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.rk-podium-medal {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.rk-podium-item.is-1 .rk-podium-medal { background: linear-gradient(135deg, #ffd76a, #e0a21b); color: #6b3f00; }

.rk-podium-item.is-2 .rk-podium-medal { background: linear-gradient(135deg, #e6ebf0, #b9c3cd); color: #414a54; }

.rk-podium-item.is-3 .rk-podium-medal { background: linear-gradient(135deg, #f3cfae, #cf955f); color: #6d3a10; }

.rk-podium-name {
  max-width: 100%;
  margin-top: 10px;
  overflow: hidden;
  color: #333;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-podium-score { margin-top: 3px; color: #8a6a1f; font-size: 12px; }

.rk-podium-score b { margin-right: 2px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 只有前三名（选中「前三」档）时：领奖台吃满剩余高度并垂直居中，
   卡也放大一档 —— 否则三张卡堆在顶部、下方一整片空白。 */
#rk-body.is-podium-only {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

#rk-body.is-podium-only .rk-podium { padding: 0; }

#rk-body.is-podium-only .rk-podium-item { max-width: 132px; padding: 22px 6px 20px; }

#rk-body.is-podium-only .rk-podium-avatar { width: 58px; height: 58px; }

#rk-body.is-podium-only .rk-podium-item.is-1 { padding-top: 28px; padding-bottom: 24px; }

#rk-body.is-podium-only .rk-podium-item.is-1 .rk-podium-avatar { width: 68px; height: 68px; }

#rk-body.is-podium-only .rk-podium-name { margin-top: 12px; font-size: 14px; }

#rk-body.is-podium-only .rk-podium-score { margin-top: 5px; font-size: 13px; }

#rk-body.is-podium-only .rk-podium-score b { font-size: 17px; }

#rk-body.is-podium-only .rk-note { margin-top: 16px; }

/* 领奖台与「第 4 名起」的列表之间用虚线分开 */
.rk-podium + .rk-list { margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(0, 0, 0, 0.1); }

.rk-list { margin: 0; padding: 0; list-style: none; }

.rk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rk-row:last-child { border-bottom: 0; }

.rk-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rk-row.is-top1 .rk-no { background: linear-gradient(135deg, #ffd76a, #e0a21b); color: #6b3f00; font-weight: 700; }

.rk-row.is-top2 .rk-no { background: linear-gradient(135deg, #e6ebf0, #b9c3cd); color: #414a54; font-weight: 700; }

.rk-row.is-top3 .rk-no { background: linear-gradient(135deg, #f3cfae, #cf955f); color: #6d3a10; font-weight: 700; }

.rk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mb-brand-light);
  color: var(--mb-brand);
  font-size: 14px;
  font-weight: 500;
}

.rk-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.rk-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #333;
  font-size: 15px;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-self {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--mb-brand);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 15px;
  vertical-align: 1px;
}

.rk-score { flex: none; color: #333; font-size: 13px; }

.rk-score b {
  margin-right: 4px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rk-row.is-me {
  margin: 0 -10px;
  padding: 6px 10px;
  border-bottom-color: transparent;
  border-radius: 10px;
  background: var(--mb-brand-light);
}

.rk-empty { margin: 44px 0; color: rgba(0, 0, 0, 0.4); font-size: 14px; text-align: center; }

.rk-load-fail { margin-top: 120px; }

.rk-note { margin: 16px 0 0; color: rgba(0, 0, 0, 0.4); font-size: 12px; text-align: center; }

/* 返回条：内容不足一屏时就是卡片底部那个按钮；
   榜单很长时（几百人）整条吸附在视口底部，滚到哪都能点。
   用 sticky + 底部白色渐隐，而不是 fixed 实心底栏 —— 不遮挡最后一名，
   也不需要在列表末尾补内边距；渐隐层 pointer-events:none，不挡列表操作。 */
.rk-dock {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: auto -18px 0;
  padding: 26px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 46%);
  pointer-events: none;
}

.rk-home {
  display: block;
  max-width: 320px;
  margin: 0 auto;
  padding: 12px 0;
  border: 1px solid var(--mb-border-2);
  border-radius: var(--mb-radius-round);
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .rk-page { max-width: 720px; margin: 0 auto; }

  .rk-hero { padding: 44px 32px 76px; border-radius: 0 0 26px 26px; }

  .rk-title { font-size: 32px; }

  .rk-desc { font-size: 14px; }

  .rk-me { font-size: 14px; }

  .rk-sheet { margin-top: -44px; padding: 10px 28px 0; border-radius: 26px; box-shadow: var(--mb-shadow-1); }

  .rk-podium { gap: 14px; padding: 20px 0 16px; }

  .rk-podium-item { max-width: 170px; padding: 24px 10px 22px; }

  .rk-podium-item.is-1 { padding-top: 32px; padding-bottom: 28px; }

  .rk-podium-avatar { width: 64px; height: 64px; }

  .rk-podium-item.is-1 .rk-podium-avatar { width: 76px; height: 76px; }

  .rk-podium-name { margin-top: 12px; font-size: 15px; }

  .rk-podium-score { font-size: 13px; }

  .rk-podium-score b { font-size: 17px; }

  #rk-body.is-podium-only .rk-podium-item { max-width: 190px; }

  .rk-dock { margin: auto -28px 0; padding-right: 28px; padding-left: 28px; }

  .rk-row { padding: 8px 0; }

  .rk-tab { font-size: 14px; }

  .rk-name { font-size: 16px; }

  .rk-avatar { width: 40px; height: 40px; }

  .rk-no { width: 28px; height: 28px; font-size: 15px; }
}
