/* ============ 设计系统 ============ */
:root {
  --ink: #0b1220;            /* 主文字 */
  --ink-2: #475569;          /* 次级文字 */
  --ink-3: #94a3b8;          /* 辅助文字 */
  --brand: #3552f0;          /* 品牌蓝 */
  --brand-dark: #2a41c9;
  --brand-weak: #eef1fe;
  --bg: #f6f7f9;             /* 页面底色 */
  --panel: #ffffff;
  --line: #e5e8ee;
  --line-2: #d4d9e3;
  --ok: #0f8a4d;
  --ok-bg: #e9f7ef;
  --warn: #b45309;
  --warn-bg: #fdf3e3;
  --err: #c4322a;
  --err-bg: #fdeeed;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* 禁止页面横向滚动；超长文字（长词/链接/编号）自动换行，不撑破容器 */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.65; min-height: 100vh;
  overflow-wrap: break-word; word-break: break-word;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
img { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px; }
.container.narrow { max-width: 760px; }

/* ============ 顶部导航 ============ */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  white-space: nowrap; flex: none;   /* 品牌名（Transly 等多语言）不折行、不被 flex 挤压拆词 */ }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-mark svg { width: 16px; height: 16px; }
.brand small { display: none; }   /* 顶栏空间有限，副标题省略（多语言文案较长） */

.main-nav { display: flex; gap: 16px; height: 100%; }
.main-nav a {
  display: flex; align-items: center; font-size: 13.8px; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s;
  white-space: nowrap; flex: none;   /* 多语言文案较长时不折行、不被压缩 */
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-chip {
  display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2);
  padding: 6px 10px; border-radius: 8px;
  white-space: nowrap; flex: none;   /* 用户区整体不折行 */
}
.user-chip:hover { background: var(--bg); }
.uname {
  display: inline-block; max-width: 100px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-weak);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex: none;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: 9px 20px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost {
  background: #fff; color: var(--ink-2); border-color: var(--line-2);
}
.btn.ghost:hover { color: var(--ink); border-color: var(--ink-3); background: #fff; }
.btn.danger { background: #fff; color: var(--err); border-color: #f0c4c1; }
.btn.danger:hover { background: var(--err-bg); }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn.lg { padding: 12px 28px; font-size: 16px; }

/* ============ 面板 / 表格 ============ */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel .panel-head {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel .panel-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.panel .panel-body { padding: 22px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; font-weight: 700; }
.page-head p { color: var(--ink-2); margin-top: 6px; font-size: 14.5px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* ★ 翻译结果面板：固定高度大框，内容在框内独立滚动，不影响页面其他区域滚动 */
.result-scroll { max-height: 62vh; overflow-y: auto; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12.5px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: #fafbfc; white-space: nowrap;
}
.data-table td {
  padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top;
  line-height: 1.55;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .mono { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }

/* 状态标签 */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 2px 10px; border-radius: 99px; font-weight: 500; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.done, .tag.paid { color: var(--ok); background: var(--ok-bg); }
.tag.converting, .tag.translating, .tag.ai_checking, .tag.pending { color: var(--warn); background: var(--warn-bg); }
.tag.error, .tag.expired { color: var(--err); background: var(--err-bg); }
.tag.member { color: var(--brand); background: var(--brand-weak); }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select, .form-control {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 15px; outline: none; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .form-control:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(53, 82, 240, .12);
}
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }

/* ============ 上传区 ============ */
.uploader {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius);
  padding: 44px 24px; text-align: center; background: #fafbfc;
  transition: border-color .15s, background .15s; cursor: pointer;
}
.uploader:hover, .uploader.drag { border-color: var(--brand); background: var(--brand-weak); }
.uploader .up-icon {
  width: 52px; height: 52px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.uploader .up-icon svg { width: 24px; height: 24px; }
.uploader .up-title { font-size: 15.5px; font-weight: 600; }
.uploader .up-title em { color: var(--brand); font-style: normal; }
.uploader .up-sub { font-size: 13px; color: var(--ink-3); margin-top: 5px; }

/* ============ 进度 ============ */
.progress { background: var(--line); border-radius: 99px; height: 8px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--brand); width: 0; transition: width .35s; border-radius: 99px; }
/* 历史表格内迷你进度条 */
.hist-prog { margin-top: 6px; min-width: 120px; }
.hist-prog .hp-bar { background: var(--line); border-radius: 99px; height: 6px; overflow: hidden; }
.hist-prog .hp-bar i { display: block; height: 100%; background: var(--brand); transition: width .5s; border-radius: 99px; }
.hist-prog span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
.steps { display: flex; align-items: center; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; gap: 4px 0; }
.steps .st { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.steps .st .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.steps .st.active { color: var(--brand); font-weight: 600; }
.steps .st.active .n { background: var(--brand); color: #fff; }
.steps .st.done { color: var(--ink-2); }
.steps .st.done .n { background: var(--ok); color: #fff; }
.steps .ln { width: 42px; height: 1px; background: var(--line-2); margin: 0 10px; }

/* ============ 首页 ============ */
.hero { padding: 72px 24px 56px; }
.hero-grid {
  max-width: 1120px; margin: 0 auto; display: grid;
  grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: 42px; line-height: 1.22; letter-spacing: -.03em; font-weight: 700; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { color: var(--ink-2); font-size: 16.5px; margin-top: 18px; max-width: 30em; }
.hero .cta { display: flex; gap: 14px; margin-top: 30px; }
.hero .meta { display: flex; gap: 28px; margin-top: 38px; flex-wrap: wrap; }
.hero .meta .m b { display: block; font-size: 22px; letter-spacing: -.02em; }
.hero .meta .m span { font-size: 13px; color: var(--ink-3); }

/* 首页产品示意图（纯 CSS） */
.mock {
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(16, 24, 40, .25); overflow: hidden;
}
.mock .m-bar {
  height: 40px; background: #f4f5f7; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px; padding: 0 14px;
}
.mock .m-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock .m-bar i:first-child { background: #f0b4b0; }
.mock .m-bar i:nth-child(2) { background: #f3d9a4; }
.mock .m-bar i:nth-child(3) { background: #b5dcc3; }
.mock .m-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.mock .m-col { padding: 18px; font-size: 12px; line-height: 1.9; color: var(--ink-2); }
.mock .m-col:first-child { border-right: 1px solid var(--line); background: #fbfbfc; }
.mock .m-col .ln1 { display: block; height: 7px; border-radius: 4px; background: var(--line); margin: 11px 0; }
.mock .m-col .ln1.s2 { width: 88%; }
.mock .m-col .ln1.s3 { width: 64%; }
.mock .m-col .pill {
  display: inline-block; font-size: 10.5px; padding: 2px 8px; border-radius: 99px;
  background: var(--ok-bg); color: var(--ok); margin-bottom: 6px; font-weight: 600;
}
.mock .m-col .pill.blue { background: var(--brand-weak); color: var(--brand); }
.mock .m-arrow {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(53, 82, 240, .4);
}
.mock { position: relative; }

.section { padding: 64px 24px; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section .sec-head { text-align: center; margin-bottom: 44px; }
.section .sec-head h2 { font-size: 28px; letter-spacing: -.02em; }
.section .sec-head p { color: var(--ink-2); margin-top: 10px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: border-color .15s, box-shadow .15s;
}
.feature:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.feature .f-icon {
  width: 40px; height: 40px; border-radius: 9px; background: var(--brand-weak);
  color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
}
.feature .f-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 15.5px; font-weight: 600; }
.feature p { font-size: 13.5px; color: var(--ink-2); margin-top: 7px; }

.steps-band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card { position: relative; padding-top: 18px; }
.step-card .no {
  font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .12em;
}
.step-card h3 { font-size: 15.5px; margin-top: 8px; }
.step-card p { font-size: 13.5px; color: var(--ink-2); margin-top: 7px; }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 24px; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3);
}

/* ============ 认证页 ============ */
.auth-wrap { min-height: calc(100vh - 62px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 400px; max-width: 100%; }
.auth-card .logo-line { text-align: center; margin-bottom: 26px; }
.auth-card .logo-line h1 { font-size: 21px; margin-top: 14px; }
.auth-card .logo-line p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 18px; }
.auth-foot a { color: var(--brand); font-weight: 500; }

/* ============ 计费 / 套餐 ============ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 28px 26px; display: flex; flex-direction: column; position: relative;
}
.plan.hot { border-color: var(--brand); box-shadow: 0 12px 32px -16px rgba(53, 82, 240, .35); }
.plan .plan-badge {
  position: absolute; top: -11px; left: 24px; background: var(--brand); color: #fff;
  font-size: 11.5px; padding: 3px 10px; border-radius: 99px; font-weight: 600;
}
.plan h3 { font-size: 16px; font-weight: 600; }
.plan .price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.plan .price b { font-size: 34px; letter-spacing: -.03em; }
.plan .price span { color: var(--ink-3); font-size: 13.5px; }
.plan .price small { color: var(--ink-3); font-size: 13px; }
.plan ul { list-style: none; margin: 18px 0 22px; flex: 1; }
.plan ul li {
  font-size: 13.5px; color: var(--ink-2); padding: 5px 0 5px 24px; position: relative;
}
.plan ul li::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--ok-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f8a4d' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 9px; background-repeat: no-repeat; background-position: center;
}

/* ============ 管理后台 ============ */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
/* 防止 grid/滚动容器被宽表格撑破（管理后台在手机端被右侧裁切、无法横向滚动的问题） */
.admin-layout, .admin-layout > section, .panel, .stat-grid { min-width: 0; }
.table-scroll { max-width: 100%; }
.admin-side {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: sticky; top: 86px;
}
.admin-side a {
  display: block; padding: 12px 18px; font-size: 14px; color: var(--ink-2);
  border-left: 2px solid transparent;
}
.admin-side a:hover { background: var(--bg); color: var(--ink); }
.admin-side a.active { color: var(--brand); border-color: var(--brand); background: var(--brand-weak); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

/* ============ 杂项 ============ */
.empty { text-align: center; color: var(--ink-3); padding: 44px 0; font-size: 14px; }
.toast {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 14px; z-index: 999; opacity: 0; transition: opacity .25s; pointer-events: none;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: .96; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mt-16 { margin-top: 16px; } .mt-22 { margin-top: 22px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
kbd.code {
  font-family: var(--mono); font-size: 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; color: var(--ink-2);
}

/* ============ 顶栏图标按钮 ============ */
.hdr-admin svg, .hdr-logout svg, .hdr-login svg { width: 14px; height: 14px; }

/* ============ 移动端底部标签栏（H5 Tab Bar） ============ */
/* 基础样式不依赖媒体查询，防止缓存旧 CSS 时布局失控 */
.tab-bar { display: none; }
.tab-bar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--ink-3); padding: 3px 0 2px;
  -webkit-tap-highlight-color: transparent; transition: color .15s;
}
.tab-bar a svg { width: 22px; height: 22px; flex: none; }
.tab-bar a.active { color: var(--brand); font-weight: 600; }

/* ============ 响应式 ============ */
/* 多语言文案较长：中宽屏收紧顶栏间距，长用户名省略号，必要时省略次要元素 */
@media (max-width: 1100px) {
  .header-inner { gap: 16px; padding: 0 14px; }
  .main-nav { gap: 12px; }
  .main-nav a { font-size: 13.2px; }
  .header-actions { gap: 6px; }
  .user-chip .tag { display: none; }           /* 会员标签移入「我的」页展示 */
  .uname { max-width: 80px; }
}
@media (max-width: 940px) {
  .header-inner { height: 54px; gap: 10px; padding: 0 12px; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 12.5px; }
  .header-actions { gap: 6px; }
  .header-actions select { max-width: 84px; }  /* 语言选择器防溢出 */
  .user-chip { padding: 4px 6px; }
  .user-chip .uname, .user-chip .tag { display: none; } /* 只留头像，用户名在「我的」页查看 */
  .hdr-logout span { display: none; }          /* 退出退为纯图标 */
  .hdr-logout { padding: 7px 9px; }
  .hdr-admin span { display: none; }           /* 管理后台退为纯图标 */
  .hdr-admin { padding: 7px 9px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature-grid, .steps-grid, .plans, .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; overflow-x: auto; }
  .admin-side a { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .admin-side a.active { border-bottom-color: var(--brand); }
}
@media (max-width: 768px) {
  /* ---- 顶部：单行紧凑，主导航移至底部标签栏 ---- */
  .header-inner { height: 54px; padding: 0 14px; gap: 10px; flex-wrap: nowrap; }
  .main-nav { display: none; }
  .brand { font-size: 15.5px; }
  .brand small { display: none; }
  .header-actions { margin-left: auto; gap: 6px; }
  .header-actions .btn { min-height: 34px; padding: 6px 10px; }
  .hdr-reg { display: none; }                        /* 注册入口在登录页内 */
  .hdr-admin span, .hdr-logout span { display: none; } /* 退为纯图标按钮 */
  .hdr-admin, .hdr-logout { padding: 7px 9px; }
  .hdr-admin svg, .hdr-logout svg { width: 16px; height: 16px; }
  .user-chip { padding: 4px 6px; }
  .user-chip .uname, .user-chip .tag { display: none; }

  /* ---- 底部标签栏 ---- */
  .tab-bar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;  /* 列数自动适配（4 或 5 项都均分） */
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 5px 0 calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .tab-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; color: var(--ink-3); padding: 3px 0 2px;
    -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .tab-bar a svg { width: 22px; height: 22px; }
  .tab-bar a.active { color: var(--brand); font-weight: 600; }
  .tab-bar a:active { opacity: .7; }

  /* ---- 内容区为标签栏留出空间 + 排版收紧 ---- */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .container { padding: 18px 14px 26px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 20px; }
  .page-head p { font-size: 13.5px; margin-top: 4px; }
  .panel-body { padding: 16px; }
  .panel-head { padding: 13px 16px; }
  .uploader { padding: 30px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat b { font-size: 19px; }
  .hero { padding: 40px 14px 36px; }
  .hero h1 { font-size: 30px; }
  .hero .lead { font-size: 15px; }
  .hero .meta { gap: 18px; margin-top: 28px; }
  .hero .cta { gap: 10px; }
  .hero .cta .btn { flex: 1; }
  .section { padding: 40px 14px; }
  .section .sec-head h2 { font-size: 22px; }
  .feature-grid, .steps-grid, .plans, .grid-2 { grid-template-columns: 1fr; }
  .field input, .field select, .form-control { font-size: 16px; }  /* 防 iOS 聚焦自动缩放 */
  .btn { min-height: 44px; white-space: normal; }   /* 长按钮文字换行，不横向溢出 */
  .btn.small { min-height: 34px; white-space: nowrap; } /* 小按钮（表格内）保持单行 */
  .data-table { min-width: 560px; font-size: 13px; } /* 收窄表格，减少内部滚动 */
  .data-table td { padding: 10px 10px; }
  .header-actions select { max-width: 96px; }        /* 语言选择器防溢出 */
  .table-scroll { margin: 0 -14px; padding: 0 14px; }
  .lang-row { flex-direction: column; align-items: stretch; gap: 0; }
  .lang-row .arrow { text-align: center; padding: 6px 0; transform: rotate(90deg); }
  .toast { top: auto; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .auth-wrap { padding: 24px 14px; }
}
@media (max-width: 400px) {
  .brand { font-size: 14px; }   /* 超窄屏品牌名再缩一号，保证单行 */
  .hero h1 { font-size: 26px; }
  .tab-bar a span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hdr-login span { display: none; }  /* 超窄屏登录按钮退化为图标 */
}
@media (hover: none) {
  .btn:hover { background: var(--brand); }
  .btn.ghost:hover { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
  .btn:active { opacity: .85; transform: scale(.985); }
  .tab-bar a:active { opacity: .7; }
}
