/* ==========================================================================
   OS-Link 官网样式
   风格：苹果式大留白 + 包豪斯网格 / 几何 / 黑白灰 + 单一强调色
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #1f2329;
  --muted: #646a73;
  --line: #dee3e8;
  --surface: #f5f6f7;
  --accent: #0066ff;
  --accent-ink: #0047b3;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

.muted { color: var(--muted); }
/* 蜜罐字段：对真人不可见，用于识别机器人 */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.section-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

/* ------------------------------- 顶部导航 ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; gap: 4px; justify-self: center; }
.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--muted);
  border-radius: 8px;
  transition: color .2s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); font-weight: 500; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}
.lang-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.lang-btn.is-active { background: var(--ink); color: #fff; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { width: 16px; height: 1.5px; background: var(--ink); display: block; }

/* -------------------------------- 按钮 --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-on-dark { background: #fff; color: #0f1115; }
.btn-on-dark:hover { background: rgba(255, 255, 255, .86); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* -------------------------------- 区块 --------------------------------- */
.section { padding: clamp(36px, 4.4vw, 68px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: clamp(20px, 2.4vw, 34px); }
.section-head h2 { font-size: clamp(24px, 3vw, 36px); }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.eyebrow {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(32px, 5vw, 54px); }
.page-head p { color: var(--muted); margin-top: 16px; font-size: 18px; max-width: 60ch; }

/* -------------------------------- 首屏 --------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(36px, 5vw, 72px) 0 clamp(32px, 4vw, 60px); }
.hero-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-deco .shape { position: absolute; opacity: .5; }
.hero-deco .grid-lines {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 96px);
  opacity: .28;
  -webkit-mask-image: radial-gradient(120% 80% at 70% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 80% at 70% 30%, #000 0%, transparent 70%);
}
.hero-deco .circle {
  width: 220px; height: 220px;
  border: 1px solid var(--line);
  border-radius: 50%;
  right: -60px; top: 40px;
}
.hero-deco .square {
  width: 140px; height: 140px;
  border: 1px solid var(--line);
  right: 120px; bottom: -40px;
  transform: rotate(12deg);
}
.hero-deco .triangle {
  width: 120px; height: 104px;
  background: var(--surface);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  left: -40px; bottom: 40px;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 62px);
  line-height: 1.08;
  margin: 18px 0 0;
  letter-spacing: -0.025em;
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--muted);
  max-width: 34ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.tag-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
}

/* 手机外框：锤子 T1 白色真机图（去背 WebP，600x1262，约 24KB）
   普通屏用 480 宽版本（约 19KB），高分屏自动切 600 宽版本。
   注：素材去白底不彻底，机身下方 1247-1262 行残留了一条不透明浅灰带（224→233，形似倒影），
   故容器高度只取到 779/791（原图 y 80-859），并用 background-size: 100% auto + top 定位把灰带裁掉，
   改由 CSS 的 drop-shadow 提供自然阴影 */
.phone-mock {
  position: relative;
  width: min(300px, 74vw);
  margin: 0 auto;
  aspect-ratio: 376 / 779;
  background-image: url("/assets/img/phone-frame-480.webp");
  background-position: top center;
  background-size: 100% auto;
  background-repeat: no-repeat;
  filter: drop-shadow(0 24px 32px rgba(15, 17, 21, .18));
}
@media (min-resolution: 1.7dppx), (-webkit-min-device-pixel-ratio: 1.7) {
  .phone-mock { background-image: url("/assets/img/phone-frame.webp"); }
}
/* 屏幕区域：真机图实测显示区为原图 x 159-499 / y 164-771，机身黑边在原图 x 157-158 / x 501-502、
   y 162-163 / y 772-773。照片本身左右黑边不对称（左侧外侧深且锐利；右侧内侧深、向外渐淡为
   102→203 的柔光带），无法靠裁切让两侧一致，故改为盖住整圈原图黑边、由 CSS 统一绘制四边黑边：
   覆盖区间取原图 x 155.9-504 / y 161.3-774.6（含黑边外侧的抗锯齿过渡像素）；
   手机框容器高度只取到 791 中的 779（上条注释），故换算为：左 3.70% / 上 10.44% / 宽 92.58% / 高 78.73% */
.phone-screen {
  position: absolute;
  left: 3.70%;
  top: 10.44%;
  width: 92.58%;
  height: 78.73%;
  border: 1px solid #0b1220; /* 四边一致的机身黑边（照片右侧柔光边框会让右侧显得更宽） */
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
}
/* 截图轮播：淡入淡出 + 极缓慢的轻微推近（Ken Burns），比左右滑动更柔和不易眩晕 */
.phone-screen .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .9s var(--ease), transform 7s linear;
  pointer-events: none;
}
.phone-screen .shot.is-active { opacity: 1; transform: scale(1); }

/* 轮播指示器：放在手机框下方，不遮挡真机图 */
.shot-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.shot-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shot-dot {
  width: 7px; height: 7px;
  padding: 0; border: 0;
  border-radius: 999px;
  background: rgba(15, 17, 21, .18);
  cursor: pointer;
  transition: width .3s var(--ease), background .3s var(--ease);
}
.shot-dot.is-active { width: 20px; background: var(--ink); }
.shot-arrow {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.shot-arrow:hover { border-color: var(--ink); background: var(--surface); }

@media (prefers-reduced-motion: reduce) {
  .phone-screen .shot { transition: opacity .2s linear; transform: none; }
  .shot-dot { transition: none; }
}

/* -------------------------------- 特性 --------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.feature { padding: 32px 28px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature-index { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.feature h3 { font-size: 19px; margin: 14px 0 10px; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.75; }

/* ------------------------------ 兼容品牌 ------------------------------ */
.brand-grid {
  display: grid;
  /* 桌面固定 7 列：配合 BRAND_PREVIEW = 14，正好两排排满、不留空格 */
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
}
/* 品牌较多时先折叠，点「查看全部」再展开 */
.brand-grid.is-collapsed .brand-card.is-extra { display: none; }
/* 由 JS 按当前列数补齐/裁剪到整排，避免最后一排出现空格 */
.brand-card.is-row-hidden { display: none; }
.brand-grid.is-dense { gap: 12px; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.brand-grid.is-dense .brand-card { padding: 16px 12px; }
.brand-grid.is-dense .brand-logo { height: 32px; }
.brand-grid.is-dense .brand-logo img { max-height: 32px; max-width: 92px; }
.brand-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
}
.brand-footer .section-note { margin: 0; }
.brand-count { color: var(--muted); font-size: 13px; }
.brand-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
/* 有官网链接的卡片才是可点的链接 */
a.brand-card { cursor: pointer; }
a.brand-card:hover { border-color: var(--ink); box-shadow: 0 10px 24px -18px rgba(15, 17, 21, .5); transform: translateY(-2px); }
/* 未填官网链接：静态展示，不给点击暗示 */
.brand-card.is-static { cursor: default; }
.brand-logo { height: 40px; display: flex; align-items: center; justify-content: center; }
.brand-logo img { max-height: 40px; max-width: 108px; }
.brand-card .brand-name { font-size: 14px; text-align: center; }
.brand-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--muted);
  text-align: center;
}



/* ------------------------------ 厂商对接 ------------------------------ */
.vendor-band {
  background: #0f1115;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4.5vw, 60px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.vendor-band h2 { font-size: clamp(24px, 3vw, 34px); }
.vendor-band p { color: rgba(255, 255, 255, .68); margin-top: 14px; max-width: 46ch; }

/* -------------------------------- 下载页 ------------------------------- */
.dl-card {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 40px);
}
.dl-title { font-size: clamp(22px, 2.6vw, 30px); }
.dl-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 20px;
  margin: 26px 0 28px;
}
.dl-meta dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl-meta dd { margin: 6px 0 0; font-size: 17px; }
/* 下载按钮 / 二维码 / 说明 三者居中对齐（说明文字另外限宽，避免把它所在的列撑得很宽） */
.dl-actions {
  display: flex; flex-direction: column; gap: 16px;
  align-items: center; text-align: center;
  min-width: 190px; max-width: 220px;
}
.qr-box {
  width: 136px; height: 136px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}
.qr-box svg, .qr-box img { width: 100%; height: 100%; display: block; }
.qr-hint { font-size: 12px; color: var(--muted); max-width: 20ch; margin: 0; }

.steps { list-style: none; display: grid; gap: 18px; }
.steps li {
  position: relative;
  padding-left: 46px;
  color: var(--muted);
  line-height: 1.75;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink);
}
.steps { counter-reset: step; }

.note-box {
  border: 1px dashed var(--line);
  background: #fafbfc;
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------ 更新日志 ------------------------------ */
.release {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.release:last-child { border-bottom: 1px solid var(--line); }
.release-version { font-size: 20px; font-weight: 600; }
.release-date { font-size: 13px; color: var(--muted); margin-top: 8px; }
.release-summary { color: var(--muted); margin-top: 12px; }
.release-items { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.release-items li { display: flex; gap: 12px; align-items: baseline; line-height: 1.7; }
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.badge-latest { background: var(--accent); border-color: var(--accent); color: #fff; margin-left: 10px; }
.badge-new { color: var(--accent); border-color: var(--accent); }
.badge-fix { color: #8a5a2b; border-color: #e3cdb5; }
.badge-improve { color: #2f6b57; border-color: #c6ded3; }

/* -------------------------------- 留言本 ------------------------------- */
.gb-layout {
  display: grid;
  grid-template-columns: minmax(0, 400px) 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.5vw, 28px);
}
.form-card h2 { font-size: 20px; }
.form-hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 14px; margin-bottom: 8px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
/* 后台首页展示只有显示/隐藏两个选项，可以窄一点 */
.field-visible select { width: auto; min-width: 80px; }
input[type="text"], input[type="email"], input[type="number"], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, .12);
}
.chips { display: flex; gap: 10px; }
.chip {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 8px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s var(--ease);
}
.chip.is-active { border-color: var(--ink); color: var(--ink); background: var(--surface); font-weight: 500; }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-question {
  border: 1px dashed var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  white-space: nowrap;
}
.captcha-row input { max-width: 120px; }
.form-error {
  display: none;
  margin-top: 14px;
  color: #b4232b;
  font-size: 14px;
}
.form-error.is-visible { display: block; }
.form-success {
  display: none;
  margin-top: 14px;
  border: 1px solid #c6ded3;
  background: #f2faf6;
  color: #2f6b57;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.form-success.is-visible { display: block; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.msg-list { display: grid; gap: 16px; }
.msg {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-name { font-weight: 600; font-size: 15px; }
.msg-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.msg-text { margin-top: 12px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.msg-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* -------------------------------- 关于 / FAQ --------------------------- */
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.info-list { display: grid; gap: 16px; margin-top: 20px; }
.info-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: baseline; }
.info-row dt { font-size: 14px; color: var(--muted); }
.info-row dd { margin: 0; font-size: 15px; word-break: break-all; }

.faq-group { margin-bottom: clamp(32px, 4vw, 48px); }
.faq-group h3 { font-size: 18px; margin-bottom: 8px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 0 20px; color: var(--muted); line-height: 1.85; max-width: 76ch; }

.prose { max-width: 74ch; }
.prose h2 { font-size: 20px; margin-top: 36px; }
.prose p { color: var(--muted); line-height: 1.9; margin-top: 12px; }

/* -------------------------------- 页脚 --------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(40px, 5vw, 64px) 0 32px; margin-top: clamp(40px, 6vw, 88px); }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand .brand-name { display: inline-block; margin-left: 8px; vertical-align: middle; }
.footer-tagline { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 34ch; }
.footer-note { color: #9aa1a9; font-size: 12px; margin-top: 10px; }
.footer-col h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; color: #33383f; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* -------------------------------- 提示条 ------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 120;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------- 后台 --------------------------------- */
.admin-shell { max-width: 1100px; }
.admin-bar { border-bottom: 1px solid var(--line); background: #fff; }
.admin-bar-inner { display: flex; align-items: center; gap: 18px; height: 58px; flex-wrap: wrap; }
.admin-bar a { font-size: 14px; color: var(--muted); }
.admin-bar a.is-active { color: var(--ink); font-weight: 500; }
.admin-bar .spacer { margin-left: auto; }
/* 后台导航子菜单（如「统计」下的 App 统计 / 型号统计 / 接口文档） */
.admin-menu { position: relative; }
.admin-menu-toggle { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.admin-menu-toggle .caret { font-size: 10px; line-height: 1; }
.admin-menu-list {
  display: none;
  position: absolute; top: 100%; left: -10px; z-index: 30;
  min-width: 148px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}
.admin-menu:hover .admin-menu-list,
.admin-menu.is-open .admin-menu-list { display: block; }
.admin-menu-list a { display: block; padding: 8px 10px; border-radius: 6px; white-space: nowrap; }
.admin-menu-list a:hover { background: var(--surface); color: var(--ink); }
.admin-wrap { padding: 28px 0 64px; }
.admin-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.admin-card h2 { font-size: 18px; margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .num { font-size: 26px; font-weight: 600; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.inline-form { display: inline; }
/* 后台列表的排序箭头 */
.sort-arrows {
  display: inline-flex; flex-direction: row; flex-wrap: nowrap; gap: 4px; flex: 0 0 auto;
}
.sort-arrows form { display: inline-flex; flex-direction: row; flex-wrap: nowrap; gap: 4px; flex: 0 0 auto; }
.sort-btn {
  width: 24px; height: 24px; padding: 0; flex: 0 0 auto; font: inherit; font-size: 13px; line-height: 1;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.sort-btn:hover:not(:disabled) { border-color: var(--ink); background: var(--surface); }
.sort-btn:disabled { opacity: .3; cursor: not-allowed; }
.order-num { display: inline-block; min-width: 20px; font-size: 13px; color: var(--muted); }
.order-num.is-extra { color: var(--accent); }
.is-off { color: var(--muted); }
.brand-table th,
.brand-table td { padding: 10px 6px; vertical-align: middle; }
.brand-table .brand-url {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand-table .brand-url a { color: var(--accent); word-break: break-all; }
.brand-table .link-btn { margin-right: 6px; }
/* 列表里的品牌 Logo：等比缩放，不变形 */
.brand-table .brand-thumb {
  width: auto; height: auto; max-width: 100%; max-height: 22px;
  object-fit: contain; display: block;
}
/* 显示 / 隐藏 开关按钮 */
.toggle-btn {
  min-width: 46px; height: 22px; padding: 0 8px; font: inherit; font-size: 12px; line-height: 1;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer;
}
.toggle-btn:hover { border-color: var(--ink); color: var(--ink); }
.toggle-btn.is-on { border-color: #2f6b57; background: #eef7f3; color: #2f6b57; }
/* 可直接在列表里改的排序数字 */
.sort-cell {
  display: inline-flex; align-items: center; gap: 4px;
  flex-wrap: nowrap; white-space: nowrap;
}
.sort-arrows {
  display: inline-flex; flex-direction: row; flex-wrap: nowrap; gap: 1px;
}
.sort-arrows form { display: inline-flex; flex-direction: row; flex-wrap: nowrap; gap: 1px; }
.sort-btn {
  width: 18px; height: 18px; padding: 0; flex: 0 0 auto;
  font: inherit; font-size: 11px; line-height: 1;
  color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.sort-btn:hover:not(:disabled) { color: var(--ink); background: var(--surface); }
.sort-btn:disabled { opacity: .3; cursor: not-allowed; }
.sort-form { display: inline-flex; align-items: center; }
.sort-input {
  box-sizing: border-box;
  width: 46px; height: 20px; padding: 0; margin: 0; font: inherit; font-size: 12px; line-height: 1;
  text-align: center; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
.sort-input:hover { border-bottom-color: var(--ink); }
.sort-input:focus { outline: none; border-bottom-color: var(--ink); background: var(--surface); }
.sort-input.is-saving { opacity: .5; }
.sort-save {
  height: 18px; padding: 0 4px; margin-left: 2px; font: inherit; font-size: 11px; line-height: 1;
  border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer;
}
.link-btn {
  border: 0; background: none; padding: 0; font: inherit; font-size: 13px;
  color: var(--accent); cursor: pointer; margin-right: 12px;
}
.flash {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid #c6ded3;
  background: #f2faf6;
  color: #2f6b57;
}
.flash.is-error { border-color: #e3cdb5; background: #fdf6ec; color: #8a5a2b; }
.login-box { max-width: 380px; margin: clamp(48px, 10vw, 120px) auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted); }

/* ------------------------------ 统计图表 / 接口文档 ------------------------------ */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.chart-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.chart-box h3 { font-size: 15px; margin-bottom: 12px; }
.chart-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chart-legend { list-style: none; margin: 0; padding: 0; font-size: 13px; flex: 1 1 170px; min-width: 170px; }
.chart-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.chart-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.chart-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-value { color: var(--muted); font-size: 12px; white-space: nowrap; }
.code {
  background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  overflow: auto; margin: 0 0 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.7;
}
.doc-section { margin-top: 26px; }
.doc-section h3 { font-size: 15px; margin-bottom: 10px; }
.kv { display: inline-block; min-width: 150px; }

/* ------------------------------ 日志查询 ------------------------------ */
/* 轮询检测到新日志后，新增行黄色高亮 */
tr.row-new td { background: #fff6c9; }
tr.row-new:hover td { background: #ffeea6; }
tr.row-new td strong { font-weight: 700; }
.log-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
/* 日志详情：标题旁的 ID / 日期 标签 */
.log-tag {
  display: inline-block; padding: 1px 9px; margin-left: 6px; vertical-align: 2px;
  font-size: 13px; font-weight: 400; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
}
/* 日志详情：元信息用两列紧凑表格，而不是一长串竖排 */
.log-meta { width: 100%; border-collapse: collapse; font-size: 14px; }
.log-meta th, .log-meta td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.log-meta th { width: 86px; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.log-meta tr:last-child th, .log-meta tr:last-child td { border-bottom: 0; padding-bottom: 0; }
/* 日志详情：按钮行 */
.log-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
/* 日志正文：可滚动，但不要一屏铺满 */
.log-body { max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }
/* 日志列表：列多，窄屏允许横向滚动，避免挤压列宽 */
.table-scroll { overflow-x: auto; }
/* 列表行内操作 */
.log-row-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.log-row-actions form { display: inline-flex; align-items: center; margin: 0; }
.log-row-actions .link-btn { margin-right: 0; }

/* ------------------------------ 响应式适配 ----------------------------- */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
  .gb-layout { grid-template-columns: minmax(0, 340px) 1fr; }
}

/* 品牌墙列数梯度：7（桌面两排 14 个）→ 5 → 4 → 3 → 2 */
@media (max-width: 1080px) {
  .brand-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .header-inner { grid-template-columns: auto auto; gap: 12px; }
  .nav {
    position: absolute;
    top: 60px; left: 0; right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-link.is-active::after { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .phone-mock { margin-top: 8px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 0; }
  .feature:last-child { border-bottom: 0; }
  .vendor-band { grid-template-columns: 1fr; }
  .dl-card { grid-template-columns: 1fr; }
  /* 窄屏改为横向排列：不再限宽，文字回到左对齐 */
  .dl-actions { flex-direction: row; flex-wrap: wrap; align-items: center; max-width: none; text-align: left; }
  .qr-hint { max-width: 26ch; }
  .gb-layout { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; gap: 12px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .admin-bar-inner { height: auto; padding: 12px 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .hero-deco .circle { width: 160px; height: 160px; }
  .hero-deco .square { display: none; }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .dl-meta { grid-template-columns: repeat(2, 1fr); }
  .info-row { grid-template-columns: 72px 1fr; }
  .msg-time { margin-left: 0; width: 100%; }
}

@media (max-width: 520px) {
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .btn-lg { height: 48px; }
  .captcha-row { flex-direction: column; align-items: stretch; }
  .captcha-row input { max-width: none; }
  .header-actions .btn-sm { padding: 0 12px; }
  .table th, .table td { padding: 8px 6px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
