/* ============================================================
   NOLBIR 语音 · 界面样式
   营销页要惊艳，工作台要安静。
   ============================================================ */

/* ---------------- 1. Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: rgba(29, 29, 31, 0.12); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 极细的自定义滚动条 */
* { scrollbar-width: thin; scrollbar-color: #DCDCE1 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: #DCDCE1; border-radius: 99px; border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #C7C7CD; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 2. 基础工具 ---------------- */
.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-6); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-secondary); }
.tertiary { color: var(--text-tertiary); }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ---------------- 3. 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  height: 44px; padding: 0 22px;
  border-radius: var(--radius-full);
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.975); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--accent); color: var(--text-inverse); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: var(--bg-card); color: var(--text-primary);
  border-color: var(--line-subtle);
}
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--line-default); }

.btn-quiet { background: transparent; color: var(--text-secondary); }
.btn-quiet:hover { background: var(--bg-subtle); color: var(--text-primary); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.is-on { color: var(--tint); }

/* ---------------- 4. 卡片 / 胶囊 / 徽标 ---------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
}
.card-hover {
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-default);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  font-size: 13px; color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-default); color: var(--text-primary); }
.chip.is-active {
  background: var(--accent); border-color: var(--accent); color: var(--text-inverse);
}
.chip .count {
  font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 500; letter-spacing: 0.01em;
  background: var(--bg-subtle); color: var(--text-secondary);
}
.badge-tint { background: var(--tint-soft); color: var(--tint); }
.badge-ok { background: var(--success-soft); color: #1C7C3D; }
.badge-warn { background: var(--warning-soft); color: #96610A; }

.divider { height: 1px; background: var(--line-subtle); border: 0; margin: 0; }

/* 玻璃面板（工作台统一方案：CSS 毛玻璃） */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* ---------------- 5. 营销页 · 顶栏 ---------------- */
.site-top {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              backdrop-filter var(--duration-base) var(--ease-out);
}
.site-top.is-stuck {
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--line-subtle);
}
.site-top .wrap { display: flex; align-items: center; gap: var(--space-8); }
.top-nav { display: flex; align-items: center; gap: var(--space-6); margin-left: auto; }
.top-nav a {
  font-size: 14px; color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}
.top-nav a:hover { color: var(--text-primary); }
.top-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: var(--space-4); }

/* 品牌标志 */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px; height: 26px; flex: none;
  display: block; object-fit: contain;
  border-radius: 0;
  background: none;
}
/* 深色底上把黑色 logo 反相成白色 */
.ink .brand-mark, .foot-dark .brand-mark { filter: invert(1); }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------------- 6. Hero ---------------- */
.hero { padding: var(--space-32) 0 var(--space-20); position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: var(--space-12); align-items: center;
}
.hero-org {
  font-size: 13px; color: var(--text-tertiary);
  letter-spacing: 0.02em; margin-bottom: var(--space-4);
  display: flex; align-items: center; gap: 8px;
}
.hero-org::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tint);
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.028em;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}
.hero h1 .accent-line { color: var(--text-tertiary); display: block; }
.hero-lead {
  font-size: 17px; line-height: 1.75; color: var(--text-secondary);
  max-width: 520px; margin-bottom: var(--space-8);
}
.hero-cta { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

.hero-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6);
  margin-bottom: var(--space-8); max-width: 520px;
}
.hero-fact {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.5;
}
.hero-fact svg { width: 15px; height: 15px; margin-top: 3px; color: var(--text-primary); flex: none; }

/* 右侧舞台：声波 + 悬浮卡 */
.hero-stage {
  position: relative;
  min-height: 480px;
  display: grid; place-items: center;
}
.wave-host {
  position: relative;
  width: 100%; height: 260px;
}
.wave-host canvas { width: 100%; height: 100%; }
.wave-host liquid-glass { width: 100%; height: 100%; }
.wave-host .glass-on canvas { opacity: 0; transition: opacity var(--duration-slow); }

.stage-glow {
  position: absolute; inset: 0;
  background: radial-gradient(50% 46% at 50% 48%, rgba(10, 132, 255, 0.12), rgba(10, 132, 255, 0) 72%);
  pointer-events: none;
}

.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.09);
  padding: var(--space-4);
  animation: floaty 7s var(--ease-in-out) infinite;
}
.float-card.f1 { top: 8px; right: -6px; width: 208px; animation-delay: -1.5s; }
.float-card.f2 { bottom: 26px; left: -14px; width: 236px; animation-delay: -3.5s; }
.float-card.f3 { top: 44%; right: -28px; width: 176px; animation-delay: -5s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.fc-head { display: flex; align-items: center; gap: 10px; }
.fc-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  display: grid; place-items: center; color: #fff;
  font-size: 14px; font-weight: 500;
}
.fc-name { font-size: 14px; font-weight: 500; line-height: 1.3; }
.fc-meta { font-size: 11px; color: var(--text-tertiary); }
.fc-wave { margin: 12px 0 8px; height: 26px; }
.fc-foot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-tertiary);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.14);
}

/* ---------------- 7. 区块通用 ---------------- */
.section { padding: var(--space-20) 0; }
.section-head { max-width: 720px; margin-bottom: var(--space-12); }
.section-head h2 {
  font-size: var(--fs-section); font-weight: 500; line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: var(--space-4);
}
.section-head p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* 特性条 */
.facts-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line-subtle);
  border: 1px solid var(--line-subtle); border-radius: var(--radius-lg);
  overflow: hidden;
}
.facts-strip .fact {
  background: var(--bg-card); padding: var(--space-6);
  transition: background var(--duration-base) var(--ease-out);
}
.facts-strip .fact:hover { background: var(--bg-inset); }
.fact-ico {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--bg-subtle); display: grid; place-items: center;
  margin-bottom: var(--space-4); color: var(--text-primary);
}
.fact-ico svg { width: 17px; height: 17px; }
.fact h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.fact p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* 能力卡 */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.cap-card {
  padding: var(--space-8) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  min-height: 220px;
}
.cap-card .cap-ico {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  display: grid; place-items: center;
  background: var(--accent); color: #fff; margin-bottom: var(--space-2);
}
.cap-card .cap-ico svg { width: 18px; height: 18px; }
.cap-card h3 { font-size: var(--fs-card); font-weight: 500; letter-spacing: -0.01em; }
.cap-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.cap-card .cap-more {
  margin-top: auto; font-size: 13px; color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 5px; padding-top: var(--space-3);
}
.cap-card .cap-more svg { width: 14px; height: 14px; transition: transform var(--duration-base) var(--ease-out); }
.cap-card:hover .cap-more svg { transform: translateX(3px); }
[dir="rtl"] .cap-card:hover .cap-more svg { transform: translateX(-3px) scaleX(-1); }

/* 双语演示 */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.duo-card { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.duo-top { display: flex; align-items: center; justify-content: space-between; }
.duo-lang { font-size: 13px; color: var(--text-tertiary); letter-spacing: 0.04em; }
.duo-text { min-height: 96px; font-size: 17px; line-height: 1.75; }
.duo-text.ug { font-family: var(--font-uyghur); direction: rtl; text-align: right; font-size: 18px; line-height: 1.9; }
.duo-player {
  display: flex; align-items: center; gap: var(--space-3);
  padding-top: var(--space-4); border-top: 1px solid var(--line-subtle);
}
.play-btn {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
  transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast);
}
.play-btn:hover { background: var(--accent-hover); }
.play-btn:active { transform: scale(0.94); }
.play-btn svg { width: 14px; height: 14px; }
.play-btn.is-playing svg.i-play { display: none; }
.play-btn:not(.is-playing) svg.i-pause { display: none; }

/* 轨道 */
.track { flex: 1; height: 28px; position: relative; cursor: pointer; }
.track canvas { width: 100%; height: 100%; }
.track-time {
  font-size: 12px; color: var(--text-tertiary);
  font-variant-numeric: tabular-nums; flex: none;
}

/* 价格 */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); align-items: stretch; }
.price-card { padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.price-card > .btn { margin-top: auto; }
.price-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
  position: relative;
}
.price-tag { display: flex; align-items: baseline; gap: 6px; }
.price-tag .num { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.price-tag .unit { font-size: 13px; color: var(--text-tertiary); }
.price-card ul { display: flex; flex-direction: column; gap: 10px; }
.price-card li { display: flex; gap: 9px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.price-card li svg { width: 14px; height: 14px; flex: none; margin-top: 4px; color: var(--text-primary); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line-subtle); }
.faq-item:first-child { border-top: 1px solid var(--line-subtle); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-5) 0;
  font-size: 16px; font-weight: 500; text-align: left;
  transition: color var(--duration-fast);
}
[dir="rtl"] .faq-q { text-align: right; }
.faq-q .plus { position: relative; width: 14px; height: 14px; flex: none; }
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; height: 1.5px;
  background: var(--text-tertiary); border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out);
}
.faq-q .plus::after { transform: rotate(90deg); }
.faq-item.is-open .plus::after { transform: rotate(0deg); }
.faq-a {
  font-size: 15px; color: var(--text-secondary); line-height: 1.75;
  max-height: 0; overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out),
              padding var(--duration-slow) var(--ease-out);
}
.faq-item.is-open .faq-a { max-height: 320px; padding-bottom: var(--space-5); }

/* 页脚 */
.site-foot {
  border-top: 1px solid var(--line-subtle);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: var(--space-20);
}
.foot-grid { display: flex; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
.foot-brand { max-width: 320px; }
.foot-brand p { font-size: 13px; color: var(--text-tertiary); line-height: 1.7; margin-top: var(--space-3); }
.foot-cols { display: flex; gap: var(--space-12); flex-wrap: wrap; }
.foot-col h4 { font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-bottom: var(--space-3); letter-spacing: 0.06em; }
.foot-col a, .foot-col span { display: block; font-size: 13px; color: var(--text-secondary); padding: 5px 0; }
.foot-col a:hover { color: var(--text-primary); }
/* 微信公众号二维码 */
.foot-qr img {
  display: block; width: 104px; height: 104px;
  border-radius: 10px; border: 1px solid var(--line-subtle);
  background: #fff; padding: 4px; margin-top: 2px;
}
.foot-qr .qr-tip { font-size: 11px; color: var(--text-tertiary); padding-top: 6px; }
.foot-legal a { color: var(--text-secondary); text-decoration: none; }
.foot-legal a:hover { color: var(--accent); text-decoration: underline; }
.foot-legal {
  margin-top: var(--space-10); padding-top: var(--space-6);
  border-top: 1px solid var(--line-subtle);
  display: flex; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; font-size: 12px; color: var(--text-tertiary);
}

/* ---------------- 8. 应用外壳 ---------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: 100vh; height: 100dvh;
  overflow: hidden;
}

.sidebar {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line-subtle);
  background: var(--bg-base);
  padding: var(--space-4) var(--space-3);
  min-width: 0;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 18px;
}
.side-ext {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.side-ext:hover { background: var(--bg-subtle); color: var(--text-primary); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-group-label {
  font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.06em;
  padding: var(--space-4) 10px var(--space-2);
}
.side-link {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 14px; color: var(--text-secondary);
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  position: relative;
}
.side-link svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.side-link:hover { background: var(--bg-subtle); color: var(--text-primary); }
/* 选中：与音色库分类药丸同一套语言（实心品牌蓝 + 白字） */
.side-link.is-active {
  background: var(--accent); color: var(--text-inverse);
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(10, 132, 255, 0.18),
              0 8px 20px -8px rgba(10, 132, 255, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-weight: 500;
}
.side-link.is-active svg { opacity: 1; }
.side-link.is-active:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--text-inverse); }
.side-link .soon {
  margin-inline-start: auto; font-size: 10px; color: var(--text-tertiary);
  border: 1px solid var(--line-subtle); border-radius: 5px; padding: 1px 4px;
}
.side-link.is-active .soon {
  color: rgba(255, 255, 255, 0.92); border-color: rgba(255, 255, 255, 0.4);
}
.side-link.is-soon { opacity: 0.62; }
.side-link.is-soon:hover { opacity: 0.85; background: var(--bg-subtle); }
.side-foot { margin-top: auto; padding-top: var(--space-4); }
.quota-box {
  border: 1px solid var(--line-subtle); background: var(--bg-card);
  border-radius: var(--radius-md); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.quota-ring { width: 26px; height: 26px; flex: none; }
.quota-text { min-width: 0; }
.quota-text .q1 { font-size: 12px; font-weight: 500; line-height: 1.3; }
.quota-text .q2 { font-size: 11px; color: var(--text-tertiary); }
.side-user {
  display: flex; align-items: center; gap: 9px; margin-top: 10px;
  padding: 6px 6px; border-radius: 10px;
}
.side-user:hover { background: var(--bg-subtle); }
.avatar-me {
  width: 26px; height: 26px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4DA3FF, #0A84FF); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 500; flex: none;
}
.side-user .u-name { font-size: 13px; line-height: 1.2; }
.side-user .u-plan { font-size: 10px; color: var(--text-tertiary); }

/* 主区 */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg-base); }
.appbar {
  height: 56px; flex: none;
  display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--line-subtle);
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.appbar-title { font-size: 14px; font-weight: 500; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }

/* 中央标签切换（合成 / 设计 / 克隆） */
.seg {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: var(--radius-full);
  background: var(--bg-subtle);
}
.seg button {
  height: 30px; padding: 0 16px; border-radius: var(--radius-full);
  font-size: 13px; color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}
.seg button:hover { color: var(--text-primary); }
.seg button.is-active {
  background: var(--bg-card); color: var(--text-primary);
  font-weight: 500; box-shadow: var(--shadow-sm);
}

/* 工作区三列 */
.studio { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--voicepane-w); overflow: hidden; }
.studio-main {
  padding: var(--space-6) var(--space-6) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-4);
  overflow-y: auto; min-width: 0;
}
.studio-scroll { display: flex; flex-direction: column; gap: var(--space-4); flex: 1; }

/* 编辑器 */
.editor {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column;
  min-height: 320px;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.editor:focus-within { border-color: var(--line-default); box-shadow: 0 6px 28px rgba(0, 0, 0, 0.05); }
.editor-top {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-5) 0;
}
.editor-top .seg { margin-left: auto; background: transparent; padding: 0; gap: 4px; }
.editor-top .seg button { height: 26px; padding: 0 10px; font-size: 12px; }
.editor-body { flex: 1; padding: var(--space-4) var(--space-5); display: flex; }
.editor textarea {
  width: 100%; min-height: 190px; resize: none;
  border: 0; outline: none; background: transparent;
  font-size: 17px; line-height: 1.8; color: var(--text-primary);
  font-family: inherit;
}
.editor textarea::placeholder { color: var(--text-tertiary); }
.editor textarea.ug {
  font-family: var(--font-uyghur);
  direction: rtl; text-align: right;
  font-size: 19px; line-height: 1.95;
}
.editor-bar {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5) var(--space-4);
  border-top: 1px solid var(--line-subtle);
  flex-wrap: wrap;
}
.param-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: var(--radius-full);
  border: 1px solid var(--line-subtle); background: var(--bg-card);
  font-size: 13px; color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}
.param-chip:hover { border-color: var(--line-default); color: var(--text-primary); background: var(--bg-inset); }
.param-chip b { font-weight: 500; color: var(--text-primary); }
.param-chip svg { width: 13px; height: 13px; opacity: 0.6; }
.param-chip .av {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 9px; color: #fff; flex: none;
}
.gen-btn {
  margin-left: auto;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
  transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast);
  position: relative;
}
.gen-btn:hover { background: var(--accent-hover); }
.gen-btn:active { transform: scale(0.94); }
.gen-btn svg { width: 18px; height: 18px; }
.gen-btn.is-busy { pointer-events: none; }
.gen-btn.is-busy svg { display: none; }
.gen-btn.is-busy::after {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.32); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 播放条 */
.player {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
}
.player-main { flex: 1; display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.player-meta { min-width: 0; }
.player-meta .pm1 { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta .pm2 { font-size: 11px; color: var(--text-tertiary); }
.player-actions { display: flex; align-items: center; gap: 2px; }

/* 结果区 */
.result-list { display: flex; flex-direction: column; gap: var(--space-2); }
.result-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-4);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  animation: rise var(--duration-slow) var(--ease-out) forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-row .rr-title { font-size: 13px; width: 168px; flex: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-row .rr-voice { font-size: 11px; color: var(--text-tertiary); width: 96px; flex: none; }
.result-row .track { height: 24px; }
.result-row .rr-actions { display: flex; gap: 2px; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-3); padding: var(--space-12) var(--space-6);
  color: var(--text-tertiary); text-align: center;
}
.empty svg { width: 34px; height: 34px; opacity: 0.35; }
.empty p { font-size: 13px; line-height: 1.6; max-width: 300px; }

/* ---------------- 9. 音色面板 ---------------- */
.voicepane {
  border-left: 1px solid var(--line-subtle);
  background: var(--bg-base);
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}
.voicepane-head { padding: var(--space-4) var(--space-4) 0; }
.pane-tabs { display: flex; gap: var(--space-4); border-bottom: 1px solid var(--line-subtle); margin-top: var(--space-3); }
.pane-tabs button {
  font-size: 13px; color: var(--text-tertiary); padding: 0 0 10px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--duration-fast) var(--ease-out);
}
.pane-tabs button:hover { color: var(--text-secondary); }
.pane-tabs button.is-active { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 500; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px;
  background: var(--bg-subtle); border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-out);
}
.search-box:focus-within { background: var(--bg-card); border-color: var(--line-default); }
.search-box svg { width: 14px; height: 14px; color: var(--text-tertiary); flex: none; }
.search-box input {
  border: 0; background: transparent; outline: none; width: 100%;
  font-size: 13px; color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-tertiary); }

.cat-row {
  display: flex; gap: 6px; overflow-x: auto; padding: var(--space-3) var(--space-4);
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { flex: none; height: 27px; font-size: 12px; padding: 0 10px; }

.voice-list { flex: 1; overflow-y: auto; padding: 0 var(--space-3) var(--space-4); }
.voice-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius-md);
  cursor: pointer; border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}
.voice-item:hover { background: var(--bg-card); border-color: var(--line-subtle); }
.voice-item.is-selected { background: var(--bg-card); border-color: var(--line-default); box-shadow: var(--shadow-sm); }
.v-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 500;
  position: relative; overflow: hidden;
}
.v-avatar::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 30% 10%, rgba(255,255,255,0.35), transparent 60%);
}
.v-info { min-width: 0; flex: 1; }
.v-name { font-size: 13px; font-weight: 500; line-height: 1.35; display: flex; align-items: center; gap: 5px; }
.v-tag { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-actions { display: flex; align-items: center; gap: 0; opacity: 0; transition: opacity var(--duration-fast); }
.voice-item:hover .v-actions, .voice-item.is-selected .v-actions { opacity: 1; }
.v-actions .icon-btn { width: 26px; height: 26px; }
.v-actions .icon-btn svg { width: 14px; height: 14px; }
.v-eq { display: flex; align-items: flex-end; gap: 1.5px; height: 12px; }
.v-eq i { width: 2px; background: var(--tint); border-radius: 1px; animation: eq 0.9s var(--ease-in-out) infinite; }
.v-eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.v-eq i:nth-child(2) { height: 90%; animation-delay: 0.15s; }
.v-eq i:nth-child(3) { height: 60%; animation-delay: 0.3s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }

/* ---------------- 10. 面板：音色设计 / 克隆 ---------------- */
.panel-wrap { padding: var(--space-6); overflow-y: auto; flex: 1; }
.form-card { padding: var(--space-8); max-width: 760px; margin: 0 auto; }
.field { margin-bottom: var(--space-6); }
.field > label { display: block; font-size: 13px; font-weight: 500; margin-bottom: var(--space-2); }
.field .hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; line-height: 1.6; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-default);
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 11px 13px; font-size: 14px; outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  height: 34px; padding: 0 14px; border-radius: var(--radius-full);
  border: 1px solid var(--line-default); font-size: 13px; color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}
.opt:hover { border-color: var(--line-strong); }
.opt.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dropzone {
  border: 1.5px dashed var(--line-default); border-radius: var(--radius-lg);
  padding: var(--space-8); text-align: center; cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  background: var(--bg-inset);
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-subtle); }
.dropzone svg { width: 24px; height: 24px; margin: 0 auto var(--space-3); color: var(--text-tertiary); }
.dropzone .dz1 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.dropzone .dz2 { font-size: 12px; color: var(--text-tertiary); }

.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6; cursor: pointer;
}
.check input { margin: 3px 0 0; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }

.steps { display: flex; flex-direction: column; gap: var(--space-3); }
.step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-tertiary); }
.step .dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-default); display: grid; place-items: center;
}
.step.is-done { color: var(--text-primary); }
.step.is-done .dot { background: var(--success); border-color: var(--success); }
.step.is-done .dot::after {
  content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.step.is-active .dot { border-color: var(--tint); animation: pulse 1.4s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 112, 61, 0.28); }
  50% { box-shadow: 0 0 0 5px rgba(194, 112, 61, 0); }
}

/* ---------------- 11. 音色库页 ---------------- */
.page { min-height: 100vh; }
.page-head { padding: var(--space-10) 0 var(--space-8); }
.page-head h1 { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: var(--space-3); }
.page-head p { font-size: 15px; color: var(--text-secondary); max-width: 620px; line-height: 1.7; }
.filter-bar {
  display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap; padding: var(--space-4) 0; margin-bottom: var(--space-4);
}
.voice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.vg-card { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.vg-top { display: flex; align-items: center; gap: 10px; }
.vg-top .v-avatar { width: 40px; height: 40px; border-radius: var(--radius-md); font-size: 15px; }
.vg-desc { font-size: 12px; color: var(--text-tertiary); line-height: 1.6; min-height: 38px; }
.vg-foot {
  display: flex; align-items: center; gap: var(--space-2);
  padding-top: var(--space-3); border-top: 1px solid var(--line-subtle); margin-top: auto;
}

/* ---------------- 12. 历史 / 表格 ---------------- */
.table-wrap { border: 1px solid var(--line-subtle); border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--text-tertiary);
  padding: 12px 16px; background: var(--bg-inset);
  border-bottom: 1px solid var(--line-subtle); white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-subtle); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background var(--duration-fast); }
table.tbl tbody tr:hover { background: var(--bg-inset); }
[dir="rtl"] table.tbl th, [dir="rtl"] table.tbl td { text-align: right; }

/* ---------------- 13. 用量 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.stat { padding: var(--space-5); }
.stat .s-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 8px; }
.stat .s-value { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.stat .s-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }

.chart-card { padding: var(--space-6); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: var(--space-4); }
.chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart .bar {
  width: 100%; max-width: 26px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #6FB8FF 0%, #0A84FF 92%);
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.18);
  transition: height var(--duration-slow) var(--ease-out), background var(--duration-fast);
  min-height: 3px;
}
.chart .bar-col:hover .bar { background: linear-gradient(180deg, #0A84FF, #5E5CE6); }
.chart .bar-x { font-size: 10px; color: var(--text-tertiary); white-space: nowrap; }

/* ---------------- 14. API 页 ---------------- */
.api-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.api-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 3px; }
.api-nav a {
  font-size: 13px; color: var(--text-secondary);
  padding: 8px 14px; border-radius: var(--radius-full);
  line-height: 1.3;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.api-nav a:hover { color: var(--text-primary); background: var(--bg-subtle); }
.api-nav a.is-active {
  background: var(--accent); color: var(--text-inverse); font-weight: 500;
  box-shadow: 0 2px 4px rgba(10, 132, 255, 0.18),
              0 8px 20px -10px rgba(10, 132, 255, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.code-block {
  background: #16161A; color: #E8E8ED;
  border-radius: var(--radius-lg); overflow: hidden;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
  direction: ltr; text-align: left;
}
.code-head {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans); font-size: 12px; color: #9A9AA2;
}
.code-head .tabs { display: flex; gap: 4px; }
.code-head .tabs button {
  color: #9A9AA2; padding: 3px 10px; border-radius: 6px; font-size: 12px;
  transition: all var(--duration-fast);
}
.code-head .tabs button.is-active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.code-body { padding: 16px; overflow-x: auto; }
.code-body pre { margin: 0; white-space: pre; }
.code-body .c-key { color: #9CDCFE; }
.code-body .c-str { color: #CE9178; }
.code-body .c-cmt { color: #6A9955; }
.code-body .c-fn { color: #DCDCAA; }

.endpoint {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md); background: var(--bg-card);
  margin-bottom: 8px; font-size: 13px;
}
.method {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px; flex: none;
}
.method.post { background: #EAF3FF; color: #1155B8; }
.method.get { background: #EAF9EE; color: #1C7C3D; }
.method.del { background: #FFF0EF; color: #B3261E; }
.endpoint code { font-family: var(--font-mono); font-size: 12.5px; }
.endpoint .ep-desc { margin-left: auto; font-size: 12px; color: var(--text-tertiary); }

/* ---------------- 15. 登录 ---------------- */
.auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 1fr 1fr;
}
.auth-visual {
  position: relative; overflow: hidden;
  background: var(--bg-subtle);
  display: grid; place-items: center;
  padding: var(--space-12);
  border-right: 1px solid var(--line-subtle);
}
.auth-visual .quote { max-width: 380px; }
.auth-visual .quote h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: var(--space-4); }
.auth-visual .quote p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.auth-visual .wave-host { position: absolute; inset: auto 0 12% 0; height: 200px; opacity: 0.9; }
.auth-form-wrap { display: grid; place-items: center; padding: var(--space-8); }
.auth-card { width: 100%; max-width: 360px; }
.auth-card h1 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .sub { font-size: 13px; color: var(--text-tertiary); margin-bottom: var(--space-8); }
.auth-card .field { margin-bottom: var(--space-4); }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin: var(--space-4) 0 var(--space-6); }
.auth-demo {
  margin-top: var(--space-6); padding: 10px 12px;
  background: var(--tint-soft); border-radius: var(--radius-md);
  font-size: 12px; color: #8A4E24; line-height: 1.6;
}

/* ---------------- 16. Toast / 弹层 ---------------- */
.toast-stack {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 200;
  pointer-events: none; align-items: center;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: rgba(29, 29, 31, 0.92); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-full);
  font-size: 13px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  animation: toast-in var(--duration-base) var(--ease-out) both;
}
.toast svg { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: var(--space-6);
  animation: fade-in var(--duration-base) var(--ease-out) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 460px;
  background: var(--bg-elevated); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop); padding: var(--space-6);
  animation: modal-in var(--duration-base) var(--ease-out) both;
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.modal p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-2); }

/* 全局提示条：演示环境 */
.demo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: var(--radius-full);
  background: var(--tint-soft); color: #8A4E24;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em;
}
.demo-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--tint); }

/* ---------------- 17. 响应式 ---------------- */
@media (max-width: 1180px) {
  .voice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .float-card.f3 { display: none; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 72px; --voicepane-w: 300px; }
  .sidebar .side-link span, .sidebar .side-group-label,
  .sidebar .brand-name, .sidebar .brand-sub,
  .sidebar .quota-text, .sidebar .side-user .u-name, .sidebar .side-user .u-plan { display: none; }
  .sidebar { align-items: center; }
  .sidebar-head { padding: 6px 0 16px; justify-content: center; }
  .sidebar .side-ext { display: none; }
  .side-link { justify-content: center; padding: 0; width: 44px; }
  .side-link .soon { display: none; }
  .quota-box { justify-content: center; padding: 8px; }
  .studio { grid-template-columns: minmax(0, 1fr) 288px; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .hero-stage { min-height: 400px; }
  .cards-3, .price-grid, .duo { grid-template-columns: 1fr; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 820px) {
  :root { --fs-hero: 36px; --fs-section: 28px; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .voicepane {
    position: fixed; right: 0; top: 0; bottom: 0; width: 320px; z-index: 90;
    transform: translateX(100%); transition: transform var(--duration-base) var(--ease-out);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.1);
  }
  .voicepane.is-open { transform: none; }
  .hero { padding: var(--space-12) 0 var(--space-10); }
  .section { padding: var(--space-12) 0; }
  .facts-strip { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr 1fr; }
  .top-nav { display: none; }
  .api-grid { grid-template-columns: 1fr; }
  .api-nav { display: none; }
  .foot-cols { gap: var(--space-8); }
  .appbar .seg button { padding: 0 10px; font-size: 12px; }
}

/* ---------------- 18. 工作台内容容器（覆盖第 8 节） ---------------- */
.studio-main { padding: 0; overflow: hidden; }
.studio-pad {
  padding: var(--space-6) var(--space-6) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-4);
  overflow-y: auto; flex: 1; min-width: 0;
}
.panel-wrap {
  padding: var(--space-6); overflow-y: auto; flex: 1;
  display: flex; flex-direction: column;
}
.studio.no-pane { grid-template-columns: minmax(0, 1fr); }
.studio.no-pane .voicepane { display: none; }

/* ---------------- 19. 滚动淡入 ---------------- */
/* 保持克制：只做轻微位移，不做透明度动画，避免首屏空白与截图残缺 */
.float-card { will-change: transform; }

/* ---------------- 20. RTL 修正（图标方向不会自动反） ---------------- */
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line-subtle); }
[dir="rtl"] .voicepane { border-left: 0; border-right: 1px solid var(--line-subtle); }
[dir="rtl"] .gen-btn, [dir="rtl"] .btn svg[data-flip] { transform: scaleX(-1); }
[dir="rtl"] .float-card.f1, [dir="rtl"] .float-card.f3 { right: auto; left: -6px; }
[dir="rtl"] .float-card.f2 { left: auto; right: -14px; }
[dir="rtl"] #langLabel { font-family: var(--font-sans); }

/* 中文段落在维语界面中：保留逻辑顺序（数字不乱跳），仍右对齐 */
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] .hero-fact span,
[dir="rtl"] .fact p,
[dir="rtl"] .v-tag,
[dir="rtl"] .vg-desc,
[dir="rtl"] .rr-title,
[dir="rtl"] .vr-desc,
[dir="rtl"] .foot-brand p {
  unicode-bidi: plaintext;
}
@media (max-width: 820px) {
  [dir="rtl"] .voicepane { transform: translateX(-100%); }
  [dir="rtl"] .voicepane.is-open { transform: none; }
  .studio-pad { padding: var(--space-3); }
}

@media (max-width: 560px) {
  .wrap { padding: 0 var(--space-4); }
  .voice-grid { grid-template-columns: 1fr; }
  .duo-card, .cap-card, .price-card { padding: var(--space-5); }
  .hero-facts { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .studio-main { padding: var(--space-3); }
  .editor textarea { font-size: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .result-row .rr-voice, .result-row .rr-title { width: auto; }
  .result-row .rr-voice { display: none; }
}

/* ---------------- 21. 图标与杂项修正 ---------------- */
[data-ico] {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; line-height: 0;
}
.badge svg { width: 12px; height: 12px; }
.appbar > .seg { margin: 0 auto; }
.appbar > .seg button { white-space: nowrap; }
.usage-cols { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 1024px) {
  .usage-cols { grid-template-columns: 1fr !important; }
}
.code-body .c-kw { color: #C586C0; }
.code-body [data-code].hidden { display: none; }
.auth-card .brand { margin-bottom: 32px; }
.duo-text.ug { word-break: break-word; }
.voice-item .v-name .badge { flex: none; }
table.tbl code {
  background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px;
  font-size: 12px; direction: ltr; display: inline-block;
}

/* 名称 / 说明必须各占一行，避免挤成一句 */
.fc-name, .fc-meta { display: block; }
.fc-head > span:last-child { min-width: 0; }
.v-name { display: flex; align-items: center; gap: 5px; }
.v-tag { display: block; }
.quota-text .q1, .quota-text .q2 { display: block; }
.quota-text .q1 { white-space: nowrap; }
.side-user .u-name, .side-user .u-plan { display: block; }
.side-user > span:last-child { min-width: 0; }
.float-card.f1 { width: 216px; }
.float-card.f3 { width: 200px; }

/* 表格：操作列不换行 */
table.tbl td:last-child { white-space: nowrap; }
table.tbl td .icon-btn { display: inline-flex; }

/* 登录页：左右两栏自身也撑满，避免父级高度异常时留白 */
.auth-visual, .auth-form-wrap { min-height: 100vh; }

/* hidden 属性必须胜出（.badge 等 display 会覆盖 UA 的 [hidden]） */
[hidden] { display: none !important; }

html, body { max-width: 100%; overflow-x: hidden; }

/* ---------------- 22. 移动端专项修正 ---------------- */
@media (max-width: 820px) {
  .appbar { padding: 0 12px; gap: 8px; }
  .appbar-title { display: none; }
  /* 没有居中分段控件的页面（首页/用量/历史/API）保留标题，避免顶栏左边空着 */
  .appbar:not(:has(.seg)) .appbar-title { display: block; font-size: 13px; white-space: nowrap; }
  .appbar .demo-pill { display: none; }
  .appbar > .seg { margin: 0 auto; }
  .appbar .seg { padding: 2px; }
  .appbar .seg button { padding: 0 10px; font-size: 12px; }

  .studio-pad { padding: 12px; overflow-x: hidden; }
  .editor { border-radius: var(--radius-lg); min-height: 260px; }
  .editor-top { padding: 12px 14px 0; }
  .editor-top .tertiary { display: none; }
  .editor-body { padding: 8px 14px; }
  .editor textarea { min-height: 130px; font-size: 16px; }
  .editor-bar { padding: 10px 12px 12px; gap: 6px; }
  .param-chip { height: 30px; padding: 0 9px; font-size: 12px; }
  #charCount { display: none; }
  .gen-btn { width: 40px; height: 40px; }

  .player { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; gap: 8px; }
  .play-btn { width: 34px; height: 34px; }
  .player-main { flex: 1 1 auto; min-width: 0; }
  .player-meta .pm1 { font-size: 12.5px; }
  .player-actions { order: 1; margin-left: auto; }
  .player .track { order: 2; flex: 1 0 100%; max-width: none !important; height: 24px; }
  .player .track-time { order: 3; margin-left: auto; }

  .result-row { flex-wrap: wrap; row-gap: 6px; }
  .result-row .rr-title { order: 2; flex: 1 1 0; min-width: 0; width: auto; max-width: none; }
  .result-row .track { order: 3; flex: 1 0 100%; min-width: 0; }
  .result-row .track-time { order: 4; margin-left: auto; }
  .result-row > .icon-btn { order: 1; }
  .result-row .rr-actions { order: 5; }
}

@media (max-width: 560px) {
  .site-top .wrap { gap: 10px; }
  .brand-sub { display: none; }
  .top-actions { gap: 4px; margin-left: auto; }
  #langToggle { padding: 0 8px; }
  #langToggle span { display: none; }
  .top-actions .btn-primary { height: 36px; padding: 0 14px; font-size: 13px; }
  .hero h1 { font-size: 32px; }
  .hero-lead { font-size: 15px; }
  .hero-cta .btn { height: 46px; padding: 0 20px; font-size: 14px; }
  .hero-cta { gap: 8px; }
  .section-head h2 { font-size: 26px; }
  .foot-grid { gap: var(--space-6); }
  .foot-cols { gap: var(--space-8); }
  .auth-form-wrap { padding: 24px 20px; }
  .auth-card h1 { font-size: 22px; }
  .page-head h1 { font-size: 26px; }
  table.tbl th, table.tbl td { padding: 10px 10px; }
}

/* ---------------- 22. 控制台首页（dashboard.html） ---------------- */
.dash-cols {
  display: grid; grid-template-columns: 1.45fr 1fr;
  gap: var(--space-4); margin-top: var(--space-4); align-items: stretch;
}
.dash-compose { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  font-size: 14px; font-weight: 500; margin-bottom: var(--space-1);
}
.dash-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 400; color: var(--text-tertiary);
}
.dash-more:hover { color: var(--accent); }
.dash-ta {
  width: 100%; min-height: 132px; flex: 1; resize: none;
  border: 1px solid var(--line-subtle); border-radius: var(--radius-md);
  background: var(--bg-inset); padding: 14px 16px;
  font-size: 15px; line-height: 1.85; color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.dash-ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--bg-card); }
.dash-ta.ug { font-family: var(--font-uyghur); font-size: 17px; line-height: 2; }
.dash-bar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.dash-bar .btn { margin-inline-start: auto; }
.dash-sel {
  height: 34px; padding: 0 30px 0 12px; border-radius: var(--radius-full);
  border: 1px solid var(--line-default); background-color: var(--bg-card);
  font-size: 13px; color: var(--text-secondary); max-width: 190px;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%),
                    linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
[dir="rtl"] .dash-sel {
  padding: 0 12px 0 30px;
  background-position: 15px 15px, 10px 15px;
}
.dash-sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.dash-note { font-size: 12px; color: var(--text-tertiary); line-height: 1.7; }
.dash-note a { color: var(--accent); }

.dash-links { padding: var(--space-5); display: flex; flex-direction: column; gap: 2px; }
.dash-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: background var(--duration-fast) var(--ease-out);
}
.dash-link:hover { background: var(--bg-subtle); }
.dl-ico {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-subtle); color: var(--accent);
}
.dl-ico svg { width: 16px; height: 16px; }
.dl-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dl-body b { font-size: 13.5px; font-weight: 500; }
.dl-body em {
  font-style: normal; font-size: 11.5px; color: var(--text-tertiary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-link > [data-ico]:last-child { margin-inline-start: auto; color: var(--text-tertiary); flex: none; }
.dash-link > [data-ico]:last-child svg { width: 15px; height: 15px; }

.dash-recent { margin-top: var(--space-4); padding: var(--space-5); }
.dash-list { display: flex; flex-direction: column; gap: 8px; }
.dash-list .rr-voice { width: 168px; }

@media (max-width: 1024px) {
  .dash-cols { grid-template-columns: 1fr; }
  .dash-list .rr-voice { width: 132px; }
}
@media (max-width: 820px) {
  .dash-bar .btn { margin-inline-start: 0; width: 100%; }
  .dash-sel { max-width: none; flex: 1; }
  .dash-list .rr-voice { width: auto; order: 2; }
}

/* ---------------- 23. 窄屏通用收敛 ----------------
   各页在 .studio-pad 上写了内联 padding（32/40），手机上会把内容挤窄甚至溢出，
   这里按断点统一收窄；同时放开 grid/flex 子项的 min-width，避免长下拉/按钮撑破列。 */
@media (max-width: 1024px) {
  .studio-pad { padding: 24px 20px 28px !important; }
}
@media (max-width: 820px) {
  .studio-pad { padding: 16px 14px 24px !important; }
  .card, .dash-cols > *, .dash-compose > *, .dash-bar > *, .stat-grid > * { min-width: 0; }
  .dash-sel { width: 100%; max-width: none; }
  .dash-bar { gap: 8px; }
  .dash-bar .opt-row { width: 100%; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card.stat { padding: 14px; }
}

/* 窄屏抽屉关闭时不投阴影，避免右边缘出现一条灰边 */
@media (max-width: 820px) {
  .voicepane:not(.is-open) { box-shadow: none; }
}

/* 窄屏历史表：列太多，隐藏次要列 + 定宽布局，避免表格被裁掉或行被撑高 */
@media (max-width: 820px) {
  body[data-page="history"] .table-wrap { overflow-x: auto; }
  body[data-page="history"] table.tbl { table-layout: fixed; }
  body[data-page="history"] .table-wrap th,
  body[data-page="history"] .table-wrap td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-page="history"] .table-wrap th:nth-child(3),
  body[data-page="history"] .table-wrap td:nth-child(3),
  body[data-page="history"] .table-wrap th:nth-child(5),
  body[data-page="history"] .table-wrap td:nth-child(5),
  body[data-page="history"] .table-wrap th:nth-child(6),
  body[data-page="history"] .table-wrap td:nth-child(6) { display: none; }
  body[data-page="history"] .table-wrap th:nth-child(1),
  body[data-page="history"] .table-wrap td:nth-child(1) { width: auto !important; }
  body[data-page="history"] .table-wrap th:nth-child(2),
  body[data-page="history"] .table-wrap td:nth-child(2) { width: 64px; }
  body[data-page="history"] .table-wrap th:nth-child(4),
  body[data-page="history"] .table-wrap td:nth-child(4) { width: 46px; }
  body[data-page="history"] .table-wrap th:nth-child(7),
  body[data-page="history"] .table-wrap td:nth-child(7) { width: 58px; }
  body[data-page="history"] .table-wrap td { padding: 12px 10px; }
  body[data-page="history"] .table-wrap td:last-child { display: flex; gap: 2px; align-items: center; }
}

/* ============================================================
   24. 一致性整理（2026-12-02）
   目的：把字体、圆角、控件语言收成一套；顶栏真正居中；
        侧栏可以收成图标栏；客服入口直达微信二维码。
   ============================================================ */

/* ---------------- 24.1 字体渲染 ---------------- */
body {
  letter-spacing: 0;
  text-rendering: optimizeSpeed;
  font-synthesis-weight: none;
}
h1, h2, h3, .brand-name, .appbar-title, .pm1 {
  letter-spacing: -0.01em;
}
/* 中文小字在 Windows 上容易发虚，统一提到 13px 以上并给足行高 */
.tertiary, .v-tag, .pm2, .track-time { font-size: 12px; }

/* ---------------- 24.2 顶栏：三栏网格，分段控件真正居中 ---------------- */
.appbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 18px;
  background: rgba(251, 251, 253, 0.86);
}
.appbar > .appbar-title {
  grid-column: 1;
  justify-self: start;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.appbar > .seg { grid-column: 2; justify-self: center; margin: 0 !important; }
.appbar > .appbar-right {
  grid-column: 3;
  justify-self: end;
  margin-left: 0 !important;
}

/* ---------------- 24.3 分段控件：统一成蓝色胶囊 ----------------
   注意：glass.css 把 .seg 做成了液态玻璃（白色滑动透镜），它只在营销页的
   玻璃演示区使用。控制台里要用「蓝色胶囊」这一套，所以这里按 .app 作用域
   覆盖回去，并把玻璃透镜关掉，避免两套选中态打架。 */
.app .seg {
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-full);
  background: rgba(118, 118, 128, 0.10);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app .seg .seg-lens { display: none; }
.app .seg button {
  height: 30px;
  padding: 0 15px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.app .seg button:hover { color: var(--text-primary); }
.app .seg button.is-active {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.30),
              0 6px 14px -6px rgba(10, 132, 255, 0.65),
              inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.app .seg button.is-active:hover { color: var(--text-inverse); }

/* 编辑区里的语言切换：同一套语言，尺寸收小 */
.app .editor-top .seg {
  background: rgba(118, 118, 128, 0.08);
  padding: 2px;
  gap: 2px;
  margin-inline-start: auto;
}
.app .editor-top .seg button { height: 26px; padding: 0 12px; font-size: 12px; }

/* ---------------- 24.4 侧栏：折叠按钮 + 图标栏 ---------------- */
.app {
  position: relative;
  transition: grid-template-columns var(--duration-slow) var(--ease-out);
}
.sidebar { position: relative; padding-bottom: 30px; }
.side-collapse {
  position: absolute;
  right: -13px;
  bottom: 5px;
  z-index: 70;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  color: var(--text-tertiary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: color var(--duration-fast), background var(--duration-fast),
              box-shadow var(--duration-fast), transform var(--duration-base) var(--ease-out);
}
.side-collapse svg { width: 14px; height: 14px; }
.side-collapse:hover {
  color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(10, 132, 255, 0.18);
}
.side-collapse:active { transform: scale(0.94); }
/* 底部账号行给按钮让位，避免文字压到按钮下面 */
.side-user { padding-right: 20px; }

.app.is-rail { --sidebar-w: 76px; }
.app.is-rail .sidebar { padding: 12px 8px 30px; align-items: center; }
.app.is-rail .sidebar-head { padding: 2px 0 14px; justify-content: center; }
.app.is-rail .brand-name,
.app.is-rail .side-ext,
.app.is-rail .side-link span,
.app.is-rail .side-link .soon,
.app.is-rail .quota-text,
.app.is-rail .side-user .u-name,
.app.is-rail .side-user .u-plan { display: none; }
.app.is-rail .side-link {
  width: 44px; height: 44px; padding: 0;
  justify-content: center;
}
.app.is-rail .side-link svg { width: 18px; height: 18px; }
.app.is-rail .quota-box { width: 44px; padding: 8px; justify-content: center; }
.app.is-rail .quota-ring { width: 22px; height: 22px; }
.app.is-rail .side-user { width: 44px; padding: 5px 0; justify-content: center; }
.app.is-rail .side-collapse svg { transform: rotate(180deg); }
/* 图标栏下给链接一点提示 */
.app.is-rail .side-link::after {
  content: attr(data-tip);
  position: absolute;
  inset-inline-start: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 11.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
  z-index: 80;
}
.app.is-rail .side-link:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }
@media (max-width: 1024px) { .side-collapse { display: none; } .app.is-rail .side-link::after { display: none; } }

/* ---------------- 24.5 客服入口 + 微信二维码气泡 ---------------- */
.cs-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 140;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.35),
              0 10px 26px -8px rgba(10, 132, 255, 0.60);
  transition: transform var(--duration-base) var(--ease-out),
              background var(--duration-fast), box-shadow var(--duration-fast);
}
.cs-fab svg { width: 19px; height: 19px; }
.cs-fab:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cs-fab:active { transform: scale(0.95); }
.cs-fab[aria-expanded="true"] { box-shadow: 0 0 0 4px var(--accent-ring); }

.cs-pop {
  position: fixed;
  right: 20px; bottom: 74px;
  z-index: 141;
  width: 268px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-subtle);
  border-radius: 20px;
  box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.05);
  transform-origin: bottom right;
  animation: cs-in 240ms var(--ease-out) both;
}
@keyframes cs-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.cs-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.cs-head b { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; }
.cs-head span { display: block; font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5; margin-top: 1px; }
.cs-head .icon-btn { width: 26px; height: 26px; margin: -4px -6px 0 auto; flex: none; }
.cs-head .icon-btn svg { width: 14px; height: 14px; }
.cs-qr {
  display: grid; place-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-subtle);
}
.cs-qr img { width: 168px; height: 168px; border-radius: 8px; background: #fff; }
.cs-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.cs-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 10px;
  text-align: start;
  transition: background var(--duration-fast);
}
.cs-row:hover { background: var(--bg-subtle); }
.cs-row span { font-size: 11.5px; color: var(--text-tertiary); width: 32px; flex: none; }
.cs-row b { font-size: 12.5px; font-weight: 500; }
.cs-row svg { width: 13px; height: 13px; margin-inline-start: auto; color: var(--text-tertiary); flex: none; }
.cs-note {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
  font-size: 11px; line-height: 1.6; color: var(--text-tertiary);
}

/* ---------------- 24.6 工作台：编辑区 / 播放条 / 结果列表 ---------------- */
.studio-pad { padding: 18px 20px 20px; gap: 14px; }
.editor { border-radius: 20px; }
.editor-top { padding: 13px 18px 0; gap: 10px; }
.editor-label { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.editor-body { padding: 6px 18px 12px; }
.editor-bar { padding: 11px 16px 13px; gap: 8px; }
.param-chip { height: 33px; padding: 0 12px; background: var(--bg-card); }
.param-chip:hover { background: var(--bg-inset); }
.gen-btn { width: 42px; height: 42px; }

.player {
  border-radius: 16px;
  padding: 11px 14px;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.player-main { flex: 1 1 auto; max-width: 38%; min-width: 130px; }
.player .track { flex: 1 1 auto; min-width: 90px; max-width: none !important; height: 30px; }
.player-meta .pm1 { font-size: 13px; }
.player-meta .pm2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-actions { margin-inline-start: 2px; }

.list-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 2px; }
.list-head .eyebrow { font-size: 11px; letter-spacing: 0.12em; }
.list-head .badge { height: 19px; padding: 0 6px; font-size: 10.5px; border-radius: 6px; }
.list-head .btn { margin-inline-start: auto; }

/* 结果列表收成一张卡：行间用发丝线，不再是一堆小胶囊 */
.result-list:not(:empty) {
  gap: 0;
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  background: var(--bg-card);
  overflow: hidden;
}
@media (min-width: 821px) {
  .result-list:not(:empty) .result-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1.15fr) 86px minmax(120px, 1fr) 44px 56px;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line-subtle);
    background: transparent;
    animation: none;
  }
  .result-list .result-row:last-child { border-bottom: 0; }
  .result-list .result-row:hover { background: var(--bg-inset); }
  .result-list .result-row > .icon-btn:first-child { width: 28px; height: 28px; }
  .result-list .result-row .rr-title { width: auto; }
  .result-list .result-row .rr-voice {
    width: auto; font-size: 11.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .result-list .result-row .track { height: 26px; min-width: 0; }
  .result-list .result-row .rr-actions { justify-content: flex-end; }
}
@media (max-width: 820px) {
  .result-list:not(:empty) {
    border: 1px solid var(--line-subtle);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
    gap: 0;
  }
  .result-list .result-row {
    display: flex; flex-wrap: wrap; row-gap: 6px;
    border: 0; border-bottom: 1px solid var(--line-subtle);
    border-radius: 0; padding: 10px 12px;
    animation: none;
  }
  .result-list .result-row:last-child { border-bottom: 0; }
  .result-list .result-row .rr-title { order: 2; flex: 1 1 0; min-width: 0; width: auto; max-width: none; }
  .result-list .result-row .rr-voice { display: none; }
  .result-list .result-row .track { order: 3; flex: 1 0 100%; min-width: 0; }
  .result-list .result-row .track-time { order: 4; margin-inline-start: auto; }
  .result-list .result-row > .icon-btn { order: 1; }
  .result-list .result-row .rr-actions { order: 5; }
}

/* ---------------- 24.7 颜色 / 圆角收口 ---------------- */
.demo-pill {
  background: var(--accent-subtle);
  color: var(--accent);
  letter-spacing: 0;
}
.demo-pill i { background: var(--accent); }
.auth-demo { color: var(--text-secondary); background: var(--bg-subtle); }
.quota-box { border-radius: 12px; }
.side-user { border-radius: 12px; }
.search-box { border-radius: 11px; }
.badge { border-radius: 6px; }
.voicepane-head { padding: 14px 14px 0; }
.pane-title { font-size: 13px; font-weight: 500; }
.pane-tabs { gap: 18px; margin-top: 10px; }
.pane-tabs button { font-size: 12.5px; padding-bottom: 9px; }
.cat-row { padding: 12px 14px; }
.voice-list { padding: 0 10px 14px; }
.voice-item { border-radius: 11px; }

/* ---------------- 24.8 控制台首页收口 ---------------- */
/* 快速合成的语言切换：与工作台分段控件同一套（不引玻璃透镜，改样式不动结构） */
.dash-bar .opt-row {
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: rgba(118, 118, 128, 0.10);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}
.dash-bar .opt-row .opt {
  height: 28px; padding: 0 13px;
  border: 0; background: transparent;
  font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
}
.dash-bar .opt-row .opt:hover { color: var(--text-primary); }
.dash-bar .opt-row .opt.is-active {
  background: var(--accent); color: var(--text-inverse);
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.30), 0 6px 14px -6px rgba(10, 132, 255, 0.60);
}

/* 最近生成：不再给每行套一层边框（外层卡片已经有框了） */
.dash-list { gap: 2px; }
.dash-list .result-row {
  border: 0; border-radius: 10px;
  background: transparent;
  animation: none;
}
.dash-list .result-row:hover { background: var(--bg-subtle); }
.dash-list .result-row .rr-voice { color: var(--text-tertiary); }

/* ---------------- 24.9 排版细节：字距 / 表格 / 波形 ---------------- */
/* eyebrow 是「小标签」，中文里 0.14em 的字距会显得散，收窄；
   营销页的英文小标题保留大一点的字距。 */
.eyebrow { letter-spacing: 0.05em; }
.section-head .eyebrow, .page-head .eyebrow { letter-spacing: 0.13em; }
.list-head .eyebrow { letter-spacing: 0.05em; }

body[data-page="history"] table.tbl th { font-weight: 500; }

/* 波形：未播放部分稍微加深一点，细条也读得出来 */
.result-row .track canvas, .player .track canvas { opacity: 1; }

/* ---------------- 24.10 窄屏：顶栏回到 flex，避免分段控件压到右侧按钮 ---------------- */
@media (max-width: 820px) {
  /* grid 的 1fr 两侧列在 318px 宽度下会塌成 1px，右侧按钮直接压到分段控件上，
     这里改用 flex + margin auto 居中，宽度不够时先收按钮内边距。 */
  .appbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 54px;
  }
  .appbar > .appbar-title { display: none; }
  .appbar:not(:has(.seg)) .appbar-title { display: block; }
  .appbar > .seg { margin: 0 auto !important; }
  .appbar > .appbar-right { margin-inline-start: 0 !important; }
  .app .seg { padding: 2px; }
  .app .seg button { height: 28px; padding: 0 11px; font-size: 12.5px; }
  .app .editor-top .seg button { height: 24px; padding: 0 10px; font-size: 12px; }

  /* 播放条：第一行 播放键 + 标题，第二行整条波形，第三行 时间 + 操作 */
  .player .player-main { max-width: none; flex: 1 1 auto; }
  .player .track { order: 2; flex: 1 0 100%; }
  .player .track-time { order: 3; }
  .player-actions { order: 4; margin-inline-start: auto; }

  /* 客服按钮缩小一点，别挡住内容 */
  .cs-fab { width: 38px; height: 38px; right: 14px; bottom: 14px; }
  .cs-fab svg { width: 17px; height: 17px; }
  .cs-pop { right: 12px; bottom: 62px; width: min(268px, calc(100vw - 24px)); }
  .toast-stack { bottom: 66px; }
}

/* 窄屏编辑条：四个控件挤不进一行时会把生成按钮挤到下一行，这里统一收紧尺寸 */
@media (max-width: 820px) {
  .editor-bar { gap: 6px; padding: 10px 12px 12px; }
  .editor-bar .param-chip { height: 30px; padding: 0 9px; font-size: 12px; }
  .editor-bar .param-chip .av { width: 16px; height: 16px; font-size: 9px; }
  .editor-bar .param-chip svg { width: 12px; height: 12px; }
  .editor-bar .param-chip span.tertiary { display: none; }
  .editor-bar .gen-btn { margin-inline-start: auto; width: 38px; height: 38px; }
}
@media (max-width: 560px) {
  /* 超窄屏：音色 / 语速 / 生成 三个就够，情感收进设置里，避免控件换行显得乱 */
  .editor-bar [data-cycle="emo"] { display: none; }
}

/* ---------------- 24.11 维语（RTL）模式修正 ----------------
   侧栏镜像到右侧后，物理 left/right 会把按钮和气泡推到屏幕外。
   这些元素统一改用逻辑方向 inset-inline-*。 */
.side-collapse { right: auto; inset-inline-end: -13px; }

.cs-fab { right: auto; inset-inline-end: 20px; }
.cs-pop { right: auto; inset-inline-end: 20px; }

/* 电话 / 邮箱是拉丁字母与数字，必须按 LTR 排版，否则 RTL 下会倒序 */
.cs-row b { direction: ltr; unicode-bidi: isolate; unicode-bidi: plaintext; }

[dir="rtl"] .cs-pop { transform-origin: bottom left; }
[dir="rtl"] .cs-row span { text-align: start; }

@media (max-width: 820px) {
  .cs-fab { right: auto; inset-inline-end: 14px; }
  .cs-pop { right: auto; inset-inline-end: 12px; }
}

/* 数字串在 RTL 下会被整体倒序，这里强制 LTR 并隔离 */
.quota-text .q1,
#charCount,
.track-time,
.dash-list .rr-voice,
.stat .stat-num { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .quota-text .q1 { text-align: end; }

/* 音色分类：横向滚动时右侧渐隐，避免「半个标签」被硬切 */
.cat-row {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
}
[dir="rtl"] .cat-row {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to left, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
}

/* 窄屏筛选栏：搜索 + 收藏开关占一行，分类标签单独一行横向滚动，
   避免六个标签铺成三行把首屏顶下去。 */
@media (max-width: 820px) {
  .filter-bar { flex-wrap: wrap; gap: 8px; padding: 12px 0; margin-bottom: 8px; }
  .filter-bar .search-box { order: 1; flex: 1 1 0; min-width: 0; width: auto !important; }
  .filter-bar #favOnly { order: 2; margin-left: 0 !important; }
  .filter-bar .opt-row {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 6px !important;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
  }
  .filter-bar .opt-row::-webkit-scrollbar { display: none; }
  /* 分类按钮是 .opt（不是 .chip），必须显式禁止收缩 + 不换行 */
  .filter-bar .opt-row .opt,
  .filter-bar .opt-row .chip {
    flex: none;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* 说明：历史表里维语文本右对齐是「正确」的（RTL 从右往左读，省略号在左边），
   不要为了「看起来齐」强行改成 LTR，那样会挡住句首。*/

/* 超窄屏：只留 文本 + 时间 + 操作，中间几列全部收起 */
@media (max-width: 560px) {
  body[data-page="history"] .table-wrap th:nth-child(6),
  body[data-page="history"] .table-wrap td:nth-child(6) { display: table-cell; width: 60px; }
  body[data-page="history"] .table-wrap th:nth-child(2),
  body[data-page="history"] .table-wrap td:nth-child(2),
  body[data-page="history"] .table-wrap th:nth-child(4),
  body[data-page="history"] .table-wrap td:nth-child(4) { display: none; }
  body[data-page="history"] .table-wrap th,
  body[data-page="history"] .table-wrap td { padding: 12px 8px; }
  body[data-page="history"] .table-wrap td:last-child { width: 52px; }
}

/* 播放条：标题区按内容宽度排，别再被波形挤成省略号 */
.player-main { flex: 0 1 auto; max-width: 46%; }
.player-meta { min-width: 0; }
/* canvas 有固有像素宽度，flex-basis:auto 会把波形撑成「基准宽度」，
   结果把左侧标题挤到只剩一百来像素。基准归零，只让它占剩余空间。 */
.player .track { flex: 1 1 0; }

/* ============================================================
   25. 个人资料 / 设置 / 关于我们 / 视频合成（2026-12-02 第三轮）
   ============================================================ */

/* ---------------- 25.1 侧栏：真实头像 + 次级导航 ---------------- */
.side-user { padding: 5px 8px 5px 5px; border-radius: 12px; gap: 9px; }
.side-user .u-body { display: block; min-width: 0; flex: 1 1 auto; }
.side-user > svg {
  width: 13px; height: 13px; flex: none; opacity: 0.6;
  color: var(--text-tertiary); margin-inline-start: auto;
}
.side-user:hover > svg { opacity: 0.9; color: var(--text-secondary); }
.avatar-me { width: 30px; height: 30px; overflow: hidden; font-size: 0; }
.avatar-me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-me .avatar-fallback { display: none; }

.side-nav-minor {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
}
.side-nav-minor .side-link { height: 34px; font-size: 13px; }
.side-nav-minor .side-link svg { width: 16px; height: 16px; }

.app.is-rail .side-nav-minor { border-bottom-color: transparent; padding-bottom: 4px; margin-bottom: 4px; }
.app.is-rail .side-user { padding: 5px 0; gap: 0; }
.app.is-rail .side-user > svg { display: none; }
.app.is-rail .avatar-me { width: 32px; height: 32px; }

/* ---------------- 25.2 登录页：一整页，不再左右割裂 ---------------- */
.auth {
  grid-template-columns: 1.06fr 1fr;
  background: var(--bg-base);
}
.auth-visual {
  background: transparent;
  border-right: 0;
  padding: 56px;
}
.auth-visual .wave-host { inset: auto 0 6% 0; opacity: 0.5; }
.auth-form-wrap { padding: 48px; }
.auth-card {
  max-width: 376px;
  padding: 34px 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: 24px;
  box-shadow: 0 30px 70px -40px rgba(16, 24, 40, 0.28),
              0 1px 2px rgba(16, 24, 40, 0.04);
}
.auth-card h1 { font-size: 24px; }
.auth-card .sub { margin-bottom: 24px; }
.auth-card .field:last-of-type { margin-bottom: 0; }
@media (max-width: 1024px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-wrap { padding: 32px 20px; }
  .auth-card { max-width: 420px; }
}

/* ---------------- 25.3 页面容器 ---------------- */
.pg { width: 100%; max-width: 960px; margin: 0 auto; }
.pg-wide { max-width: 1180px; }
.pg-foot {
  margin-top: var(--space-6);
  font-size: 12.5px; color: var(--text-tertiary); line-height: 1.7;
}

/* ---------------- 25.4 个人资料 ---------------- */
.pf-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
}
.pf-ava {
  width: 66px; height: 66px; border-radius: var(--radius-full);
  object-fit: cover; flex: none; background: var(--bg-inset);
  box-shadow: 0 0 0 1px var(--line-subtle), 0 10px 24px -14px rgba(16, 24, 40, 0.4);
}
.pf-id { min-width: 0; }
.pf-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 500; letter-spacing: -0.01em;
}
.pf-mail { font-size: 13px; color: var(--text-tertiary); margin-top: 3px; }
.pf-hero-actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.pf-grid {
  display: grid; gap: 14px; margin-top: 14px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.pf-card { padding: 2px 20px 8px; }
.pf-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0 8px;
}
.pf-card-head b { font-size: 14px; font-weight: 500; }
.pf-card-head .btn { margin-inline-start: auto; }
.pf-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line-subtle);
}
.pf-row:first-of-type { border-top: 0; }
.pf-row .k { font-size: 13px; color: var(--text-secondary); }
.pf-row .v { font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.pf-row .v.mono { font-size: 13px; }
.pf-row .btn { height: 30px; padding: 0 11px; font-size: 12.5px; }
.pf-row .icon-btn { width: 26px; height: 26px; }
.pf-row .icon-btn svg { width: 14px; height: 14px; }
.pf-bar {
  height: 6px; border-radius: var(--radius-full);
  background: var(--bg-inset); overflow: hidden; margin-top: 9px;
}
.pf-bar > i {
  display: block; height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, #4DA3FF, #0A84FF);
}
.pf-note { font-size: 12px; color: var(--text-tertiary); line-height: 1.6; margin-top: 8px; }
.pf-danger { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pf-danger .btn { color: var(--danger); }
.pf-danger .btn:hover { background: var(--danger-soft); }

/* ---------------- 25.5 设置 ---------------- */
.set-card { padding: 2px 20px 8px; margin-bottom: 14px; }
.set-head {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0 6px;
}
.set-head b { font-size: 14px; font-weight: 500; }
.set-head span { font-size: 12px; color: var(--text-tertiary); }
.set-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-subtle);
}
.set-row:first-of-type { border-top: 0; }
.set-label b { display: block; font-size: 13.5px; font-weight: 500; }
.set-label span { display: block; font-size: 12px; color: var(--text-tertiary); line-height: 1.55; margin-top: 3px; }
.set-row .seg button { height: 28px; padding: 0 12px; font-size: 12.5px; }
.set-select {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line-default); border-radius: 9px;
  background: var(--bg-card); color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  max-width: 190px;
}
.set-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---------------- 25.6 关于我们 ---------------- */
.ab-hero { display: flex; align-items: center; gap: 22px; padding: 30px 30px 28px; }
.ab-logo {
  width: 62px; height: 62px; flex: none;
  border-radius: 16px; background: var(--bg-inset);
  border: 1px solid var(--line-subtle);
  display: grid; place-items: center;
}
.ab-logo img { width: 34px; height: 34px; }
.ab-hero h1 { font-size: 23px; font-weight: 500; letter-spacing: -0.02em; }
.ab-hero p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-top: 6px; max-width: 520px; }
.ab-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ab-item { padding: 18px 20px 20px; }
.ab-item .ab-ico {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 12px;
}
.ab-item .ab-ico svg { width: 16px; height: 16px; }
.ab-item b { font-size: 13.5px; font-weight: 500; }
.ab-item p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; margin-top: 6px; }
.ab-contact { display: flex; align-items: center; gap: 26px; padding: 24px 26px; margin-top: 14px; }
.ab-qr {
  width: 128px; height: 128px; flex: none;
  padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line-subtle);
}
.ab-qr img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.ab-rows { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ab-rows b { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.ab-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--text-secondary);
  padding: 5px 8px; margin-inline-start: -8px;
  border-radius: 9px; text-align: start;
}
.ab-row:hover { background: var(--bg-subtle); color: var(--text-primary); }
.ab-row svg { width: 15px; height: 15px; flex: none; color: var(--text-tertiary); }
.ab-row .mono { font-size: 13px; color: var(--text-primary); }
.ab-row em { margin-inline-start: auto; font-style: normal; font-size: 11.5px; color: var(--text-tertiary); }

/* ---------------- 25.7 视频合成 ---------------- */
.vid {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr) 316px;
  align-items: start;
}
.vid-main { padding: 14px; }
.vid-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  background: #0E1420;
  transition: aspect-ratio var(--duration-base) var(--ease-out), max-width var(--duration-base);
}
.vid-stage[data-ratio="9:16"] { aspect-ratio: 9 / 16; max-width: 292px; margin: 0 auto; }
.vid-stage[data-ratio="1:1"] { aspect-ratio: 1 / 1; max-width: 420px; margin: 0 auto; }
.vid-bg { position: absolute; inset: 0; }
.vid-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.22) 0%, rgba(6, 10, 18, 0.06) 42%, rgba(6, 10, 18, 0.62) 100%);
}
.vid-brand {
  position: absolute; top: 13px; left: 15px; z-index: 2;
  display: flex; align-items: center; gap: 7px;
  color: #fff; font-size: 11.5px; letter-spacing: 0.02em; opacity: 0.9;
}
.vid-brand img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.vid-badge {
  position: absolute; top: 12px; right: 13px; z-index: 2;
  padding: 3px 8px; border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 10.5px; backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.vid-cap {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%);
  width: 88%; z-index: 2; text-align: center;
  color: #fff; font-size: 17px; line-height: 1.55; font-weight: 500;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.vid-cap.ug { font-family: var(--font-uyghur); direction: rtl; font-size: 18px; }
.vid-wave {
  position: absolute; left: 15px; right: 15px; bottom: 13px; z-index: 2;
  height: 24px; display: flex; align-items: flex-end; gap: 2px; opacity: 0.8;
}
.vid-wave i { flex: 1 1 0; min-width: 0; background: rgba(255, 255, 255, 0.8); border-radius: 1px; }
.vid-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.vid-ctrl .play-btn { width: 36px; height: 36px; }
.vid-ctrl .play-btn svg { width: 15px; height: 15px; }
.vid-bar {
  flex: 1 1 auto; height: 4px; border-radius: var(--radius-full);
  background: rgba(29, 29, 31, 0.10); overflow: hidden; cursor: pointer;
}
.vid-bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--radius-full); }
.vid-time { font-size: 12px; color: var(--text-tertiary); min-width: 74px; }
.vid-ctrl .icon-btn { width: 30px; height: 30px; }

.vid-side { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.vid-field > label {
  display: block; font-size: 12px; color: var(--text-tertiary);
  margin-bottom: 6px;
}
.vid-ta {
  width: 100%; min-height: 78px; resize: vertical;
  padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line-subtle); background: var(--bg-inset);
  font-size: 13px; line-height: 1.65; font-family: inherit; color: var(--text-primary);
}
.vid-ta:focus { outline: none; border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px var(--accent-ring); }
.vid-sel {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-subtle); border-radius: 10px;
  background: var(--bg-card); font-size: 13px; font-family: inherit; color: var(--text-primary);
}
.vid-tpls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.vid-tpl {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 9px; overflow: hidden; cursor: pointer;
  border: 1.5px solid transparent; padding: 0;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.vid-tpl i { position: absolute; inset: 0; }
.vid-tpl em {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-style: normal; font-size: 9.5px; color: #fff;
  background: rgba(6, 10, 18, 0.42); padding: 2px 0; text-align: center;
}
.vid-tpl.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.vid-side .btn-block { height: 42px; }
.vid-side .seg { width: 100%; }
.vid-side .seg button { flex: 1 1 0; padding: 0; }

.vid-list { display: flex; flex-direction: column; gap: 8px; }
.vid-item {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line-subtle); background: var(--bg-card);
}
.vid-thumb {
  width: 58px; height: 34px; border-radius: 7px; overflow: hidden;
  background: #0E1420; position: relative; flex: none;
}
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-item .vi-body { min-width: 0; }
.vid-item b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-item span { display: block; font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.vid-item .vi-actions { display: flex; align-items: center; gap: 2px; }
.vid-item .icon-btn { width: 30px; height: 30px; }
.vid-item .icon-btn svg { width: 16px; height: 16px; }
.vid-prog {
  grid-column: 1 / -1; height: 3px; border-radius: var(--radius-full);
  background: var(--bg-inset); overflow: hidden; margin: 2px 0 -2px;
}
.vid-prog > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--radius-full); transition: width 240ms linear; }

/* ---------------- 25.8 新页面窄屏 ---------------- */
@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vid { grid-template-columns: minmax(0, 1fr); }
  .vid-side { order: 2; }
}
@media (max-width: 820px) {
  .pf-hero { flex-wrap: wrap; padding: 18px; gap: 14px; }
  .pf-ava { width: 56px; height: 56px; }
  .pf-name { font-size: 18px; }
  .pf-hero-actions { margin-inline-start: 0; width: 100%; }
  .pf-hero-actions .btn { flex: 1 1 0; justify-content: center; }
  .pf-row { grid-template-columns: 82px minmax(0, 1fr); row-gap: 6px; }
  .pf-row > .btn, .pf-row > .icon-btn { grid-column: 2; justify-self: start; }
  .pf-card, .set-card { padding: 2px 16px 6px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .set-row .seg, .set-select { width: 100%; max-width: none; }
  .set-row .seg button { flex: 1 1 0; }
  .ab-hero { flex-direction: column; align-items: flex-start; padding: 22px 20px; gap: 14px; }
  .ab-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-contact { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .vid-main { padding: 10px; }
  .vid-cap { font-size: 14px; bottom: 40px; }
  .vid-cap.ug { font-size: 15px; }
  .vid-time { min-width: 66px; font-size: 11.5px; }
  .vid-item { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 8px 10px; gap: 10px; }
  .vid-thumb { width: 48px; height: 28px; }
}

/* ---------------- 25.9 细节修正（第三轮验收） ---------------- */
/* 进度条轨道在纯白卡片上太淡，看不到 */
.pf-bar { display: block; background: rgba(118, 118, 128, 0.14); }
/* 维语标签的字形比字宽宽，给分段按钮多留一点内边距，别贴到圆角上 */
.set-row .seg button { padding: 0 15px; }

/* 关于页：联系方式与主体信息并排，避免右侧大片留白 */
.ab-two {
  display: grid; gap: 14px; margin-top: 14px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: start;
}
.ab-two .ab-contact { margin-top: 0; }
.ab-two .set-card { margin-bottom: 0; }
.ab-rows { width: 100%; max-width: 340px; }

@media (max-width: 1024px) {
  .ab-two { grid-template-columns: minmax(0, 1fr); }
  .ab-rows { max-width: none; }
}
.ab-two .ab-contact { gap: 16px; padding: 20px; }
.ab-two .ab-qr { width: 104px; height: 104px; }
.ab-two .ab-rows b { font-size: 13.5px; }

/* 资料页窄屏：标签变成小字在上，值与操作并排在下一行，别让按钮单独掉一行 */
@media (max-width: 820px) {
  .pf-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 12px 0;
  }
  .pf-row .k { grid-column: 1 / -1; font-size: 12px; color: var(--text-tertiary); }
  .pf-row .v { grid-column: 1; font-size: 13px; }
  .pf-row > .btn,
  .pf-row > .icon-btn,
  .pf-row > .badge { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; }
  .pf-row > span:empty { display: none; }
  /* 视频页空状态在窄屏上占太高，收一点，别把参数面板顶到很下面 */
  body[data-page="video"] .empty { padding: var(--space-6) 0; }
  body[data-page="video"] .empty svg { width: 28px; height: 28px; }
}
/* 图标栏模式下各分组要整体居中，否则次级导航会贴着左边缘 */
.app.is-rail .side-nav { align-items: center; }
.app.is-rail .side-nav-minor { width: 100%; }
.set-row .seg button { padding: 0 17px; }

/* ---------------- 25.10 RTL 收尾：数字/邮箱/ID 不能被倒序 ---------------- */
/* 阿拉伯语系排版下，连续的拉丁数字与符号会被整段重排（qq.com@3086824962），
   凡是以数字、邮箱、编号为主的文本一律按 LTR 隔离。 */
[dir="rtl"] .mono,
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }

/* 中文 + 数字混排（如「2025 年 3 月」「今天 12:38」）按首个强字符定方向 */
[dir="rtl"] .pf-row .v { unicode-bidi: plaintext; }

/* 3D 语义：这些按钮里是纯数字（0.8×、16:9），别让「×」跑到前面去 */
[dir="rtl"] #setSpeed button,
[dir="rtl"] #vidRatio button { direction: ltr; unicode-bidi: isolate; }

/* 视频页在平板宽度下不要直接塌成一列：右侧面板收窄到 280px 仍并排，
   真正到 900 以下再堆叠，并把预览限制在 640px 免得一方独占满屏。 */
@media (max-width: 1024px) {
  .vid { grid-template-columns: minmax(0, 1fr) 280px; }
  .vid-side { order: 0; }
}
@media (max-width: 900px) {
  .vid { grid-template-columns: minmax(0, 1fr); }
  .vid-side { order: 2; }
  .vid-main { width: 100%; max-width: 640px; margin: 0 auto; }
  .vid-side { max-width: 640px; width: 100%; margin: 0 auto; }
}

/* 视频页重排：预览左上、参数面板右侧整列贯穿、生成列表压在预览下方。
   这样 900 以下堆叠时顺序是 预览 → 参数 → 结果，不会把「生成」按钮压到最底。 */
.vid { grid-template-columns: minmax(0, 1fr) 316px; grid-template-rows: auto 1fr; }
.vid-main { grid-column: 1; grid-row: 1; }
.vid-side { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.vid-results { grid-column: 1; grid-row: 2; min-width: 0; margin-top: 4px; }

@media (max-width: 1024px) {
  .vid { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .vid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .vid-main { grid-column: 1; grid-row: 1; width: 100%; max-width: 640px; margin: 0 auto; }
  .vid-side { grid-column: 1; grid-row: 2; width: 100%; max-width: 640px; margin: 0 auto; }
  .vid-results { grid-column: 1; grid-row: 3; width: 100%; max-width: 640px; margin: 4px auto 0; }
}
