/* ============================================================
   OnePesr 全站样式
   ============================================================ */
:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-soft: #EEF0FF;
  --accent: #7C3AED;
  --grad: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --text: #1E2233;
  --muted: #6B7280;
  --border: #E5E7EB;
  --success: #16A34A;
  --success-soft: #ECFDF3;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main { min-height: calc(100vh - 260px); }

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; white-space: nowrap; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content:center;
  font-size: 16px; font-weight: 800;
}
.brand em { font-style: normal; color: var(--primary); }
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-links a { padding: 8px 13px; border-radius: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--bg); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.nav-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.nav-user a:hover { color: var(--primary); }
.quota-chip {
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600;
}
.link-muted { color: var(--muted); }

/* 汉堡菜单按钮：仅移动端显示（JS 自动注入到 .nav-inner） */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; width: 38px; height: 38px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 16px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .2s, opacity .2s;
}

/* ---- 操作小按钮（密钥管理等表格操作列） ---- */
.act-group { display: flex; gap: 6px; flex-wrap: wrap; }
.act-btn {
  display: inline-block; padding: 4px 10px; font-size: 12px; line-height: 1.5;
  border-radius: 6px; border: 1px solid var(--border); background: #fff;
  color: var(--text); cursor: pointer; white-space: nowrap; transition: all .15s;
}
.act-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(79,70,229,.06); }
.act-btn.danger { color: var(--danger); border-color: rgba(220,38,38,.3); }
.act-btn.danger:hover { background: rgba(220,38,38,.08); border-color: var(--danger); color: var(--danger); }
.act-btn.primary { color: var(--primary); border-color: rgba(79,70,229,.35); background: rgba(79,70,229,.06); }
.act-btn.primary:hover { background: rgba(79,70,229,.12); }

/* ---- 分页条 ---- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pager-info { font-size: 12px; color: var(--muted); margin-right: auto; }
.pager-btn {
  min-width: 30px; padding: 5px 10px; font-size: 13px; text-align: center;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  color: var(--text); cursor: pointer; transition: all .15s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
@media (max-width: 620px) {
  .pager { justify-content: center; }
  .pager-info { width: 100%; text-align: center; margin: 0 0 4px; }
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79, 70, 229, .4); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------- 提示条 ---------------- */
.flashes { margin-top: 16px; }
.alert { padding: 11px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 10px; border: 1px solid; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #ABEFC6; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: #FECACA; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #FECACA; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #FDE68A; }

/* ---------------- 首页 Hero ---------------- */
.hero {
  background: var(--grad); color: #fff; text-align: center;
  padding: 84px 20px 96px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); top: -220px; right: -140px;
}
.hero::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); bottom: -180px; left: -100px;
}
.hero > * { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  padding: 5px 16px; border-radius: 999px; font-size: 13px; margin-bottom: 22px;
}
.hero h1 { font-size: 42px; line-height: 1.25; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(90deg, #FDE68A, #FCA5A5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; opacity: .92; max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-light { background: #fff; color: var(--primary); }
.hero .btn-line { border: 1px solid rgba(255, 255, 255, .55); color: #fff; }
.hero .btn-line:hover { background: rgba(255, 255, 255, .12); }
.hero-stats { display: flex; gap: 56px; justify-content: center; margin-top: 52px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 28px; }
.hero-stat span { font-size: 13px; opacity: .85; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 28px; }
.section-title b { color: var(--primary); }
.section-desc { color: var(--muted); margin-top: 8px; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}

/* 三步流程 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px;
}
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* CTA */
.cta-band { background: var(--grad); border-radius: 18px; color: #fff; text-align: center; padding: 48px 30px; }
.cta-band h2 { font-size: 26px; margin-bottom: 10px; }
.cta-band p { opacity: .9; margin-bottom: 24px; }

/* ---------------- 内页头部 ---------------- */
.page-head { padding: 44px 0 8px; }
.page-title { font-size: 30px; }
.page-desc { color: var(--muted); margin-top: 6px; }
.page-body { padding: 26px 0 70px; }

/* ---------------- 音色库 ---------------- */
.voice-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 14px;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.voice-toolbar .input { margin-left: auto; width: 240px; }
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.voice-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: all .18s; }
.voice-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #C7CBFF; }
.voice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.voice-name { font-size: 16px; font-weight: 700; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-violet { background: var(--primary-soft); color: var(--primary); }
.tag-green { background: var(--success-soft); color: var(--success); }
.tag-orange { background: var(--warning-soft); color: var(--warning); }
.tag-gray { background: #F3F4F6; color: var(--muted); }
.voice-meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.voice-desc { color: var(--muted); font-size: 13px; min-height: 40px; margin-bottom: 14px; }
.voice-actions { display: flex; gap: 10px; }

/* ---------------- 表单 ---------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.form-group label .req { color: var(--danger); margin-left: 3px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #FAFAFC; color: var(--text); outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); background: #fff; }
textarea.input { resize: vertical; min-height: 130px; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.char-count { text-align: right; color: var(--muted); font-size: 13px; margin-top: 6px; }
.char-count b { color: var(--primary); }
.form-actions { display: flex; gap: 12px; margin-top: 6px; }
.tips-card { background: var(--primary-soft); border: 1px solid #DCDFFF; border-radius: var(--radius); padding: 20px 22px; }
.tips-card h4 { font-size: 15px; color: var(--primary-dark); margin-bottom: 10px; }
.tips li { position: relative; padding-left: 20px; color: #4B4FA8; font-size: 13px; margin-bottom: 8px; }
.tips li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.side-col { display: flex; flex-direction: column; gap: 20px; }

/* ---------------- 工作台(克隆/设计) ---------------- */
.workbench { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.prompt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-btn {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 13px;
}
.tag-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.result-empty { text-align: center; color: var(--muted); padding: 44px 0; font-size: 14px; }
.result-empty .big { font-size: 40px; display: block; margin-bottom: 12px; }
.player {
  display: flex; align-items: center; gap: 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 14px;
}
.play-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--grad);
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.progress { flex: 1; height: 6px; border-radius: 999px; background: #E3E5EF; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 999px; }
.time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- 历史/表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 11px 14px; background: #F9FAFC; color: var(--muted);
  font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFAFF; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #F3F4F6; color: var(--muted); }
.badge-brand { background: var(--primary-soft); color: var(--primary); }

/* ---------------- API 文档 ---------------- */
.api-block { margin-bottom: 20px; }
.endpoint { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.method { padding: 4px 12px; border-radius: 7px; font-size: 12px; font-weight: 700; font-family: Consolas, monospace; }
.method-post { background: var(--primary-soft); color: var(--primary); }
.method-get { background: var(--success-soft); color: var(--success); }
.endpoint code { background: #F3F4F6; padding: 4px 10px; border-radius: 7px; font-size: 13px; }
.code-block { position: relative; background: #1E2233; border-radius: 12px; padding: 18px 20px; overflow-x: auto; }
.code-block pre { color: #D5DAF5; font-family: Consolas, "JetBrains Mono", monospace; font-size: 13px; line-height: 1.7; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .12); color: #D5DAF5;
  border: none; border-radius: 7px; padding: 5px 12px; font-size: 12px;
}
.copy-btn:hover { background: rgba(255, 255, 255, .22); }

/* ---------------- FAQ ---------------- */
.faq-group { margin-bottom: 28px; }
.faq-cat { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary {
  padding: 15px 18px; cursor: pointer; font-weight: 600; font-size: 14.5px;
  list-style: none; position: relative; padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-size: 18px; font-weight: 700;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }

/* ---------------- VIP / 商品 ---------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 22px; text-align: center; position: relative; transition: all .18s;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.price-card.featured { border: 2px solid var(--primary); }
.price-card .hot {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; padding: 3px 14px; border-radius: 999px;
}
.price-card h4 { font-size: 16px; margin-bottom: 12px; }
.price { font-size: 32px; font-weight: 800; color: var(--primary); }
.price .price-unit { font-size: 13px; font-weight: 400; color: var(--muted); }
.price-old { color: #B0B4C4; text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.price-list { margin: 16px 0 20px; text-align: left; }
.price-list li { font-size: 13px; color: var(--muted); padding: 5px 0 5px 22px; position: relative; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.redeem-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: stretch; }
.redeem-input { display: flex; gap: 10px; }
.redeem-input .input { flex: 1; font-family: Consolas, monospace; letter-spacing: 1px; }

/* ---------------- 登录/注册 ---------------- */
.auth-wrap { display: flex; justify-content: center; padding: 70px 20px 90px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .panel { padding: 36px 32px; }
.auth-title { text-align: center; font-size: 24px; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--primary); font-weight: 600; }

/* 输入框图标与密码显隐 */
.input-wrap { position: relative; }
.input-wrap .in-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .55; pointer-events: none; }
.input-wrap .input { padding-left: 38px; width: 100%; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: none; font-size: 13px; color: var(--muted); padding: 4px 6px;
}
.pw-toggle:hover { color: var(--primary); }
.form-row-between { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.form-row-between label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 400; cursor: pointer; }
.form-row-between a { color: var(--primary); font-weight: 600; }
.auth-demo {
  margin-top: 18px; background: var(--primary-soft); border: 1px dashed var(--primary);
  border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--primary-dark);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.auth-demo button {
  border: none; background: var(--primary); color: #fff; border-radius: 7px;
  padding: 5px 12px; font-size: 12.5px; white-space: nowrap;
}
.auth-demo button:hover { background: var(--primary-dark); }

/* ---------------- 个人中心 ---------------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-card .stat-value.plain { color: var(--text); }
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.profile-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1E2233; color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 页脚 ---------------- */
.footer { background: #171A2C; color: #9CA1B8; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding: 46px 20px 34px; flex-wrap: wrap; }
.footer .brand { color: #fff; }
.footer p { font-size: 13px; margin-top: 8px; }
.footer-col b { display: block; color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; padding: 18px; font-size: 13px; }

/* ---------------- 响应式：平板 ---------------- */
@media (max-width: 960px) {
  .grid-3, .voice-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .pricing-grid, .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .workbench, .profile-grid, .redeem-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .nav-inner { gap: 12px; }
}

/* ---------------- 响应式：导航汉堡菜单（≤900px，覆盖手机与小屏横排不下的情况） ---------------- */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .nav-inner { height: 58px; gap: 10px; position: relative; }
  .brand { font-size: 18px; }
  .brand-logo { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
  .nav-toggle { display: flex; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: 100%; left: -20px; right: -20px;
    flex-direction: column; gap: 2px; padding: 8px 20px 12px;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
    overflow: visible; z-index: 99;
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 15px; }
  .nav-actions { margin-left: auto; gap: 8px; }
  .nav-actions .btn { padding: 6px 12px; font-size: 13px; }
  .nav-user { gap: 8px; font-size: 13px; }
}

/* ---------------- 响应式：手机 ---------------- */
@media (max-width: 620px) {
  body { font-size: 14px; }
  .container { padding: 0 14px; }
  .nav-links { left: -14px; right: -14px; padding: 8px 14px 12px; }

  /* 网格全部单列 */
  .grid-2, .grid-3, .voice-grid, .grid-4, .pricing-grid, .form-row { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 20px; }

  /* 首页 Hero */
  .hero { padding: 52px 16px 60px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 22px; margin-top: 36px; }
  .hero-stat b { font-size: 19px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }

  /* 区块与标题 */
  .section { padding: 42px 0; }
  .section-title { font-size: 22px; }
  .page-head { padding: 30px 0 6px; }
  .page-title { font-size: 24px; }
  .cta-band { padding: 34px 20px; }
  .cta-band h2 { font-size: 20px; }

  /* 表格可横向滑动，字号缩小 */
  .table { font-size: 13px; }
  .table th, .table td { padding: 9px 10px; white-space: nowrap; }

  /* 表单与按钮 */
  .panel { padding: 18px 16px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .redeem-input { flex-direction: column; }
  .btn-lg { padding: 12px 22px; }
  .auth-wrap { padding: 36px 14px 60px; }
  .auth-card .panel { padding: 26px 20px; }

  /* 音色库工具栏 */
  .voice-toolbar { flex-wrap: wrap; }
  .voice-toolbar .input { margin-left: 0; width: 100%; }

  /* 播放器与价格 */
  .price { font-size: 26px; }
  .code-block pre { font-size: 12px; }

  /* 页脚竖排 */
  .footer-inner { flex-direction: column; gap: 22px; padding: 34px 16px 26px; }
}

/* ---- 文件上传美化（创建声音模型） ---- */
.file-upload { position: relative; }
.file-upload input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.file-upload-box {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px dashed var(--border); border-radius: 10px;
  padding: 14px 16px; background: #FAFAFF; transition: border-color .18s, background .18s;
}
.file-upload:hover .file-upload-box { border-color: var(--primary); background: #F4F3FF; }
.file-upload-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 500;
  border-radius: 8px; padding: 8px 16px;
}
.file-upload-name {
  font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-upload.has-file .file-upload-box { border-color: var(--primary); border-style: solid; }
.file-upload.has-file .file-upload-name { color: var(--text); font-weight: 500; }

/* ---- 勾选框与文字对齐 ---- */
.check-line { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check-line input[type="checkbox"] {
  flex-shrink: 0; width: 15px; height: 15px; margin: 2px 0 0;
  accent-color: var(--primary); cursor: pointer;
}

/* ---- tasks.html 状态徽章不换行 ---- */
.table .badge { white-space: nowrap; }

/* ---- 语气调节滑块（clone.html） ---- */
.hint-inline { font-size: 12px; color: var(--muted); font-weight: 400; }
.emotion-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.emo-row { display: flex; align-items: center; gap: 10px; }
.emo-label { flex-shrink: 0; width: 66px; font-size: 13px; color: var(--muted); }
.emo-row.on .emo-label { color: var(--primary); font-weight: 600; }
.emo-row input[type="range"] { flex: 1; height: 4px; accent-color: var(--primary); cursor: pointer; }
.emo-val {
  flex-shrink: 0; width: 30px; text-align: right; font-size: 12px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.emo-row.on .emo-val { color: var(--primary); font-weight: 600; }
@media (max-width: 640px) {
  .emotion-sliders { grid-template-columns: 1fr; }
}
.voice-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; text-align: left; transition: border-color .15s;
}
.voice-trigger:hover { border-color: var(--primary); }
.voice-trigger .vt-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-trigger .vt-text.empty { color: var(--muted); }
.voice-trigger .vt-arrow { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.voice-trigger .vt-cat {
  flex-shrink: 0; font-size: 11px; color: var(--primary); background: var(--primary-soft);
  border-radius: 999px; padding: 2px 9px;
}

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 35, .5); z-index: 900;
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal-mask.open { display: flex; }
.modal-dialog {
  background: #fff; border-radius: var(--radius); width: 760px; max-width: 100%;
  max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .3);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; }
.modal-close {
  border: none; background: none; font-size: 20px; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px; line-height: 1;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-tabs { display: flex; gap: 8px; padding: 14px 20px 0; }
.modal-tab {
  padding: 8px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; color: var(--muted); transition: all .15s;
}
.modal-tab:hover { border-color: var(--primary); color: var(--primary); }
.modal-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.modal-tab .cnt { font-size: 12px; opacity: .8; margin-left: 4px; }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; flex: 1; }
.modal-empty { text-align: center; color: var(--muted); padding: 42px 0; font-size: 14px; }

.voice-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.vc-card {
  position: relative; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; transition: all .15s; background: #fff;
}
.vc-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(79, 70, 229, .12); }
.vc-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.vc-card.selected::after {
  content: "✓"; position: absolute; right: 10px; bottom: 10px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.vc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vc-name { font-weight: 600; font-size: 14px; line-height: 1.4; }
.vc-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.vc-desc {
  font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vc-play {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  font-size: 12px; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.vc-play:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.vc-play.playing { background: var(--primary); border-color: var(--primary); color: #fff; }

@media (max-width: 640px) {
  .modal-dialog { max-height: 90vh; }
  .voice-card-grid { grid-template-columns: 1fr 1fr; }
  .modal-tab { padding: 7px 14px; font-size: 13px; }
}
