/*
 * Unbound 统一登录 · 自建 Experience 页面样式（v13：页头页脚逐条复刻官网）
 * ------------------------------------------------------------------
 * v13 相对 v12：browser 分支的页头页脚改为「站内结构」，尺寸 / 字号 / 颜色逐条对齐
 *   browser.unb.ink 的 header.css、footer-unb36.css、chrome-unb10.css：
 *     页头 80px 白底吸顶、导航 15px/500 #1b2c50（hover #2d5aff）、右侧 下载/登录/注册、
 *          三个 mega 面板（白底 + 40px 上下留白 + 8px 圆角条目 hover #eef2ff）；
 *     页脚 CTA（32px/700）、Unbound Browser 大字水印（min(10.4vw,150px)/800 #eef3fa）、
 *          5 栏链接（列标题 14px/600、链接 13px #5f6e8c）、二维码列、版权条 12.5px。
 *   新类名统一带 site- 前缀，只在 .hdr--site / .ftr--site 下生效，不影响卡片与工作室分支。
 * 相对 unb10 的改动：
 *   1) 卡片排版换为「方案 B · 单卡片精修」：460px 单列卡片 + 浮动标签输入 + 顶部图形标志；
 *   2) 新增：密码显隐眼睛、密码强度实时条、Caps Lock 提示、条款勾选、按钮 loading 转圈；
 *   3) 动效只保留「淡入」：卡片首屏淡入一次；步骤切换仅一次 0.2s 透明度过渡。
 *      删掉了原先造成卡顿的两处：.bg-glow 的全屏 scale 呼吸动画（改为静态绝对层）、
 *      render() 里用 offsetWidth 强制回流重播动画（改为只切不重播）。
 *
 * 设计 token 两级：
 *   1) index.html 的 resolveTheme() 按当前 appId 注入品牌色（--brand 系列）；
 *   2) <html data-family> 决定整套设计语言 + 官网同款页头页脚：
 *        - 缺省 / browser ：对齐 https://browser.unb.ink （浅色 Apple 风 + 该站页头页脚）
 *        - unb           ：对齐 https://unb.ink （深色工作室风 + 该站页头页脚）
 *
 * 页头/页脚结构由 login-unb11.js 按 window.UNB_CHROME 渲染，本文件的组件类名与之对应：
 *   浅色（浏览器站）  .brand-logo / .nav-links a / .cta--ghost|primary / .footer-grid / .footer-bottom
 *   深色（工作室站）  .brand-mark / .nav-link(em+span) / .lang-switch
 *                     / .footer-top / .footer-prods / .footer-bar
 *
 * 品牌色优先级：应用级 color.primaryColor > 主题表 accent > 此处缺省紫 #6139F6。
 * 素材走同源 /branding/*（nginx 已挂 location ^~ /branding/）。
 * 文件名带 -unb11：Cloudflare 对静态资源按 URL 缓存 7 天，改内容必须换文件名才生效。
 */

/* ============ 缺省（浅色 Apple 风）：指纹浏览器站 / 管理台兜底 ============ */
:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "Segoe UI", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas,
    "JetBrains Mono", "Courier New", monospace;

  /* 品牌色：由 resolveTheme() 覆盖 */
  --brand: #6139f6;
  --brand-hover: #4f2bd4;
  --brand-ring: rgba(97, 57, 246, 0.16);
  --brand-soft: rgba(97, 57, 246, 0.06);
  --brand-lite: #9a7cf8;
  --brand-link: var(--brand);

  /* 表面 */
  --bg: #f5f5f7;
  --bg-alt: #fbfbfd;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --text: #1d1d1f;
  --dim: #6e6e73;
  --mute: #8e8e93;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);

  /* 形状 */
  --radius: 20px;
  --radius-sm: 14px;
  --btn-radius: 980px;
  --btn-weight: 600;
  --btn-h: 44px;
  --field-h: 58px;
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* 页头 */
  --hdr-h: 64px;
  --hdr-bg: rgba(251, 251, 253, 0.78);
  --hdr-blur: saturate(180%) blur(20px);

  /* 标题 */
  --title-size: 22px;
  --title-weight: 600;
  --title-spacing: -0.01em;
  --sub-size: 13px;

  /* 状态色 */
  --danger: #ff3b30;
  --danger-bg: rgba(255, 59, 48, 0.08);
  --danger-line: rgba(255, 59, 48, 0.24);
  --warn: #ff9f0a;
  --ok: #34c759;
  --ok-bg: rgba(52, 199, 89, 0.1);
  --ok-line: rgba(52, 199, 89, 0.3);

  --glow-opacity: 1;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============ 深色工作室风：Unbound 官网 https://unb.ink ============ */
:root[data-family="unb"] {
  color-scheme: dark;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --bg: #09090b;
  --bg-alt: #09090b;
  --panel: #0f0f12;
  --panel-2: #141418;
  --text: #fafafa;
  --dim: #8b8b95;
  --mute: #5c5c66;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);

  --radius: 10px;
  --radius-sm: 7px;
  --btn-radius: 8px;
  --btn-weight: 700;
  --card-shadow: 0 20px 46px rgba(0, 0, 0, 0.45);

  --hdr-h: 70px;
  --hdr-bg: rgba(9, 9, 11, 0.95);
  --hdr-blur: none;

  --title-size: 26px;
  --title-weight: 700;
  --title-spacing: -0.025em;

  --danger: #f87171;
  --danger-bg: rgba(220, 38, 38, 0.14);
  --danger-line: rgba(248, 113, 113, 0.3);
  --warn: #fbbf24;
  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, 0.12);
  --ok-line: rgba(74, 222, 128, 0.32);

  /* 深色下用更亮的品牌色作为链接/强调文字色（由 resolveTheme() 注入） */
  --brand-link: var(--brand-lite);
  --glow-opacity: 0.6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* 卡片后方的品牌色光晕：静态层，跟随当前应用主题色。
   上一版此处是全屏 fixed + scale 呼吸动画，造成大面积重绘卡顿，本版改绝对定位且不动画。 */
.bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--glow-opacity);
  z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--brand-ring), transparent 70%),
    radial-gradient(40% 40% at 85% 100%, var(--brand-soft), transparent 70%);
}

/* ==================== 页头：无界指纹浏览器官网同款 ==================== */

.hdr {
  position: relative;
  z-index: 2;
  flex: none;
  background: var(--hdr-bg);
  -webkit-backdrop-filter: var(--hdr-blur);
  backdrop-filter: var(--hdr-blur);
  border-bottom: 1px solid var(--line);
}

.hdr-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--hdr-h);
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.brand-mark {
  flex-shrink: 0;
  display: flex;
  height: 26px;
}

.brand-mark img {
  display: block;
  height: 100%;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-text em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  color: var(--dim);
  padding: 8px 14px;
  border-radius: 980px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 980px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.cta--ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.cta--ghost:hover {
  background: rgba(0, 0, 0, 0.09);
}

.cta--ghost.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.cta--primary {
  background: var(--brand);
  color: #fff;
}

.cta--primary:hover {
  background: var(--brand-hover);
}

.lang-switch {
  display: none;
}

/* ------- 页头：无界工作室官网同款（深色） ------- */

:root[data-family="unb"] .hdr-inner {
  gap: 20px;
}

:root[data-family="unb"] .brand {
  gap: 11px;
}

:root[data-family="unb"] .brand-text strong {
  font-size: 17px;
}

:root[data-family="unb"] .brand-text em {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-link);
  margin-top: 3px;
}

:root[data-family="unb"] .nav-links {
  gap: 0;
}

:root[data-family="unb"] .nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 14px;
  text-decoration: none;
}

:root[data-family="unb"] .nav-link em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  transition: color 0.2s var(--ease);
}

:root[data-family="unb"] .nav-link span {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dim);
  transition: color 0.2s var(--ease);
}

/* 官网导航项之间的 1px 竖线 */
:root[data-family="unb"] .nav-link + .nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 17px;
  background: var(--line-2);
}

:root[data-family="unb"] .nav-link:hover em,
:root[data-family="unb"] .nav-link.active em {
  color: var(--brand-link);
}

:root[data-family="unb"] .nav-link:hover span,
:root[data-family="unb"] .nav-link.active span {
  color: var(--text);
}

:root[data-family="unb"] .cta--ghost {
  margin-left: 18px;
  height: 34px;
  padding: 0 18px;
  border-radius: 7px;
  border-color: var(--line-2);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

:root[data-family="unb"] .cta--ghost:hover {
  color: var(--brand-link);
  border-color: var(--brand-ring);
  background: transparent;
}

:root[data-family="unb"] .lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}

:root[data-family="unb"] .lang-switch a {
  padding: 5px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

:root[data-family="unb"] .lang-switch a:hover {
  color: var(--text);
  background: rgba(127, 127, 150, 0.12);
}

:root[data-family="unb"] .lang-switch a.active {
  color: var(--brand-link);
}

/* ==================== 主体（登录卡片 · 方案 B） ==================== */

.auth {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 520px;
  /* 极浅的纵向渐变，卡片不再是一块纯色 */
  background-color: var(--panel);
  background-image: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 36px 32px;
  box-shadow: var(--card-shadow);
  animation: cardIn 0.42s var(--ease) both;
}

/* 卡片顶边的品牌色发丝线，跟随当前应用主题色 */
.card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.55;
}

.card-head {
  margin-bottom: 22px;
  text-align: center;
}

/* 卡片顶部品牌标志：浅色主题是 512×512 方形应用图标，深色主题是 300×184 横向字标，
   因此不能写死成正方形，否则字标会被压扁 → 统一用「定高 + 宽度自适应 + contain」 */
.card-mark {
  display: block;
  margin: 0 auto 14px;
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.card-head h1 {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.3;
  font-weight: var(--title-weight);
  letter-spacing: -0.02em;
}

.card-head .sub {
  margin: 0;
  font-size: var(--sub-size);
  color: var(--dim);
  line-height: 1.5;
  word-break: break-word;
}

/* ------------------------------ 步骤指示器 ------------------------------ */
/* 连接线必须是「单元格内的弹性尾巴」：li 定宽均分 + ::after 吃掉剩余空间，
   否则标签会被挤到各自单元格右侧，三个步骤的间距看起来忽大忽小 */
.steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  align-items: center;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.steps li:last-child {
  flex: none;
}

.steps li:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
  margin-left: 8px;
}

.steps li.done:not(:last-child)::after {
  background: var(--brand);
}

.steps li i {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-style: normal;
  border: 1px solid var(--line-2);
  color: var(--mute);
  font-family: var(--font-mono);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.steps li span {
  font-size: 11.5px;
  color: var(--mute);
  white-space: nowrap;
}

.steps li.done i {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.steps li.done span {
  color: var(--dim);
}

.steps li.cur i {
  border-color: var(--brand);
  color: var(--brand);
}

.steps li.cur span {
  color: var(--text);
}

/* 视图容器：步骤切换时只做一次透明度过渡（0.2s），不做位移/重播动画 */
.swap {
  transition: opacity 0.2s var(--ease);
}

/* 提示条：默认错误样式，--ok 为信息样式 */
.notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
}

.notice--ok {
  background: var(--brand-soft);
  border-color: var(--brand-ring);
  color: var(--brand-link);
}

/* ------------------------------ 登录入口切换（分段控件） ------------------------------ */

.seg {
  display: flex;
  width: 100%;
  gap: 2px;
  padding: 3px;
  margin-bottom: 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.seg-btn {
  flex: 1;
  font: inherit;
  font-size: 13px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

:root[data-family="unb"] .seg-btn.active {
  background: #26262c;
  box-shadow: none;
}

/* ------------------------------ 表单 ------------------------------ */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fld-control {
  position: relative;
}

/* 浮动标签：
   line-height 必须锁死为 1，否则行盒高度不会随字号收缩，上浮后的标签会压到输入文字上。
   上浮后标签占 9px ~ 20px；输入文字行从 padding-top 26px 开始 → 净空 6px。 */
.fld-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mute);
  transition: top 0.18s var(--ease), font-size 0.18s var(--ease),
    color 0.18s var(--ease);
}

.fld-control:focus-within .fld-label,
.fld-control.is-filled .fld-label {
  top: 9px;
  transform: translateY(0);
  font-size: 11px;
}

.fld-control:focus-within .fld-label {
  color: var(--brand-link);
}

.fld-input {
  width: 100%;
  height: 58px;
  padding: 26px 14px 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--panel-2);
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.fld-input::placeholder {
  color: var(--mute);
}

.fld-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
  background: var(--panel);
}

.fld.has-eye .fld-input {
  padding-right: 44px;
}

/* 密码显隐眼睛：控件高 58 / 上内边距 26 / 下内边距 6 → 文字行中心距顶 39，
   故上浮态图标中心也对齐到 39（top = 39 - 34/2 = 22）；空态未聚焦时回到控件中心 29 */
.eye {
  position: absolute;
  right: 4px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  transition: top 0.18s var(--ease), color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.fld-control:focus-within .eye,
.fld-control.is-filled .eye {
  top: 22px;
}

.eye:hover {
  color: var(--text);
  background: var(--brand-soft);
}

.eye:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.eye svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fld.is-error .fld-label {
  color: var(--danger);
}

.fld.is-error .fld-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

/* Caps Lock 提示 */
.caps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11.5px;
  color: var(--warn);
}

.caps svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.caps[hidden] {
  display: none;
}

/* 字段说明：浮动标签会把 placeholder 盖住，所以补充信息统一放在输入框下方 */
.fld-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--mute);
}

/* ------------------------------ 密码强度 ------------------------------ */

.pw {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pw-bars {
  flex: 1;
  display: flex;
  gap: 4px;
}

.pw-bars i {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 0.25s var(--ease);
}

/* 右侧强度文案：空态中性，评分后按强弱变色 */
.pw-state {
  flex: none;
  font-size: 11.5px;
  line-height: 1;
  color: var(--mute);
  transition: color 0.25s var(--ease);
}

.pw[data-score="1"] .pw-bars i:nth-child(-n + 1) {
  background: var(--danger);
}

.pw[data-score="1"] .pw-state {
  color: var(--danger);
}

.pw[data-score="2"] .pw-bars i:nth-child(-n + 2) {
  background: var(--warn);
}

.pw[data-score="2"] .pw-state {
  color: var(--warn);
}

.pw[data-score="3"] .pw-bars i:nth-child(-n + 3),
.pw[data-score="4"] .pw-bars i {
  background: var(--ok);
}

.pw[data-score="3"] .pw-state,
.pw[data-score="4"] .pw-state {
  color: var(--ok);
}

/* 规则做成描边胶囊：满足后转绿底 + 实心对勾（未满足只留淡淡的占位对勾，宽度不跳）
   两列等高网格，避免 flex 换行后末行只剩一颗的孤行；窄屏回到单列 */
.pw-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pw-rules li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 22px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  color: var(--dim);
  background: transparent;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.pw-rules li .pw-check {
  width: 11px;
  height: 11px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  transition: opacity 0.2s var(--ease);
}

.pw-rules li.ok {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.pw-rules li.ok .pw-check {
  opacity: 1;
}

@media (max-width: 380px) {
  .pw-rules {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------ 条款勾选 ------------------------------ */

.agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
  cursor: pointer;
  user-select: none;
}

.agree input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.agree-box {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--panel-2);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.agree-box svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.16s var(--ease);
}

.agree input:checked + .agree-box {
  background: var(--brand);
  border-color: var(--brand);
}

.agree input:checked + .agree-box svg {
  opacity: 1;
}

.agree input:focus-visible + .agree-box {
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.agree a {
  color: var(--brand-link);
  text-decoration: none;
}

.agree a:hover {
  text-decoration: underline;
}

.agree.is-error .agree-box {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

/* ------------------------------ 主按钮 ------------------------------ */

.btn-primary {
  position: relative;
  height: 48px;
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: var(--btn-radius);
  background-color: var(--brand);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  color: #fff;
  font-size: 15px;
  font-weight: var(--btn-weight);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px -10px var(--brand);
  transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease),
    transform 0.16s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px var(--brand);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px -8px var(--brand);
}

.btn-primary:disabled {
  opacity: 0.72;
  cursor: default;
}

.btn-primary .spin {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.68s linear infinite;
}

.btn-primary .spin[hidden] {
  display: none;
}

.card-foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.card-foot a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--brand-link);
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

.card-foot a:hover {
  background: var(--brand-soft);
}

.card-foot .muted,
.card-foot .dot {
  color: var(--dim);
}

.card-foot a[aria-disabled="true"] {
  color: var(--mute);
  pointer-events: none;
}

/* ==================== 页脚：无界指纹浏览器官网同款 ==================== */

.ftr {
  position: relative;
  z-index: 1;
  flex: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 52px 0 32px;
}

.ftr-inner {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  max-width: 420px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  display: block;
}

.footer-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-brand p {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  gap: 4px 8px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--dim);
  padding: 6px 12px;
  border-radius: 980px;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  flex-wrap: wrap;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-legal p {
  margin: 0;
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.65;
  max-width: 640px;
}

.footer-maker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.footer-maker-logo {
  height: 35px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.footer-maker-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-maker-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-maker-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

.footer-maker-en {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1;
  color: var(--mute);
}

.footer-maker-sub {
  font-size: 11.5px;
  line-height: 1;
  color: var(--mute);
  transition: color 0.25s var(--ease);
}

.footer-maker:hover .footer-maker-name,
.footer-maker:hover .footer-maker-sub {
  color: var(--brand);
}

/* ------- 页脚：无界工作室官网同款（深色） ------- */

:root[data-family="unb"] .ftr {
  padding: 64px 0 34px;
  overflow: hidden;
}

/* 官网页脚的点阵纹理 */
:root[data-family="unb"] .ftr::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
  mask-image: linear-gradient(180deg, #000, transparent 80%);
  pointer-events: none;
}

:root[data-family="unb"] .ftr-inner {
  position: relative;
  z-index: 1;
}

:root[data-family="unb"] .footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}

:root[data-family="unb"] .footer-lead {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

:root[data-family="unb"] .footer-brand {
  align-items: center;
  gap: 13px;
  max-width: none;
}

:root[data-family="unb"] .footer-brand img {
  width: auto;
  height: 34px;
  border-radius: 0;
}

:root[data-family="unb"] .footer-brand strong {
  font-size: 19px;
  color: #fafafa;
  margin-bottom: 0;
}

:root[data-family="unb"] .footer-brand p {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--mute);
}

:root[data-family="unb"] .footer-claim {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #a1a1aa;
}

:root[data-family="unb"] .footer-prods {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

:root[data-family="unb"] .footer-prods a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.015);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

:root[data-family="unb"] .footer-prods a:hover {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(255, 255, 255, 0.035);
}

:root[data-family="unb"] .footer-prods img {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
}

:root[data-family="unb"] .footer-prods b {
  flex: 1;
  font-size: 14.5px;
  font-weight: 700;
  color: #fafafa;
}

:root[data-family="unb"] .footer-prods .ic {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--mute);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

:root[data-family="unb"] .footer-prods a:hover .ic {
  color: var(--brand-link);
  transform: translate(2px, -2px);
}

:root[data-family="unb"] .footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

:root[data-family="unb"] .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: -11px;
}

:root[data-family="unb"] .footer-nav a {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

:root[data-family="unb"] .footer-nav a:hover {
  color: #fafafa;
  background: rgba(255, 255, 255, 0.06);
}

:root[data-family="unb"] .footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

:root[data-family="unb"] .footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.noscript {
  position: relative;
  z-index: 1;
  margin: 0 auto 24px;
  padding: 12px 16px;
  max-width: 420px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

/* ==================== 响应式 ==================== */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  :root[data-family="unb"] .lang-switch {
    display: none;
  }

  .cta {
    margin-left: auto;
  }

  :root[data-family="unb"] .cta--ghost {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .hdr-inner,
  .ftr-inner {
    width: 100%;
    padding: 0 16px;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .cta {
    padding: 8px 14px;
    font-size: 12.5px;
  }

  .auth {
    padding: 32px 16px;
  }

  .card {
    padding: 26px 22px 24px;
  }

  .card-head h1 {
    font-size: 22px;
  }

  .footer-grid {
    flex-direction: column;
    gap: 28px;
  }

  :root[data-family="unb"] .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  :root[data-family="unb"] .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ==================== 动效（只保留淡入） ==================== */
/* 登录页是功能页，动效克制：卡片首屏淡入一次；步骤切换由 JS 给 .swap 切一次透明度。
   全部只用 opacity / transform，不做强制回流重播、不做全屏循环动画。 */

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* 无障碍兜底：系统开启「减弱动态效果」时，停掉全部动画与过渡 */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==================================================================
   v13：站内结构页头 / 页脚（browser.unb.ink 同款）
   只在 :root[data-family="browser"] 下启用；unb（工作室）分支仍走上面的深色结构。
   数值对齐：header.css（nav 80px / 导航项 margin 0 10px / 条目 64px）、
   chrome-unb10.css（logo 34px、注册 36px r18 #2d5aff）、
   footer-unb36.css（CTA 184px、按钮 144×44 r100、水印 min(10.4vw,150px)、
   链接区 56/52、filing 22/24）。
   ================================================================== */

:root[data-family="browser"] {
  --hdr-h: 80px;
  --site-ink: #1b2c50;
  --site-sub: #5f6e8c;
  --site-blue: #2d5aff;
}

/* 页头改为 fixed 后，用 body 顶部留白把正文让出来（box-sizing 已全局 border-box，
   仍占满一屏，不会出现多余的纵向滚动） */
:root[data-family="browser"] body {
  padding-top: var(--hdr-h);
}

/* 官网页头页脚是纯白底，卡片后方的品牌光晕会透到页脚，这里只保留卡片区 */
:root[data-family="browser"] .bg-glow {
  bottom: auto;
  /* 它从 body、即视口顶部开始（页头已由 body padding-top 让位），
     所以高度必须是整屏 100vh；写成 100vh - 页头会在底部漏出一条白底。 */
  height: 100vh;
}

/* 光晕的径向渐变到卡片下方就已衰完，再往下只剩 body 的 #f5f5f7，
   与页脚纯白相接时会在登录区底部显出一条深浅不同的横带。
   这里给登录区自己叠一层向白色渐隐的遮罩：色带留在中途自然淡出，
   底部与白色页脚同色对接，不再出现硬边。 */
:root[data-family="browser"] .auth {
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 46%,
    rgba(255, 255, 255, 0.72) 80%,
    #ffffff 100%
  );
}

/* ---------------------------- 页头 ---------------------------- */

.hdr--site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--hdr-h);
  max-width: 100vw;
  margin: 0 auto;
  padding: 0 30px;
}

/* 横版 logo：图标 34px + 「无界指纹浏览器」19px/700 */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: auto;
  height: 34px;
}

.site-logo-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.2px;
  color: var(--site-ink);
  white-space: nowrap;
}

.site-logo-text b {
  font-weight: 700;
}

/* 6 项导航：绝对居中，与左右两侧互不挤压 */
.site-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu-li {
  margin: 0 10px;
  white-space: nowrap;
}

.site-menu-a {
  display: flex;
  align-items: center;
  height: var(--hdr-h);
  padding: 0 10px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--site-ink);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-menu-a:hover,
.site-menu-li.is-active > .site-menu-a {
  color: var(--site-blue);
}

.site-caret {
  display: inline-flex;
  width: 13px;
  height: 13px;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.site-caret svg {
  width: 100%;
  height: 100%;
  display: block;
}

.site-menu-li.is-active .site-caret {
  transform: rotate(180deg);
}

/* 右侧操作区：下载 | 登录 | 注册 */
.site-acts {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: var(--hdr-h);
}

.site-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--site-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-dl svg {
  width: 18px;
  height: 18px;
  display: block;
}

.site-dl:hover {
  color: var(--site-blue);
}

.site-sep {
  width: 1px;
  height: 14px;
  margin: 0 18px;
  background: #ececec;
}

.site-login {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  color: var(--site-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-login:hover {
  color: var(--site-blue);
}

.site-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-left: 18px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--site-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.site-register:hover {
  background: #1e46e0;
}

/* mega 面板：白底、贴满页头宽度、顶到页头下沿 */
.site-panels {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.site-panels.is-open {
  opacity: 1;
  visibility: visible;
}

.site-panel {
  display: none;
  padding: 40px 0;
}

.site-panel.is-active {
  display: block;
}

.site-panel-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  width: calc(100% - 80px);
  max-width: 948px;
  margin: 0 auto;
}

/* 解决方案只有 5 项，按官网 254px 三列排（末行两项）：条目直接铺成三列网格 */
.site-panel-wrap--solutions {
  display: block;
  max-width: 862px;
}

.site-panel-wrap--solutions .site-panel-title {
  display: none;
}

.site-panel-wrap--solutions .site-panel-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
}

.site-panel-col {
  min-width: 0;
}

.site-panel-title {
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid #d8d8d8;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--site-ink);
}

.site-panel-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-item {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.25s ease;
}

.site-item:hover {
  background: #eef2ff;
}

.site-item-ico {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-right: 16px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
}

.site-item-txt {
  min-width: 0;
}

.site-item-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--site-ink);
  transition: color 0.2s ease;
}

.site-item:hover .site-item-title {
  color: var(--site-blue);
}

.site-item-sub {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 18px;
  color: var(--site-ink);
}

/* NEW / HOT 角标（官方 mark-new.png / mark-hot.png） */
.site-item-title--new::after,
.site-item-title--hot::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 14px;
  margin-left: 8px;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
}

.site-item-title--new::after {
  background-image: url("https://browser.unb.ink/images/header/core/mark-new.png");
}

.site-item-title--hot::after {
  background-image: url("https://browser.unb.ink/images/header/core/mark-hot.png");
}

.site-panel-wrap--solutions .site-item {
  min-height: 72px;
  padding: 0 25px 0 20px;
}

/* ---------------------------- 页脚 ---------------------------- */

.ftr--site {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 0;
  background: #fff;
  border-top: 0;
  overflow: hidden;
  color: var(--site-ink);
  font-size: 14px;
}

.site-wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* 1) CTA 区 */
.site-ftr-cta {
  padding: 184px 0 0;
}

.site-ftr-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.2px;
  color: var(--site-ink);
}

.site-ftr-tips {
  max-width: 560px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--site-sub);
}

.site-ftr-btns {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.site-ftr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 144px;
  height: 44px;
  padding: 0 24px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.24s ease;
}

.site-ftr-btn--primary {
  background: linear-gradient(135deg, #2d5aff 0%, #1f7bff 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(45, 90, 255, 0.22);
}

.site-ftr-btn--primary:hover {
  background: linear-gradient(135deg, #1f4ce8 0%, #1668e8 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(45, 90, 255, 0.28);
}

.site-ftr-btn--plain {
  background: #fff;
  border: 1px solid #dfe6f3;
  color: #2b3a57;
  box-shadow: 0 1px 2px rgba(16, 30, 60, 0.05);
}

.site-ftr-btn--plain:hover {
  border-color: #b9c8e6;
  color: var(--site-ink);
  transform: translateY(-1px);
}

.site-ftr-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 13px;
  color: #98a4b8;
}

.site-ftr-note::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35c07a;
}

/* 2) 大字水印 + 角色 */
.site-ftr-wordmark {
  padding-top: 84px;
  border-bottom: 1px solid #ebebeb;
}

.site-ftr-wordmark .site-wrap {
  position: relative;
  /* 不能给这里加 overflow:hidden：AI 角色是向上溢出的（顶部与 CTA 文案齐平），
     一旦裁剪就会只剩下半截。只在底部裁切由 clip-path 负责（与官网一致）。 */
  clip-path: inset(-999px -999px 0 -999px);
}

.site-ftr-brand {
  position: relative;
  display: block;
  line-height: 1;
  transform: translateY(clamp(10px, 1.2vw, 16px));
}

.site-ftr-word {
  position: relative;
  z-index: 2;
  display: block;
  font-family: Inter, -apple-system, "Segoe UI", "PingFang SC", sans-serif;
  font-size: min(10.8vw, 172px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: #eef3fa;
  white-space: nowrap;
}

.site-ftr-mascot {
  position: absolute;
  right: -3.5%;
  bottom: 0;
  z-index: 1;
  display: block;
  width: min(27vw, 464px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(45, 90, 255, 0.14));
}

/* 3) 链接区 */
.site-ftr-cols {
  padding: 56px 0 52px;
  background: #fff;
  border-top: 1px solid #f0f3f8;
}

.site-ftr-cols ul.site-wrap {
  display: flex;
  align-items: flex-start;
  gap: 44px;
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
}

.site-ftr-cols ul.site-wrap > li {
  flex: 1 1 0;
  min-width: 0;
}

.site-ftr-brandcol {
  flex: 0 0 210px !important;
  padding-right: 12px;
}

.site-ftr-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--site-ink);
  text-decoration: none;
}

.site-ftr-logo img {
  display: block;
  width: auto;
  height: 34px;
}

.site-ftr-desc {
  margin: 18px 0 16px;
  font-size: 13px;
  line-height: 1.75;
  color: #7c8aa4;
}

.site-ftr-coltitle {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--site-ink);
}

.site-ftr-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-ftr-links a {
  font-size: 13px;
  line-height: 1.5;
  color: var(--site-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-ftr-links a:hover {
  color: var(--site-blue);
}

/* 产品功能 / 资源两栏条目多，宽屏下分两列排 */
.site-ftr-col--long {
  flex: 2.6 1 0 !important;
}

@media (min-width: 1200px) {
  .site-ftr-links--flow {
    display: block;
    column-count: 2;
    column-gap: 28px;
  }

  .site-ftr-links--flow a {
    display: block;
    margin-bottom: 14px;
    break-inside: avoid;
  }
}

.site-ftr-qrcol {
  display: none;
}

@media (min-width: 1280px) {

  /* 与官网一致：宽屏隐藏品牌列，二维码列顶到最右 */
  .site-ftr-brandcol {
    display: none;
  }

  .site-ftr-cols ul.site-wrap {
    gap: 18px;
  }

  .site-ftr-qrcol {
    display: flex;
    flex: 0 0 240px !important;
    flex-direction: column;
    gap: 14px;
    margin-left: auto;
  }

  .site-ftr-qrcodes {
    display: flex;
    gap: 10px;
  }

  .site-ftr-qr {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 7px 6px 8px;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    background: #fff;
    text-align: center;
    text-decoration: none;
    transition: 0.22s ease;
  }

  .site-ftr-qr img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
  }

  .site-ftr-qr span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    color: #6b7a99;
    white-space: nowrap;
  }

  .site-ftr-qr:hover {
    border-color: #c9dcff;
    box-shadow: 0 8px 20px rgba(45, 90, 255, 0.1);
    transform: translateY(-2px);
  }

  .site-ftr-iclinks {
    display: flex;
    gap: 8px;
  }

  .site-ftr-iclinks a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e6ecf5;
    border-radius: 9px;
    background: #fff;
    color: #5b6b88;
    transition: 0.22s ease;
  }

  .site-ftr-iclinks a:hover {
    color: var(--site-blue);
    border-color: #bcd0ff;
    background: #f4f8ff;
    transform: translateY(-2px);
  }

  .site-ftr-iclinks svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* 4) 版权条 */
.site-ftr-filing {
  padding: 22px 24px;
  border-top: 1px solid #eef2f8;
  background: #fff;
}

.site-provider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  max-width: 1360px;
  margin: 0 auto;
  font-size: 12.5px;
  color: #939db1;
}

.site-provider > span {
  margin-right: auto;
}

.site-provider a {
  color: #7d8aa2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-provider a:hover {
  color: var(--site-blue);
}

/* ---------------------------- 响应式 ---------------------------- */

/* 1024–1199px：官网收紧导航外边距，避免与 logo / 操作区相撞 */
@media (max-width: 1199px) {
  .site-menu-li {
    margin: 0 4px;
  }

  .site-menu-a {
    padding: 0 6px;
  }
}

/* 平板/手机：导航与面板收起，只留 logo + 登录/注册（与官网移动端一致） */
@media (max-width: 1023px) {
  :root[data-family="browser"] {
    --hdr-h: 64px;
  }

  .site-menu,
  .site-panels,
  .site-dl,
  .site-sep {
    display: none;
  }

  .site-nav {
    padding: 0 16px;
  }

  .site-logo,
  .site-logo img {
    height: 30px;
  }

  .site-logo-text {
    font-size: 16.5px;
  }

  .site-ftr-cta {
    padding-top: 72px;
  }

  .site-ftr-wordmark {
    padding-top: 56px;
  }

  .site-ftr-mascot {
    right: -1%;
  }
}

@media (max-width: 820px) {
  .site-ftr-cta {
    padding-top: 56px;
    /* 品牌区在窄屏被隐藏后，这里要自己补上距下方分隔线的留白 */
    padding-bottom: 44px;
    text-align: center;
  }

  /* CTA 与下方的品牌锁定区共用一条中轴线，否则宽屏居中、窄屏居左会读成两套版式 */
  .site-ftr-btns,
  .site-ftr-note {
    justify-content: center;
  }

  .site-ftr-title {
    font-size: 26px;
  }

  .site-ftr-btns {
    flex-wrap: wrap;
  }

  /* 手机版去掉整块品牌区（AI 角色 + 英文大字 + 分隔线）：
     小屏上两者宽度接近，无论叠压还是上下排列都只会撑出一段无意义的留白 */
  .site-ftr-wordmark {
    display: none;
  }

  .site-ftr-cols {
    padding: 20px 0 28px;
  }

  .site-ftr-cols ul.site-wrap {
    display: block;
  }

  .site-ftr-brandcol {
    display: none;
  }

  .site-ftr-col,
  .site-ftr-col--long {
    width: 100%;
    border-bottom: 1px solid #eef2f8;
  }

  .site-ftr-coltitle {
    margin: 0;
    padding: 14px 4px;
  }

  .site-ftr-links,
  .site-ftr-links--flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    column-count: auto;
    padding-bottom: 10px;
  }

  .site-ftr-links a,
  .site-ftr-links--flow a {
    display: block;
    margin: 0;
    padding: 8px 4px;
    font-size: 13.5px;
  }

  .site-provider {
    justify-content: center;
    text-align: center;
  }

  .site-provider > span {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  .site-logo-text {
    font-size: 15px;
  }

  .site-register {
    height: 34px;
    margin-left: 12px;
    padding: 0 12px;
    font-size: 13px;
  }
}

/* 超宽屏（2K/4K）：卡片与页脚内容再放一档，避免中间一条过窄 */
@media (min-width: 1600px) {
  .card {
    max-width: 560px;
    padding: 40px 40px 34px;
  }

  .site-wrap,
  .site-provider {
    max-width: 1480px;
  }

  .site-ftr-cta {
    padding-top: 200px;
  }
}

/* ==================== 登录卡片纵向节奏（browser 分支） ====================
   v13 把卡片加宽到 520/560 后，纵向仍是原来的紧凑节奏（字段间 14px、
   卡片内边距 36/32），在宽卡片里显得压得很紧。这里只放宽纵向：
   登录区至少一屏高、卡片上下留白加厚、标题/分段/字段/按钮之间的间距拉大。
   不改字段高度，避免与浮动标签、密码眼睛的定位计算错位。 */
:root[data-family="browser"] .auth {
  box-sizing: border-box;
  padding: 96px 24px 104px;
  min-height: calc(100vh - var(--hdr-h));
}

:root[data-family="browser"] .card {
  padding: 46px 42px 40px;
  border-radius: 24px;
}

:root[data-family="browser"] .card-head {
  margin-bottom: 30px;
}

:root[data-family="browser"] .card-mark {
  height: 44px;
  margin: 0 auto 18px;
}

:root[data-family="browser"] .card-head h1 {
  margin-bottom: 10px;
  font-size: 26px;
}

:root[data-family="browser"] .card-head .sub {
  font-size: 14px;
}

:root[data-family="browser"] .seg {
  margin-bottom: 26px;
  padding: 4px;
  border-color: transparent;
  border-radius: 14px;
  /* 白卡上再画白底分不出选中项，容器改用淡灰槽底（与卡片白底形成层次） */
  background: rgba(0, 0, 0, 0.05);
}

:root[data-family="browser"] .seg-btn {
  padding: 10px 16px;
  font-size: 13.5px;
  border-radius: 10px;
  font-weight: 500;
}

/* 选中项：白底 + 品牌色文字 + 投影，与未选中的灰字形成明显对比 */
:root[data-family="browser"] .seg-btn.active {
  background: var(--panel);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

:root[data-family="browser"] .form {
  gap: 18px;
}

:root[data-family="browser"] .fields {
  gap: 16px;
}

:root[data-family="browser"] .btn-primary {
  height: 52px;
  margin-top: 8px;
  font-size: 15.5px;
}

:root[data-family="browser"] .card-foot {
  margin-top: 22px;
  font-size: 13.5px;
}

@media (min-width: 1600px) {
  :root[data-family="browser"] .auth {
    padding: 120px 24px 128px;
  }

  :root[data-family="browser"] .card {
    padding: 52px 46px 44px;
  }
}

/* 上面的 browser 作用域规则特异性高于原有的 560px 媒体查询，
   小屏必须再盖一层，否则手机上会把 46px/42px 的内边距全叠上去 */
@media (max-width: 560px) {
  :root[data-family="browser"] .auth {
    padding: 40px 16px 56px;
  }

  :root[data-family="browser"] .card {
    padding: 30px 22px 26px;
  }

  :root[data-family="browser"] .card-head {
    margin-bottom: 22px;
  }

  :root[data-family="browser"] .card-head h1 {
    font-size: 22px;
  }

  :root[data-family="browser"] .seg {
    margin-bottom: 20px;
  }

  :root[data-family="browser"] .form,
  :root[data-family="browser"] .fields {
    gap: 14px;
  }

  :root[data-family="browser"] .btn-primary {
    height: 48px;
  }
}

/* ==================== 登录区背景：品牌徽标水印（browser 分支） ====================
   用官网的新品牌标记（圆角方块 + 断角框 + U 字标）做两枚超大水印：一枚压右下、
   一枚在左上，对角呼应，都是低不透明度 + 轻微旋转，
   叠在浅蓝光晕上像一层品牌底纹；卡片不透明，水印会在它后方自然断续。
   - 用的是页头同一个文件（browser.unb.ink/assets/img/logo-unb2.png，横版 720×488）；
   - 只作用于 browser 分支，unb.ink 深色登录页不受影响。 */
:root[data-family="browser"] .auth {
  overflow: hidden;
}

:root[data-family="browser"] .auth::before,
:root[data-family="browser"] .auth::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-image: url("https://browser.unb.ink/assets/img/logo-unb2.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* 右下：主水印，整枚 logo 可见（只被卡片遮住左侧一段），像盖在画面上的品牌印章 */
:root[data-family="browser"] .auth::before {
  right: min(4vw, 60px);
  bottom: 6vh;
  width: min(46vw, 560px);
  aspect-ratio: 720 / 488;
  opacity: 0.06;
  transform: rotate(-8deg);
}

/* 左上：副水印，更小更淡，故意被画面边缘切掉一角 */
:root[data-family="browser"] .auth::after {
  left: -9vw;
  top: 4vh;
  width: min(28vw, 380px);
  aspect-ratio: 720 / 488;
  opacity: 0.04;
  transform: rotate(12deg);
}

/* 小屏：右侧主水印改为贴边裁切，第二枚直接隐藏，避免与卡片重叠显脏 */
@media (max-width: 820px) {
  :root[data-family="browser"] .auth::before {
    right: -16vw;
    bottom: 4vh;
    width: min(78vw, 420px);
    opacity: 0.1;
  }

  :root[data-family="browser"] .auth::after {
    display: none;
  }
}

/* 当前页对应的入口（登录页的「登录」、注册页的「注册」）：
   外观不变，只去掉手型与点击，避免重新发起授权把表单内容冲掉 */
.site-login.is-current,
.site-register.is-current {
  cursor: default;
  pointer-events: none;
}

/* 纹样在伪元素上，卡片必须显式压在上面（否则堆叠顺序依赖文档流） */
:root[data-family="browser"] .card {
  z-index: 1;
}

/* ------------------------------ 第三方登录（分组标题 + 并排胶囊） ------------------------------ */
/* 分组标题先告诉用户“这里可以用第三方账号”；胶囊并排而不是通栏堆叠，品牌蓝仍只属于主操作 */
.social {
  /* 与下方分隔线的 6px 折叠后取较大值，让分隔线与切换控件之间留出呼吸感 */
  margin: 0 0 20px;
}

.social-hint {
  margin: 0 0 9px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.4;
  /* 与上方副标题同为居中拉齐，避免卡片内出现两种对齐方式 */
  text-align: center;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* 只配了一到两个渠道时收窄列数，避免按钮被拉成超大号 */
.social-grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.social-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  height: var(--btn-h);
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--btn-radius);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.social-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--dim);
}

/* 悬停时描边染成该品牌色，三枚按钮各具辨识度 */
.social-btn[data-brand="telegram"]:hover:not(:disabled) {
  border-color: #26a5e4;
}

.social-btn[data-brand="discord"]:hover:not(:disabled) {
  border-color: #5865f2;
}

.social-btn[data-brand="gitlab"]:hover:not(:disabled) {
  border-color: #fc6d26;
}

.social-btn[data-brand="google"]:hover:not(:disabled) {
  border-color: #4285f4;
}

.social-btn:active:not(:disabled) {
  transform: scale(0.995);
}

.social-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.social-btn:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.social-g {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: none;
}

.social-g svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 分隔线：两侧细线 + 中间说明文字，告诉用户下面仍是熟悉的邮箱流程 */
.social-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  color: var(--mute);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.social-or::before,
.social-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 窄屏保持并排一行（三个竖着太长）：压缩图标、字号与内边距，把品牌名塞进 1/3 屏宽 */
@media (max-width: 560px) {
  .social-grid {
    gap: 8px;
  }

  .social-btn {
    gap: 6px;
    padding: 0 6px;
    font-size: 12px;
  }

  .social-g {
    width: 16px;
    height: 16px;
  }
}
