/* =========================================================
 * TTS 站设计系统：清新科技紫蓝
 * 纯原生 CSS，无外部依赖。断点：≤768 手机 / ≤1024 平板 / >1024 PC
 * ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --p1: #5b6cff;
  --p2: #3b82f6;
  --grad: linear-gradient(135deg, #5b6cff 0%, #3b82f6 100%);
  --grad-soft: linear-gradient(135deg, #eef0ff 0%, #e8f1ff 100%);
  --primary: var(--p1);
  --bg: #f3f5fd;
  --card: #ffffff;
  --text: #1b2032;
  --muted: #7a8099;
  --line: #e8eaf6;
  --danger: #ef4444;
  --ok: #10b981;
  --warn: #f59e0b;
  --radius: 18px;
  --shadow: 0 10px 34px rgba(72, 84, 190, .10);
  --shadow-sm: 0 4px 14px rgba(72, 84, 190, .08);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 85% -8%, rgba(91, 108, 255, .12), transparent 60%),
    radial-gradient(700px 380px at -10% 8%, rgba(59, 130, 246, .10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--p1); text-decoration: none; }
h1, h2, h3 { color: var(--text); }
input, select, textarea, button { font-family: inherit; font-size: 15px; }
::selection { background: rgba(91, 108, 255, .22); }

/* ---------- 顶部导航 ---------- */
#nav, .site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(91, 108, 255, .08);
}
.nav-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  font-weight: 800; font-size: 17px; letter-spacing: .3px; white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.brand .logo-dot { -webkit-text-fill-color: initial; font-size: 19px; }
/* 图片版 logo：保持与 emoji 版相近的视觉大小 */
.brand .logo-dot.logo-img {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; overflow: hidden;
  background: var(--grad-soft);
}
.brand .logo-dot.logo-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: #555b78; font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; transition: all .18s;
}
.nav-links a:hover { background: #f0f2ff; color: var(--p1); }
.nav-links a.on {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 14px rgba(91, 108, 255, .30);
}
.nav-buy {
  background: #fff7e8 !important; color: #b45309 !important;
  border: 1px solid #fde4b4;
}
.nav-buy:hover { background: #ffefd2 !important; }
/* 导航栏自定义外链：单行省略，避免挤压右侧按钮 */
.nav-links a.nav-ext {
  max-width: 120px; overflow: hidden; text-overflow: ellipsis;
  padding: 7px 10px; font-size: 13.5px; white-space: nowrap;
}
.nav-balance {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  margin-left: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--grad-soft); color: var(--p1);
  font-weight: 700; font-size: 13px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: filter .15s, box-shadow .15s, transform .15s;
}
.nav-balance:hover {
  filter: brightness(1.03); text-decoration: none;
  box-shadow: 0 4px 10px rgba(91,108,255,.18); transform: translateY(-1px);
}
.nav-redeem {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #fff !important; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 14px rgba(249, 115, 22, .28);
  transition: transform .15s, box-shadow .15s;
}
.nav-redeem:hover { transform: translateY(-1px); box-shadow: 0 9px 18px rgba(249, 115, 22, .36); }
.nav-logout { font-size: 13px !important; color: #9aa0b8 !important; }
/* 游客导航：登录/注册按钮 */
.nav-login-btn {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 8px 20px !important;
  background: var(--grad) !important; color: #fff !important;
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 14px rgba(91, 108, 255, .30);
  transition: transform .15s, box-shadow .15s;
}
.nav-login-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 18px rgba(91, 108, 255, .38); }
#synth-hint a { color: var(--p1); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* “我的”下拉菜单（PC） */
.nav-me { position: relative; }
.nav-me-trigger { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; flex: none; }
.nav-me-trigger .chev { font-size: 10px; transition: transform .18s; }
.nav-me:hover .chev, .nav-me.open .chev { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 172px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(30, 36, 80, .16);
  padding: 7px; display: none; flex-direction: column;
}
.nav-me:hover .nav-dropdown, .nav-me.open .nav-dropdown { display: flex; }
.nav-dropdown::before { content: ''; position: absolute; top: -10px; right: 0; left: 0; height: 10px; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: #3c4260; font-size: 13.5px; font-weight: 500;
}
.nav-dropdown a .di { font-size: 16px; width: 18px; text-align: center; }
.nav-dropdown a:hover { background: #f0f2ff; color: var(--p1); }
.nav-dropdown a.dd-logout { color: var(--danger); margin-top: 3px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 11px; }
.nav-dropdown a.dd-logout:hover { background: #fef2f2; color: var(--danger); }
.nav-burger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  box-shadow: var(--shadow-sm);
}
.nav-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--p1); }

/* ---------- 移动端右侧抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(24, 28, 56, .42);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(78vw, 340px);
  background: #fff;
  box-shadow: -12px 0 40px rgba(30, 36, 80, .18);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
body.drawer-open .nav-drawer { transform: translateX(0); }
body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer-head .brand { font-size: 16px; }
.drawer-close {
  width: 38px; height: 38px; border: 0; background: #f3f4fc;
  border-radius: 10px; font-size: 18px; color: #6b7194; cursor: pointer;
}
.drawer-links { flex: 1; padding: 14px 14px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.drawer-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  color: #3c4260; font-size: 16px; font-weight: 600;
}
.drawer-links a .di { font-size: 19px; width: 24px; text-align: center; }
.drawer-links a:active { background: #f3f4fd; }
.drawer-links a.on { background: #eef0ff; color: var(--p1); }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); }
.drawer-balance {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 14px; background: var(--grad-soft);
  color: var(--p1); font-weight: 700; margin-bottom: 12px; font-size: 14px;
}
.drawer-logout {
  display: block; text-align: center; width: 100%;
  border: 1px solid var(--line); background: #fff; color: #6b7194;
  padding: 12px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: 15px;
}

/* ---------- 布局容器 / 卡片 ---------- */
.container { max-width: 1000px; margin: 0 auto; padding: 20px 16px 70px; }
.card {
  background: var(--card);
  border: 1px solid rgba(91, 108, 255, .07);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 9px;
}
.card h2::before {
  content: ''; width: 4px; height: 16px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.muted { color: var(--muted); font-size: 13px; }

/* 全站公告：压缩高度，减少首页纵向占用 */
#announce {
  padding: 9px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 12px;
}

/* 用户协议 / 隐私政策弹窗（登录页） */
.legal-modal { max-width: 520px; }
.legal-body {
  max-height: 58vh; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
  font-size: 13.5px; line-height: 1.75; color: #3c4260;
  padding-right: 4px;
}
.legal-link { color: var(--p1); font-weight: 600; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #5b6078; font-weight: 500; margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  outline: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.75; }
input:focus, select:focus, textarea:focus {
  border-color: var(--p1);
  box-shadow: 0 0 0 4px rgba(91, 108, 255, .12);
}
input::placeholder, textarea::placeholder { color: #aab0c6; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px;
  padding: 12px 20px;
  background: var(--grad);
  color: #fff; font-weight: 600; font-size: 15px;
  cursor: pointer; width: 100%;
  box-shadow: 0 8px 18px rgba(91, 108, 255, .25);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(91, 108, 255, .32); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.gray { background: #f1f3fb; color: #4b5170; box-shadow: none; }
.btn.gray:hover { background: #e8ebf8; }
.btn.small { width: auto; padding: 8px 16px; font-size: 13px; border-radius: 10px; box-shadow: none; }
.btn.buy { background: linear-gradient(135deg, #fbbf24, #f97316); box-shadow: 0 8px 18px rgba(249, 115, 22, .25); }
.btn.invite-btn { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; box-shadow: 0 8px 18px rgba(139, 92, 246, .25); text-decoration: none; }
.btn.invite-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(139, 92, 246, .34); }

/* ---------- 分段选项卡（登录页） ---------- */
.tabs { display: flex; background: #eef0fa; border-radius: 13px; padding: 4px; margin-bottom: 20px; gap: 2px; }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 10px 4px;
  border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.tabs button.on {
  background: #fff; color: var(--p1);
  box-shadow: 0 3px 10px rgba(72, 84, 190, .12);
}

/* ---------- 登录/注册页 ---------- */
.auth-wrap { max-width: 430px; margin: 0 auto; padding: 40px 16px 60px; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; }
.auth-card { border-radius: 22px; }
.auth-logo {
  text-align: center; font-size: 25px; font-weight: 800; margin-bottom: 6px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-row img {
  height: 46px; width: 130px; flex: none;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #f8f9ff;
}
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.code-send {
  flex: none; width: auto; padding: 0 16px; white-space: nowrap;
  border-radius: 12px; font-size: 13px; box-shadow: none;
}
.code-send:disabled { background: #e7e9f5; color: #9aa0b8; box-shadow: none; transform: none; }

/* ---------- 音色分类 Tab（自适应换行，全部标签完整展示） ---------- */
.voice-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 14px;
}
.vtab {
  flex: none; border: 1.5px solid var(--line); background: #fff;
  color: #555b78; border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .16s;
}
.vtab:hover { border-color: var(--p1); color: var(--p1); }
.vtab.on {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px rgba(91, 108, 255, .28);
}
.vtab .cnt { opacity: .7; font-weight: 500; margin-left: 3px; font-size: 12px; }

/* ---------- 音色卡片（横版长方形圆角，高度约为原方形一半） ---------- */
.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 10px;
}
.voice-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 9px 10px 9px 12px;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none; user-select: none;
  transition: transform .14s, box-shadow .14s, border-color .14s, background .14s;
  display: flex; flex-direction: row; align-items: center; gap: 11px;
  min-height: 64px;
}
.voice-card:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.voice-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: #cdd4ff; }
.voice-card.on {
  border-color: var(--p1);
  box-shadow: 0 0 0 3px rgba(91, 108, 255, .14), var(--shadow-sm);
  background: linear-gradient(180deg, #fbfcff 0%, #f4f6ff 100%);
}
.vc-rate {
  display: inline-block; vertical-align: middle;
  font-size: 10.5px; font-weight: 700; color: #b45309;
  background: #fef3c7; border-radius: 6px; padding: 0 6px; margin-left: 6px;
  line-height: 16px;
}
.vc-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: none;
  background: var(--grad-soft);
  border: 2px solid #fff; box-shadow: 0 3px 9px rgba(72, 84, 190, .14);
}
.vc-main { flex: 1; min-width: 0; }
.vc-name {
  font-weight: 700; font-size: 13.5px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vc-sub {
  color: #9aa0bb; font-size: 11px; line-height: 1.35; margin-top: 1px;
  white-space: normal; word-break: break-word; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
/* PC：悬停用气泡显示完整说明，不改变卡片尺寸 */
@media (min-width: 861px) {
  .voice-card:hover { z-index: 30; }
  .voice-card[data-sub]:hover::after {
    content: attr(data-sub);
    position: absolute; left: 50%; top: calc(100% + 6px);
    transform: translateX(-50%);
    width: max-content; max-width: 320px; height: auto;
    padding: 8px 10px; border-radius: 10px;
    background: #2b2f45; color: #fff;
    font-size: 11.5px; line-height: 1.5; font-weight: 400;
    white-space: normal; word-break: break-word; text-align: left;
    box-shadow: 0 10px 26px rgba(35, 42, 90, .22);
    z-index: 40; pointer-events: none;
  }
}
/* H5 / 触屏：默认完整显示 */
@media (hover: none), (max-width: 860px) {
  .vc-sub { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 11.5px; line-height: 1.4; }
}
.vc-tags { color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.35; }
.vc-actions { display: flex; align-items: center; gap: 4px; flex: none; align-self: center; }
/* 收藏星标：纯线性图标，无圆形底；收藏后变星勾琥珀色 */
.vc-star {
  width: 32px; height: 32px; padding: 0; border: 0; background: transparent;
  cursor: pointer; color: #aab0c8; line-height: 1;
  border-radius: 8px; transition: transform .15s, color .15s;
  flex: none; display: inline-flex; align-items: center; justify-content: center;
}
.vc-star svg { width: 22px; height: 22px; display: block; }
.vc-star:hover { transform: scale(1.12); color: #fbbf24; }
.vc-star.faved { color: #f59e0b; }
.vc-star.faved:hover { transform: scale(1.12); color: #d97706; }
/* 试听按钮：正圆包裹三角图标 */
.vc-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid #dfe4ff; background: #f6f7ff;
  color: var(--p1);
  border-radius: 50%; cursor: pointer;
  transition: all .15s; flex: none; white-space: nowrap;
}
.vc-play svg { width: 15px; height: 15px; display: block; margin-left: 1px; }
.vc-play.playing svg { margin-left: 0; }
.vc-play:hover { background: #eef0ff; transform: scale(1.06); }
.vc-play.playing { background: var(--grad); color: #fff; border-color: transparent; }
.vc-play.disabled { color: #b7bcd2; background: #f4f5fa; border-color: #eceef6; cursor: not-allowed; }
.voice-empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 30px 0; font-size: 13.5px; }

/* ---------- 我的收藏（位于全部音色下方） ---------- */
.fav-section { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.fav-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
  font-weight: 700; font-size: 14.5px;
}
.fav-head .fav-tip { font-weight: 400; font-size: 12px; color: var(--muted); }
.fav-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
/* 正方形圆角卡：上圆形头像、中名称、底部播放/收藏两个圆钮同排对齐（悬停/选中特效与音色卡一致） */
.fav-card {
  flex: none; width: 108px; height: 108px;
  display: flex; flex-direction: column; align-items: center;
  border: 1.5px solid var(--line); border-radius: 18px; background: #fff;
  padding: 9px 8px 8px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none; user-select: none;
  transition: transform .14s, box-shadow .14s, border-color .14s, background .14s;
}
.fav-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #cdd4ff; }
.fav-card:active { transform: translateY(0); }
.fav-card.on {
  border-color: var(--p1);
  box-shadow: 0 0 0 3px rgba(91,108,255,.14), var(--shadow-sm);
  background: linear-gradient(180deg, #fbfcff 0%, #f4f6ff 100%);
}
/* 顶部圆形头像（参考音色卡 vc-avatar 设计） */
.fc-avatar {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(91,108,255,.18);
  background: var(--grad-soft);
}
/* 中部名称：单行省略 */
.fav-card .fn {
  width: 100%; margin-top: 3px;
  text-align: center; font-size: 12.5px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 底部操作区：播放圆钮与收藏星同排、Y 轴居中对齐、固定间距 */
.fc-actions {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex: none; margin-top: auto; padding-top: 3px;
}
.fc-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; flex: none;
  border: 1px solid #dfe4ff; background: #f6f7ff; color: var(--p1);
  border-radius: 50%; cursor: pointer; transition: all .15s;
}
.fc-play svg { width: 12px; height: 12px; display: block; margin-left: 1px; }
.fc-play.playing { background: var(--grad); color: #fff; border-color: transparent; }
.fc-play.playing svg { margin-left: 0; }
.fc-play.disabled { color: #b7bcd2; background: #f4f5fa; border-color: #eceef6; cursor: not-allowed; }
/* 收藏星：与播放钮同尺寸同行对齐 */
.fc-star {
  width: 28px; height: 28px; padding: 0; flex: none; border: 0; background: transparent;
  cursor: pointer; color: #f59e0b; line-height: 1; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, color .15s, background .15s;
}
.fc-star svg { width: 17px; height: 17px; display: block; }
.fc-star:hover { transform: scale(1.12); color: #d97706; background: #fff7e6; }
.fav-empty { color: var(--muted); font-size: 13px; padding: 10px 2px; }

/* ---------- 滑块 ---------- */
.slider-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.slider-row label { width: 56px; color: #5b6078; font-size: 13px; flex: none; }
.slider-row input[type=range] { flex: 1; accent-color: var(--p1); height: auto; padding: 0; border: 0; box-shadow: none; }
.slider-row input[type=range]:focus { box-shadow: none; }
.slider-row span {
  width: 46px; text-align: center; font-size: 12px; color: var(--p1);
  background: var(--grad-soft); border-radius: 8px; padding: 3px 0; font-weight: 700; flex: none;
}
.cost-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--grad-soft);
  border: 1px solid #e0e5ff; color: #4149b8;
  border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}

/* ---------- 音频播放/下载 ---------- */
.audio-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.audio-row audio { flex: 1; min-width: 200px; width: auto; margin-top: 0; }
.audio-row .btn { width: auto; flex: none; }
.ai-note { text-align: center; font-size: 11px; color: #a2a8c0; margin-top: 8px; }

/* ---------- 任务记录 ---------- */
.task-item {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 15px; margin-bottom: 10px; background: #fff;
}
.task-title { font-weight: 600; font-size: 14px; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-item .t-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.task-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.done { background: #dcfce7; color: #158055; }
.badge.failed { background: #fee2e2; color: #dc2626; }
.badge.processing, .badge.pending { background: #fef3c7; color: #b45309; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1.5px solid var(--line); background: #fff; color: #555b78;
  border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: var(--p1); color: var(--p1); }
.page-btn.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 5px 12px rgba(91,108,255,.28); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-info { font-size: 12.5px; color: var(--muted); margin: 0 4px; }

/* 标题右侧「查看全部」小链接（h2 自带 ::before 竖条，故链接用 margin-left:auto 靠右） */
.h-with-more { display: flex; align-items: center; gap: 10px; }
.h-with-more .more-link {
  margin-left: auto;
  font-size: 12.5px; font-weight: 600; color: var(--p1);
  white-space: nowrap; text-decoration: none;
}
.h-with-more .more-link:hover { text-decoration: underline; }

/* ---------- 表格 / 统计卡 ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-box {
  background: var(--card); border: 1px solid rgba(91, 108, 255, .07);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.stat-box .n { font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-box .l { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- 卡密兑换输入组 ---------- */
.redeem-group {
  display: flex; gap: 10px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 6px; transition: border-color .15s, box-shadow .15s;
}
.redeem-group:focus-within { border-color: var(--p1); box-shadow: 0 0 0 4px rgba(91, 108, 255, .12); }
.redeem-group input {
  flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important;
  padding: 10px 12px; background: transparent;
}
.redeem-group .btn { width: auto; flex: none; padding: 10px 22px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(24, 28, 56, .45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 20px; padding: 22px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 6px; font-size: 17px; }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal .modal-actions .btn { flex: 1; width: auto; }
.modal .modal-close-x {
  position: absolute; top: 14px; right: 16px; border: 0; background: transparent;
  font-size: 18px; color: #9aa0b8; cursor: pointer;
}
.modal { position: relative; }

/* ---------- 个人中心：PC 左右布局（左功能名 / 右功能区） ---------- */
.set-row {
  display: flex; align-items: flex-start; gap: 28px;
}
.set-left { flex: none; width: 184px; padding-top: 2px; }
.set-left h2 {
  font-size: 15.5px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 9px;
}
.set-left h2::before {
  content: ''; width: 4px; height: 16px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.set-left .set-desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.set-right { flex: 1; min-width: 0; }
.set-right .field:last-child { margin-bottom: 0; }

/* ---------- Toast ---------- */
#toast-box { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 90vw; }
.toast {
  background: #232848; color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; opacity: 0; transform: translateY(-8px);
  transition: opacity .22s, transform .22s;
  box-shadow: 0 10px 28px rgba(24, 28, 56, .30);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: linear-gradient(135deg, #f87171, #ef4444); }
.toast.success { background: linear-gradient(135deg, #34d399, #10b981); }

.qr { text-align: center; }
.qr img { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 14px; }
.copy-btn { cursor: pointer; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  /* 游客导航里只有登录按钮，需保持显示（其余 .nav-links 内是用户菜单，仍隐藏） */
  .nav-links:has(.nav-login-btn) { display: inline-flex; }
  .nav-login-btn { padding: 7px 16px !important; }
  .nav-burger { display: inline-flex; }
  /* 外链在汉堡抽屉中展示，窄屏导航栏不显示 */
  .nav-links a.nav-ext { display: none; }
}
@media (max-width: 760px) {
  /* 个人中心：H5 上下堆叠 */
  .set-row { flex-direction: column; gap: 12px; }
  .set-left { width: auto; }
  .set-left .set-desc { display: none; }
}
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 721px) {
  textarea { min-height: 200px; }
}
@media (max-width: 560px) {
  .voice-grid { grid-template-columns: 1fr; }
  /* 导航空间不足时：输入卡密 / 积分只保留圆形图标，完整功能在抽屉与积分中心 */
  .nav-links { gap: 6px; }
  .nav-burger { flex: none; }
  .nav-redeem, .nav-balance {
    flex: none;
    width: 38px; height: 38px; padding: 0; margin-left: 0; gap: 0;
    border-radius: 50%;
  }
  .nav-redeem .nr-ico, .nav-balance .nb-ico {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; padding: 0; margin: 0;
    font-size: 17px; line-height: 1;
  }
  .nav-redeem .nr-txt, .nav-balance .nb-txt { display: none; }
  /* 提升优先级压过 .nav-links a 的胶囊圆角 */
  .nav-links a.nav-balance { border-radius: 50%; }
  .nav-me-trigger { padding: 7px 6px !important; }
  /* 窄屏隐藏下拉箭头（点击照常用，完整入口已在汉堡抽屉） */
  .nav-me-trigger .chev { display: none; }
}
@media (max-width: 420px) {
  .container { padding: 14px 12px 60px; }
  .card { padding: 16px 14px; border-radius: 16px; }
  .voice-grid { gap: 9px; }
  .cost-bar { flex-direction: column; align-items: flex-start; gap: 2px; }
  .brand { font-size: 14.5px; }
  .brand .logo-dot { font-size: 17px; }
  .nav-inner { gap: 6px; padding: 9px 8px; }
  .nav-links { gap: 4px; }
  .nav-me-trigger { padding: 6px !important; }
  .voice-card { padding: 8px 9px 8px 10px; gap: 9px; }
}
/* 超小屏兜底：品牌标题允许收缩裁切，保证导航永不横向溢出 */
@media (max-width: 360px) {
  .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 13.5px; }
  /* 超小屏隐藏 emoji 图标，优先保住完整品牌文字（自定义图片 logo 保留） */
  .brand .logo-dot:not(.logo-img) { display: none; }
}

/* ---------- 页面提示条（合成记录等） ---------- */
.page-note {
  margin: 4px 0 14px;
  padding: 9px 13px;
  background: var(--grad-soft);
  border: 1px solid #e0e5ff;
  border-radius: 10px;
  color: #4d55a8;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- 全站底部（后台配置：说明文 + 友情链接） ---------- */
.site-footer {
  margin-top: 28px;
  padding: 22px 16px 30px;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: center;
}
.site-footer .sf-text {
  max-width: 860px;
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre-line;
}
.site-footer .sf-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 18px;
}
.site-footer .sf-links a {
  color: #6b7291;
  font-size: 12.5px;
  text-decoration: none;
  transition: color .15s;
}
.site-footer .sf-links a:hover { color: var(--p1); }
@media (max-width: 560px) {
  .site-footer { padding: 18px 14px 24px; }
}

/* ================= 会员系统 ================= */
.nav-vip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; text-decoration: none;
  color: #8a5a05; background: linear-gradient(135deg, #fff4d1, #ffe3a1);
  border: 1px solid #f2d488;
}
.nav-vip:hover { filter: brightness(.97); }
.ms-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, #fffdf5, #fff7e6);
}
.ms-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ms-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.ms-badge.lv-free { background: #eef0f6; color: var(--muted); }
.ms-badge.lv-month, .ms-badge.lv-quarter { background: #e8f0ff; color: #2b4fa3; }
.ms-badge.lv-year, .ms-badge.lv-forever {
  background: linear-gradient(135deg, #ffe9ad, #ffd271); color: #7a4b00;
}
.ms-time { font-size: 13px; color: var(--muted); }
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
}
.plan-card {
  position: relative; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 14px 14px; background: #fff;
  display: flex; flex-direction: column; gap: 8px;
}
.plan-card.current {
  border-color: #e7b94e;
  box-shadow: 0 6px 20px rgba(231, 185, 78, .18);
  background: linear-gradient(180deg, #fffdf6, #fff);
}
.plan-card.lv-forever { background: linear-gradient(180deg, #fff8e6, #fff); }
.plan-tag {
  position: absolute; top: -9px; right: 12px;
  background: #f5b324; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.plan-name { font-weight: 700; font-size: 15px; }
.plan-time { font-size: 12.5px; color: var(--muted); }
.plan-feats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.plan-card .btn { margin-top: auto; }
.vc-vip {
  display: inline-block; margin-left: 5px; padding: 1px 7px;
  border-radius: 999px; background: #fff2d6; color: #9a6a08;
  font-weight: 600; font-size: 10.5px;
}
.voice-card, .fav-card { position: relative; }
.vc-lock {
  position: absolute; top: 6px; right: 8px; z-index: 2;
  font-size: 13px; line-height: 1.2;
  background: rgba(255, 255, 255, .88); border-radius: 999px; padding: 1px 5px;
}
.vc-lock.sm { top: 4px; right: 5px; font-size: 11px; }
.voice-card.locked .vc-avatar { filter: saturate(.85); }
.fav-card.locked .fn { color: var(--muted); }
@media (max-width: 860px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .plans-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   停顿工具条
   ============================================================ */
.pause-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 10px;
}
.pause-bar .pt-label { font-size: 13px; color: #5b6078; font-weight: 600; flex: none; }
.pause-bar .pt-step {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  border: 1.5px solid var(--line); background: #fff; color: var(--p1);
  font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.pause-bar .pt-step:hover { border-color: var(--p1); background: var(--grad-soft); }
.pause-bar .pt-val {
  min-width: 58px; text-align: center; font-size: 13px; font-weight: 700; color: var(--p1);
  background: var(--grad-soft); border-radius: 9px; padding: 6px 8px; flex: none;
}
.pause-bar .pt-tip { font-size: 11.5px; color: var(--muted); flex-basis: 100%; line-height: 1.5; }
.pt-batch { position: relative; flex: none; }
.pt-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(40, 46, 90, .15); padding: 6px; min-width: 168px;
}
.pt-menu.show { display: block; }
.pt-menu button {
  display: block; width: 100%; text-align: left;
  border: 0; background: none; padding: 9px 10px; border-radius: 8px;
  font-size: 13px; color: #3a3f5e; cursor: pointer; white-space: nowrap;
}
.pt-menu button:hover { background: var(--grad-soft); color: var(--p1); }

/* ============================================================
   合成记录：播放器 / 操作按钮组 / 原文弹窗 / 失败原因
   ============================================================ */
.task-title.link { cursor: pointer; }
.task-title.link:hover { color: var(--p1); }
.task-foot { align-items: flex-start; }
.task-player { width: 100%; min-width: 0; margin: 8px 0 2px; height: 38px; }
.mini-audio { height: 34px; min-width: 180px; flex: 1 1 220px; width: auto; }
.task-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: flex-end; }
.task-actions .btn.small { min-height: 34px; display: inline-flex; align-items: center; }
.task-actions .btn.small.on { outline: 2px solid rgba(34, 197, 94, .35); }
.tag-pause {
  display: inline-block; margin-left: 5px; padding: 1px 8px;
  border-radius: 999px; background: #eef2ff; color: #4149b8;
  font-size: 10.5px; font-weight: 600;
}
.task-fail {
  width: 100%; color: #dc2626; font-size: 13px; line-height: 1.6;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 8px 11px;
}
.task-fail .muted { display: block; color: #b46a6a; font-size: 12px; }

.text-modal textarea {
  width: 100%; min-height: 260px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; line-height: 1.7; color: #2f3450; background: #fafaff;
  font-family: inherit; white-space: pre-wrap;
}
.text-modal textarea:focus { outline: none; border-color: var(--p1); }

/* ============================================================
   页面切换淡入（App Shell 秒开时消除重建闪烁）/ SW 更新条 / 离线提示
   ============================================================ */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn .18s ease-out; }

#sw-update-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 10px;
  background: #1f2937; color: #fff; padding: 10px 12px 10px 16px;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-size: 14px; max-width: calc(100vw - 24px);
  animation: pageIn .25s ease-out;
}
#sw-update-bar .sw-go {
  border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer;
  background: var(--p1, #2563eb); color: #fff; font-size: 13px; font-weight: 600;
}
#sw-update-bar .sw-later {
  border: 0; background: transparent; color: rgba(255, 255, 255, .65);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px;
}

#offline-pill {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 9999; background: #b45309; color: #fff;
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 6px 18px rgba(180, 83, 9, .35);
  animation: pageIn .2s ease-out;
}

@media print { body { animation: none; } }

/* ============================================================
   公开分享页
   ============================================================ */
.share-wrap { max-width: 560px; }
.share-card { text-align: center; padding: 34px 26px 28px; }
.share-loading, .share-error { padding: 40px 0; font-size: 15px; color: #555b78; }
.share-badge {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--p1);
  background: var(--grad-soft); border-radius: 999px; padding: 4px 14px; margin-bottom: 12px;
}
.share-title { margin: 0 0 6px; font-size: 21px; }
.share-preview {
  font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6;
}
.share-player { width: 100%; height: 44px; margin-bottom: 18px; }
.share-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-actions .btn { width: auto; min-width: 150px; }
.share-meta { margin-top: 16px; font-size: 12px; }
.share-cta { display: inline-block; margin-top: 18px; color: var(--p1); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.share-cta:hover { text-decoration: underline; }

/* H5 适配：工具条按钮整行易点；记录操作按钮均分平铺 */
@media (max-width: 560px) {
  .pause-bar { gap: 7px; }
  .pause-bar .pt-label { width: 100%; }
  .pause-bar .pt-tip { flex-basis: auto; flex: 1 1 100%; }
  .task-foot { flex-direction: column; align-items: stretch; }
  .mini-audio { height: 34px; flex: 0 0 34px; width: 100%; min-width: 0; }
  .task-actions { justify-content: stretch; }
  .task-actions .btn.small { flex: 1 1 calc(50% - 7px); justify-content: center; }
  .text-modal { padding: 18px 14px; }
  .text-modal textarea { min-height: 220px; }
  .share-card { padding: 26px 16px 22px; }
  .share-actions .btn { flex: 1 1 100%; }
}

/* ============================================================
   声音复刻：我的音色 / 创建弹窗
   ============================================================ */
.my-quota {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 2px 2px;
}
.voice-card.my-create {
  border-style: dashed;
  background: #fafbff;
  color: #5b6078;
  font: inherit;
  text-align: left;
  justify-content: flex-start;
}
.voice-card.my-create:hover {
  border-color: var(--p1);
  background: #f5f7ff;
  color: var(--p1);
}
.vcc-plus {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #eef1ff; color: var(--p1);
  font-size: 20px; font-weight: 600;
}
.clone-file-info { font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; line-height: 1.5; }
.clone-file-info.ok { color: #15803d; }
.clone-file-info.bad { color: #dc2626; }
.clone-consent {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: #5b6078; line-height: 1.5; margin: 2px 0 10px;
}
.clone-consent input { margin-top: 2px; flex: none; }
.clone-progress { font-size: 12.5px; color: var(--p1); min-height: 18px; line-height: 1.5; }
.clone-progress.bad { color: #dc2626; }
.clone-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.modal input[type=file] { width: 100%; font-size: 12.5px; color: #5b6078; }

@media (max-width: 560px) {
  .modal-mask.show { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; overflow: auto; }
}

