/* ============ Sinqak design system (blue theme) ============ */
/* UKIJ Tuz Tom 维吾尔文字体：仅作用于阿拉伯文系字符区，中文/英文不受影响 */
@font-face {
  font-family: "UKIJTUT";
  src: url("fonts/UKIJTUT.TTF") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-tint: #eff6ff;
  --female: #db2777;
  --male: #0891b2;
  --warn: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 4px 16px rgba(37,99,235,.06), 0 2px 4px rgba(15,23,42,.04);
  --radius: 12px;
  --radius-lg: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "UKIJTUT", "UKIJSLSTOM", "UKIJ Tuz Tom", "Al Bayan", "Geeza Pro", "Noto Naskh Arabic", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ============ App shell ============ */
.app {
  display: grid;
  grid-template-columns: 228px 1fr;
  grid-template-rows: 60px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  min-width: 0;
}

/* ============ Top bar ============ */
.topbar {
  grid-area: topbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-text { font-size: 16px; line-height: 1.2; letter-spacing: -.005em; }
.brand-text small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.hm-title-legacy { font-size: 16px !important; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
  background: #fff;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-text small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: -2px; }
.topbar-spacer { flex: 1; }
.lang-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px;
}
.lang-switch button {
  border: 0; background: transparent;
  padding: 6px 14px; border-radius: 18px;
  color: var(--muted); font-size: 13px;
  transition: all .2s;
}
.lang-switch button.active { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(37,99,235,.3); }
.account-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-2);
}
.account-btn:hover { border-color: var(--accent); color: var(--accent); }
.account-btn .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: var(--ink); font-size: 20px;
}

/* ============ Sidebar ============ */
.sidebar {
  grid-area: sidebar;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px;
  background: transparent; border: 0;
  text-align: left; width: 100%;
  transition: all .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 20px; text-align: center; font-size: 16px; }
.nav-item .pill {
  margin-left: auto;
  background: var(--accent); color: #fff;
  font-size: 10px; padding: 2px 6px;
  border-radius: 10px; font-weight: 600;
}
.nav-item .pill.hot { background: var(--female); }
.sidebar-spacer { flex: 1; }
.support-box {
  margin: 12px;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-tint) 0%, #e0e7ff 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
}
.support-box .row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.support-box .row strong { color: var(--accent-dark); }
.support-box .qr-hint { font-size: 11px; color: var(--muted); }

/* ============ Main ============ */
.main {
  grid-area: main;
  overflow-y: auto;
  padding: 28px clamp(16px, 3vw, 40px) 90px;
  display: flex; flex-direction: column;
}
.page-head {
  margin-bottom: 24px; flex-shrink: 0;
  position: relative;
  padding-left: 14px;
}
.page-head::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #3b82f6, #7c3aed);
  box-shadow: 0 0 12px rgba(99,102,241,.35);
}
.page-head h1 {
  font-size: clamp(22px, 2.8vw, 28px); font-weight: 800; line-height: 1.3;
  background: linear-gradient(120deg, #0f172a 25%, #2563eb 70%, #7c3aed 105%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: -.01em;
}
.page-head p { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.65; }

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  flex-shrink: 0;
}
.card + .card { margin-top: 20px; }
.card h3 { font-size: 16px; margin-bottom: 14px; }
.card h3 .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* ============ Studio layout ============ */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  flex: 1;
  min-height: 0;
}
.studio-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Composer */
.composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  flex: 1;
  min-height: 420px;
}
.composer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.composer-tab {
  padding: 14px 18px;
  background: transparent; border: 0;
  color: var(--muted); font-size: 14px; font-weight: 500;
  position: relative;
}
.composer-tab.active { color: var(--accent); }
.composer-tab.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 2px; background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.editor-wrap { padding: 16px 20px 14px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
#textInput {
  width: 100%; flex: 1;
  min-height: 160px;
  border: 0; background: transparent;
  resize: none;
  font-size: 16px; line-height: 1.8;
  outline: none;
  padding-bottom: 22px;   /* 文字滚到底部时留出呼吸空间，不贴边 */
}
#textInput::placeholder { color: var(--muted-2); }
.editor-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0 12px;
  font-size: 13px; color: var(--muted);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.live-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.editor-counter { font-variant-numeric: tabular-nums; }
.editor-counter strong { color: var(--ink); }
.editor-counter.warn strong { color: var(--warn); }
.editor-counter.over strong { color: var(--danger); }
.voice-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
}
.voice-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.voice-pill .fallback {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.voice-pill .tag { font-size: 11px; color: var(--muted); background: var(--surface); padding: 1px 6px; border-radius: 8px; }

/* Dock player */
.audio-dock {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.dock-error {
  padding: 10px 20px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 13px;
  border-bottom: 1px solid #fecaca;
}
.dock-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 0;
}
.dock-track { flex: 1; min-width: 0; }
.dock-track strong { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-track small { font-size: 11px; color: var(--muted); }
.dock-switch { display: flex; gap: 4px; }
.dock-switch button {
  padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-2); font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.dock-switch button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.dock-switch button:disabled { opacity: .4; cursor: not-allowed; }
.dock-player {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px 14px;
}
.player-button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: 0; display: grid; place-items: center;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  flex-shrink: 0;
}
.player-button:disabled { opacity: .4; cursor: not-allowed; }
.player-button.small { width: 32px; height: 32px; font-size: 13px; }
.wave {
  flex: 1; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.wave canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.wave .placeholder-w {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: grid; place-items: center;
  font-size: 12px; color: var(--muted-2);
}
.time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); white-space: nowrap; }
.icon-button {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-2);
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.icon-button:hover:not(.disabled) { border-color: var(--accent); color: var(--accent); }
.icon-button.disabled { opacity: .35; cursor: not-allowed; }
.generate-btn {
  margin: 0 20px 20px;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
  transition: transform .1s, box-shadow .2s;
}
.generate-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.generate-btn:disabled { opacity: .6; cursor: not-allowed; }
.generate-btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Voice panel ============ */
.voice-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 420px;
}
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.panel-tab {
  flex: 1; padding: 12px 8px;
  background: transparent; border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.panel-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.panel-tab .count {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10px; padding: 1px 6px;
  border-radius: 8px; margin-left: 4px;
}
.panel-search { padding: 12px 14px 8px; }
.panel-search input {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); font-size: 13px;
  outline: none;
}
.panel-search input:focus { border-color: var(--accent); background: var(--surface); }
.voice-cats {
  display: flex; gap: 6px;
  padding: 0 14px 12px;
  flex-wrap: wrap;
}
.voice-cat {
  font-size: 12px; padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px;
}
.voice-cat small { font-size: 10px; color: var(--muted); }
.voice-cat:hover { border-color: var(--accent); color: var(--accent); }
.voice-cat.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.voice-cat.active small { color: rgba(255,255,255,.8); }
.voice-cat.hot::after { content: "HOT"; font-size: 8px; background: var(--female); color: #fff; padding: 1px 4px; border-radius: 6px; font-weight: 700; }
.voice-list {
  flex: 1; overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.voice-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  border: 1px solid transparent;
  transition: all .15s;
}
.voice-row:hover { background: var(--surface-2); }
.voice-row.active { background: var(--accent-tint); border-color: var(--accent-soft); }
.voice-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid transparent;
  background: var(--accent-soft);
  position: relative;
}
.voice-row.active .voice-avatar { border-color: var(--accent); }
.voice-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voice-avatar .fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--accent);
}
.voice-avatar.playing::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(37,99,235,.85);
}
.voice-avatar.playing::before {
  content: "⏸";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 14px;
  z-index: 1;
}
.voice-avatar.playing.paused::before { content: "▶"; }
.voice-avatar.playing.paused::after { background: rgba(37,99,235,.65); }
.voice-stop {
  width: 24px; height: 24px; border-radius: 50%;
  border: 0; flex-shrink: 0;
  background: #fee2e2; color: var(--danger);
  font-size: 12px; line-height: 1;
  display: grid; place-items: center;
}
.voice-stop:hover { background: var(--danger); color: #fff; }
.voice-copy { flex: 1; min-width: 0; }
.voice-copy strong { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.voice-copy small { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; margin-top: 2px; flex-wrap: wrap; }
.voice-lang {
  font-size: 10px; padding: 0 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--ink-2);
}
.voice-emo { font-size: 10px; color: var(--female); font-weight: 600; }
.voice-star {
  width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 0;
  color: var(--muted-2); font-size: 15px;
  flex-shrink: 0;
}
.voice-star:hover { color: var(--warn); }
.voice-star.active { color: var(--warn); }
.voice-row .lang-arrow { font-size: 10px; color: var(--muted-2); }
.empty-state {
  padding: 48px 20px; text-align: center;
  color: var(--muted-2); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-state .ico { font-size: 30px; opacity: .4; }
.empty-state small { font-size: 12px; }

/* ============ Clone tab（付费定制 · 二维码联系客服） ============ */
.clone-body { padding: 20px; flex: 1; overflow-y: auto; }
.clone-qr {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
  padding: 28px 20px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.clone-qr-ico { font-size: 40px; }
.clone-qr h3 { font-size: 17px; color: var(--ink); }
.clone-qr p {
  font-size: 13px; color: var(--muted);
  line-height: 1.9; max-width: 420px;
}
.clone-qr-box {
  width: 220px; height: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.clone-qr-box img {
  width: 100%; height: 100%; object-fit: contain;
  border-radius: 8px; display: block;
}
.clone-qr-hint {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  padding: 8px 16px; border-radius: 999px;
}
.clone-steps {
  display: flex; gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.clone-step {
  flex: 1; padding: 10px 8px;
  background: var(--surface-2);
  font-size: 12px; color: var(--muted);
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.clone-step i {
  font-style: normal;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--border-strong); color: #fff;
  display: inline-grid; place-items: center;
  font-size: 11px;
}
.clone-step.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.clone-step.on i { background: var(--accent); }
.clone-drop {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 14px;
}
.clone-drop:hover, .clone-drop.over { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.clone-drop .ico { font-size: 28px; display: block; margin-bottom: 8px; }
.clone-drop small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted-2); }
.clone-record {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.clone-record button {
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.clone-record button.recording { border-color: var(--danger); color: var(--danger); }
.clone-record button.recording .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.clone-record-hint { font-size: 12px; color: var(--muted); }
.clone-playback { width: 100%; margin-bottom: 14px; }
.clone-text {
  width: 100%; min-height: 80px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 14px;
  outline: none; resize: vertical;
  background: var(--surface-2);
  margin-bottom: 14px;
}
.clone-text:focus { border-color: var(--accent); background: var(--surface); }
.clone-declare {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--muted);
  margin-bottom: 16px;
  cursor: pointer;
  line-height: 1.6;
}
.clone-declare input { margin-top: 3px; accent-color: var(--accent); }
.clone-submit {
  width: 100%; padding: 12px;
  background: var(--accent); color: #fff;
  border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.clone-submit:disabled { opacity: .5; cursor: not-allowed; }
.clone-result {
  margin-top: 14px;
  padding: 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  font-size: 13px; color: var(--ink-2);
  line-height: 1.7;
  display: none;
}
.clone-result.show { display: block; }

/* ============ History page ============ */
.hist-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
}
.hist-item .meta { flex: 1; min-width: 0; }
.hist-item .meta .txt {
  font-size: 13px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}
.hist-item .meta .info { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.hist-item audio { height: 36px; }

/* ============ Keys page ============ */
.key-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--surface);
}
.key-item .kname { font-size: 14px; font-weight: 600; }
.key-item .kval {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--muted);
  background: var(--surface-2);
  padding: 4px 10px; border-radius: 6px;
  margin-top: 4px;
}
.key-item .kmeta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.key-item .grow { flex: 1; min-width: 0; }
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ Usage page ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.stat-card .label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.usage-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding: 12px 0; }
.usage-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.usage-bar {
  width: 100%; max-width: 28px;
  background: linear-gradient(to top, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .4s;
}
.usage-bar-wrap .d { font-size: 9px; color: var(--muted-2); transform: rotate(-45deg); white-space: nowrap; }
.voice-rank { display: flex; flex-direction: column; gap: 8px; }
.voice-rank-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.voice-rank-item .bar { height: 8px; border-radius: 4px; background: var(--accent); min-width: 4px; }
.voice-rank-item .cnt { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ============ Docs page ============ */
.doc-block { margin-bottom: 24px; }
.doc-block h4 { font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.doc-block p { font-size: 13px; color: var(--ink-2); line-height: 1.8; margin-bottom: 8px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.doc-table th, .doc-table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.doc-table th { background: var(--surface-2); font-weight: 600; font-size: 12px; }
.doc-table code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
pre.code {
  background: #0f172a; color: #e2e8f0;
  border-radius: 10px; padding: 16px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; line-height: 1.7;
  overflow-x: auto;
  margin-bottom: 12px;
}
pre.code .cm { color: #94a3b8; }

/* ============ Music page ============ */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.style-card {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  text-align: center;
  transition: all .15s;
  position: relative;
}
.style-card:hover { border-color: var(--accent); color: var(--accent); }
.style-card.active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); font-weight: 600; box-shadow: 0 2px 8px rgba(37,99,235,.15); }
.style-card .star-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 9px; color: var(--female);
}
.music-model {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px; color: var(--muted);
  margin-bottom: 16px;
}
.music-model strong { color: var(--accent); font-size: 13px; }

/* ============ ASR / placeholder ============ */
.placeholder-page {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 60px 20px;
}
.placeholder-page .ico { font-size: 48px; opacity: .5; }
.placeholder-page h2 { font-size: 20px; }
.placeholder-page p { color: var(--muted); font-size: 14px; max-width: 420px; line-height: 1.7; }

/* ============ Membership ============ */
.billing-card {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--accent) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.billing-card::after {
  content: "✦";
  position: absolute; right: 20px; top: 10px;
  font-size: 80px; opacity: .08;
}
.billing-main { min-width: 0; }
.billing-card .bal { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.billing-card .bal small { font-size: 14px; font-weight: 400; opacity: .75; margin-left: 6px; }
.billing-card .lbl { font-size: 13px; opacity: .8; margin-top: 4px; }
.billing-card .billing-balance { margin-bottom: 22px; }
.billing-card .billing-balance .lbl { margin-bottom: 8px; }
.billing-card .billing-usage { margin-bottom: 0; }
.billing-card .usage-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 12px; }
.billing-card .usage-head .lbl { margin-top: 0; }
.billing-card .usage-num { font-size: 14px; opacity: .9; font-variant-numeric: tabular-nums; }
.billing-card .usage-num b { font-weight: 600; font-size: 15px; }
.billing-card .usage-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); overflow: hidden; }
.billing-card .usage-fill { height: 100%; background: #fff; border-radius: 3px; min-width: 2px; transition: width .4s ease; }
.billing-card .usage-meta { font-size: 12px; opacity: .85; margin-top: 10px; }
.billing-card .usage-meta b { font-weight: 600; }
/* 充值按钮：右侧醒目大按钮；免费试用降为次要 */
.billing-side {
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 1;
  min-width: 180px;
}
.billing-side button {
  padding: 16px 34px; border-radius: 14px;
  border: 1px solid transparent;
  font-size: 16px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.billing-side button.primary {
  background: #fff; color: var(--accent-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.billing-side button.primary:active { transform: scale(.97); }
.billing-side button.ghost {
  background: rgba(255,255,255,.14);
  color: #fff; border-color: rgba(255,255,255,.4);
  font-size: 14px; font-weight: 400;
  padding: 11px 24px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@media (max-width: 720px) {
  .billing-card { grid-template-columns: 1fr; gap: 18px; padding: 18px; height: auto; }
  .billing-main { display: flex; flex-direction: column; gap: 14px; }
  .billing-balance { margin-bottom: 0; }
  .billing-side { flex-direction: row; min-width: 0; gap: 8px; }
  .billing-side button { flex: 1; padding: 12px 8px; font-size: 14px; }
  .billing-side button.ghost { font-size: 12px; padding: 12px 8px; }
}
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.plan-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface); text-align: center; cursor: pointer; position: relative; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.plan-card:hover { border-color: #34d399; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(7,193,96,.12); }
.plan-card .price { font-size: 28px; font-weight: 700; color: var(--accent-dark); margin: 8px 0; }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-card ul { list-style: none; font-size: 12px; color: var(--muted); line-height: 2; margin-bottom: 14px; }
.plan-card.recommend { border-color: #07c160; box-shadow: 0 4px 16px rgba(7,193,96,.15); position: relative; }
.plan-card.recommend::before {
  content: "推荐";
  position: absolute; top: -1px; right: 16px;
  background: #07c160; color: #fff;
  font-size: 11px; padding: 2px 10px;
  border-radius: 0 0 8px 8px;
}
/* 选中态：微信绿描边 + 左上角 ✓ 角标 */
.plan-card.selected { border-color: #07c160; border-width: 2px; box-shadow: 0 6px 20px rgba(7,193,96,.22); }
.plan-card.selected::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
}
.plan-sel-badge {
  display: none;
  position: absolute; top: -10px; left: -10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #07c160; color: #fff;
  font-size: 13px; line-height: 24px; text-align: center;
  box-shadow: 0 3px 8px rgba(7,193,96,.4);
}
.plan-card.selected .plan-sel-badge { display: block; }

/* ============ Mobile tabbar ============ */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 8px 0 6px;
  font-size: 11px; color: var(--muted);
}
.mobile-tabbar a .ico { font-size: 18px; }
.mobile-tabbar a.active { color: var(--accent); font-weight: 600; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 74px; left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; z-index: 100;
  transition: transform .3s;
  max-width: 90vw;
  box-shadow: 0 8px 24px rgba(15,23,42,.25);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ============ Responsive ============ */
.backdrop {
  display: none;
  position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,.4);
  z-index: 15;
}
.backdrop.show { display: block; }

@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: 1fr 340px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .sidebar {
    position: fixed;
    top: 60px; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform .25s;
    z-index: 20;
    box-shadow: 4px 0 20px rgba(15,23,42,.1);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: grid; place-items: center; }
  .mobile-tabbar { display: flex; }
  .main { padding: 20px 16px calc(70px + env(safe-area-inset-bottom)); }
  .studio-grid { grid-template-columns: 1fr; }
  .voice-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: 8vh;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    z-index: 30;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(15,23,42,.18);
  }
  .voice-panel.open { transform: translateY(0); }
  .voice-panel::after {
    content: "";
    display: block;
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 2px;
    background: rgba(148,163,184,.45);
  }
  .voice-panel-toggle {
    display: inline-flex !important;
  }
}
@media (max-width: 720px) {
  .voice-panel { padding-bottom: env(safe-area-inset-bottom); }
  .voice-panel .panel-tabs { flex: 0 0 auto; }
  .voice-panel .panel-search { flex: 0 0 auto; padding: 10px 12px 6px; }
  .voice-panel .voice-cats {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 12px 10px;
    gap: 6px;
  }
  .voice-panel .voice-cats::-webkit-scrollbar { display: none; }
  .voice-panel .voice-cats .voice-cat { white-space: nowrap; flex: 0 0 auto; }
  .voice-panel .voice-list { flex: 1 1 auto; min-height: 0; padding: 4px 10px 16px; }
  .voice-panel .voice-row { padding: 10px; }
  .voice-panel .voice-avatar { width: 42px; height: 42px; }
  .voice-panel .voice-copy strong { font-size: 14px; }
  .voice-panel .panel-tab { padding: 12px 6px; font-size: 13px; }
}
@media (min-width: 901px) {
  .voice-panel-toggle { display: none !important; }
}
@media (max-width: 640px) {
  .composer-tabs { padding: 0 8px; }
  .composer-tab { padding: 12px 10px; font-size: 13px; }
  .editor-wrap { padding: 14px 16px 8px; }
  #textInput { font-size: 15px; }
  .dock-player { padding: 10px 12px 12px; gap: 10px; }
  .dock-header { padding: 8px 12px 0; }
  .dock-switch button { padding: 5px 8px; font-size: 11px; }
  .generate-btn { margin: 0 16px 16px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .account-btn .acct-text { display: none; }
  .page-head h1 { font-size: 18px; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .clone-steps { flex-direction: column; }
  .hist-item { flex-wrap: wrap; }
  .hist-item audio { width: 100%; }
}
@media (max-width: 360px) {
  .brand-text { display: none; }
  .main { padding: 16px 12px calc(70px + env(safe-area-inset-bottom)); }
}

/* ============ 侧栏底部：微信登录 + 两个客服圆图标 ============ */
.sidebar-foot {
  padding: 12px 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(248,250,252,0.6));
}
.sidebar-login {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none; cursor: pointer;
  border-radius: 28px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  font-size: 15px; font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(7, 193, 96, 0.32), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.sidebar-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 193, 96, 0.42), inset 0 1px 0 rgba(255,255,255,0.22);
}
.sidebar-login:active { transform: scale(.97); }
.sidebar-login:focus-visible { outline: 2px solid #07c160; outline-offset: 3px; }
.sidebar-login.logged {
  background: linear-gradient(135deg, #07c160, #06ad56);
  box-shadow: 0 6px 18px rgba(7, 193, 96, 0.32), inset 0 1px 0 rgba(255,255,255,0.18);
}
.sidebar-login-ico { width: 22px; height: 22px; flex: none; display: inline-flex; }
.sidebar-login-ico svg { width: 22px; height: 22px; }
.sidebar-login-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.2; min-width: 0; }
.sidebar-login-lbl { white-space: nowrap; }
.sidebar-login-id {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  opacity: .92; white-space: nowrap; max-width: 148px;
  overflow: hidden; text-overflow: ellipsis;
  direction: ltr; text-align: left;
}

.sidebar-fabs {
  display: flex; justify-content: center; gap: 14px;
  padding: 2px 0 0;
}
.support-fab {
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--border); cursor: pointer;
  border-radius: 50%;
  background: var(--surface);
  color: #475569;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform .18s ease, color .18s, border-color .18s, box-shadow .18s;
}
.support-fab svg { width: 20px; height: 20px; }
.support-fab:hover {
  color: #07c160; border-color: rgba(7, 193, 96, 0.45);
  box-shadow: 0 6px 14px rgba(7, 193, 96, 0.18);
}
.support-fab:active { transform: scale(.94); }
.support-fab:focus-visible { outline: 2px solid #07c160; outline-offset: 3px; }
.support-fab-dot {
  position: absolute; top: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444; border: 2px solid var(--surface);
  animation: supportPulse 2s infinite;
}
@keyframes supportPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: .65; }
}
@media (max-width: 900px) {
  .sidebar-foot { padding: 10px 10px 14px; }
  .sidebar-login { padding: 12px 14px; font-size: 14px; }
  .support-fab { width: 38px; height: 38px; }
}

.qr-open { overflow: hidden; }
.qr-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: qrFade .15s ease-out;
}
.qr-modal[hidden] { display: none; }
.qr-modal-mask {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.qr-modal-card {
  position: relative;
  background: #fff; color: #0f172a;
  width: min(380px, 100%);
  border-radius: 18px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  animation: qrPop .2s cubic-bezier(.2, .9, .3, 1.2);
}
.qr-modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 22px; line-height: 1; color: #64748b; cursor: pointer;
  border-radius: 8px; transition: background .15s, color .15s;
}
.qr-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.qr-modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.qr-modal-sub { font-size: 13px; color: #64748b; line-height: 1.5; margin-bottom: 16px; }
.qr-modal-img {
  width: 240px; height: 240px;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
}
.qr-modal-foot {
  font-size: 12px; color: #94a3b8;
  margin-top: 14px; line-height: 1.5;
}
@keyframes qrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qrPop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .qr-modal-card { padding: 24px 18px 18px; border-radius: 16px; }
  .qr-modal-img { width: 200px; height: 200px; }
}

/* ============ 跨浏览器兼容（Safari / Chrome / Edge / 微信） ============ */
/* 微信/移动端：禁用界面文字长按选择，输入类控件保持可输入 */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, select,
.hist-item .meta .txt,
.clone-qr p,
.qr-modal-sub, .qr-modal-foot,
.placeholder-page p, .page-head p,
.voice-copy strong, .voice-copy small {
  -webkit-user-select: text;
  user-select: text;
}
/* 二维码图片允许微信长按识别（保留 callout） */
.qr-modal-img, .clone-qr-box img { -webkit-touch-callout: default; }
/* iOS 惯性滚动 */
.voice-list, .main, .sidebar, .clone-body {
  -webkit-overflow-scrolling: touch;
}
/* iOS Safari/微信：输入框字号 ≥16px，防止聚焦时页面自动放大 */
@media (max-width: 900px) {
  #textInput, .panel-search input, .clone-text, #musicText {
    font-size: 16px !important;
  }
}
/* iPhone XR / 窄屏：顶栏精简，隐藏品牌长副标题防溢出 */
@media (max-width: 480px) {
  .brand-text small { display: none; }
  .brand-text { font-size: 15px; }
  .lang-switch button { padding: 6px 10px; font-size: 12px; }
}
/* iPhone SE (375px) 及以下：隐藏品牌文字、压缩语言切换、确保不溢出 */
@media (max-width: 420px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .brand { gap: 6px; }
  .brand-text { display: none; }
  .menu-btn { width: 32px; height: 32px; font-size: 18px; }
  .lang-switch { padding: 2px; border-radius: 16px; }
  .lang-switch button {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 32px;
  }
  .lang-switch button[data-lang="zh"] { padding: 5px 6px; }
  .account-btn { padding: 4px; min-width: 0; }
  .account-btn .avatar { width: 28px; height: 28px; font-size: 12px; }
  .topbar-spacer { min-width: 0; }
  /* 防止整个页面横向滚动 */
  .main { overflow-x: hidden; }
  .card, .page-head, .billing-card, .plan-card { min-width: 0; max-width: 100%; }
  .plan-grid { grid-template-columns: 1fr; }
  /* 历史记录项里不要再把音频撑出宽度 */
  .hist-item audio { max-width: 100%; }
}
/* 微信内打开：弹窗高度兜底（微信内地址栏收缩引起 100vh 抖动） */
.wx-viewport .qr-modal {
  max-height: 100%;
  overflow-y: auto;
}

/* ============ 电脑端放大：输入框 + 系统音色面板 ============ */
@media (min-width: 901px) {
  /* 输入区整体更高、字号更大 */
  .composer { min-height: 540px; }
  #textInput { min-height: 280px; font-size: 17px; line-height: 2; }
  .editor-wrap { padding: 20px 24px 8px; }
  .composer-tab { padding: 15px 20px; font-size: 15px; }

  /* 音色面板整体更高 */
  .voice-panel { min-height: 540px; }
  .panel-tab { font-size: 14px; padding: 14px 8px; }
  .panel-search input { padding: 10px 14px; font-size: 14px; }

  /* 音色条目放大：头像、间距、文字 */
  .voice-list { gap: 6px; padding: 4px 12px 14px; }
  .voice-row { padding: 11px 12px; gap: 12px; border-radius: 12px; }
  .voice-avatar { width: 46px; height: 46px; }
  .voice-avatar .fallback { font-size: 16px; }
  .voice-avatar.playing::before { font-size: 16px; }
  .voice-copy strong { font-size: 14.5px; }
  .voice-copy small { font-size: 12px; }
  .voice-cat { font-size: 13px; padding: 5px 12px; }
  .voice-stop { width: 28px; height: 28px; font-size: 13px; }
}
/* 大屏：音色面板列更宽（1100px 以下维持 340px 防挤压输入区） */
@media (min-width: 1101px) {
  .studio-grid { grid-template-columns: 1fr 400px; }
}

/* ============================================================
 * 首屏加载动画（loader from Uiverse.io by andrew-manzyk，主题化改色）
 * ============================================================ */
.boot-loader {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .45s ease;
}
.boot-loader.hide { opacity: 0; pointer-events: none; }
.loader { position: relative; width: 100px; height: 100px; flex: none; }
.loader .box {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent) 25%, #a855f7 100%);
  -webkit-mask: url(#sinqakMask);
  mask: url(#sinqakMask);
  animation: sinqakSpin 2s linear infinite;
}
.loader.sm { transform: scale(.55); margin: -22px 0; }
@keyframes sinqakSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader .box { animation-duration: 6s; } }

/* ============================================================
 * 一键成片（Video Studio）
 * ============================================================ */
.vs-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.vs-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 22px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -22px rgba(15,23,42,.18),
    0 1px 3px rgba(15,23,42,.04);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.vs-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.35), rgba(124,58,237,.3), transparent);
  opacity: .55; pointer-events: none;
}
.vs-card:hover {
  border-color: rgba(99,102,241,.25);
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 18px 36px -24px rgba(37,99,235,.25),
    0 2px 6px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.vs-step { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.vs-num {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5 55%, #7c3aed 110%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex: none;
  box-shadow: 0 4px 12px rgba(99,102,241,.32), inset 0 1px 0 rgba(255,255,255,.35);
}
.vs-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  min-height: 180px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  background: var(--surface-2);
  transition: border-color .2s;
}
.vs-dropzone:hover, .vs-dropzone.drag { border-color: var(--accent); }
.vs-dropzone img { max-width: 100%; max-height: 320px; object-fit: contain; display: block; }
.vs-drop-inner { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; line-height: 1.7; }
.vs-drop-inner .big { font-size: 34px; margin-bottom: 8px; }
.vs-tip { font-size: 12px; color: var(--muted); margin-top: 10px; }
.vs-textarea {
  width: 100%; min-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px; font-size: 16px;
  font-family: inherit; resize: vertical;
  background: var(--surface); color: var(--ink);
  box-sizing: border-box;
  -webkit-appearance: none;
}
.vs-textarea:focus { outline: none; border-color: var(--accent); }
.vs-count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.vs-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.vs-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px; font-size: 14px;
  background: var(--surface); color: var(--ink);
  max-width: 100%;
}
.vs-sub-table { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.vs-sub-row { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: center; }
.vs-sub-3 { grid-template-columns: 118px 1fr 1fr 1fr; }
.vs-sub-head { grid-template-columns: 118px 1fr 1fr 1fr; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px 4px; }
.vs-sub-head > div { padding: 0 2px; }
.vs-sub-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vs-sub-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
.vs-sub-multilang .vs-sub-input { font-size: 13px; }
.vs-sub-time {
  font-size: 11px; color: var(--muted);
  background: var(--surface-2);
  border-radius: 6px; padding: 6px 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.vs-sub-input {
  border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px;
  font-size: 14px;
  background: var(--surface); color: var(--ink);
  width: 100%; box-sizing: border-box;
}
@media (max-width: 640px) {
  .vs-card { padding: 16px; }
  .vs-sub-row { grid-template-columns: 86px 1fr; }
  .vs-sub-3, .vs-sub-head { grid-template-columns: 86px 1fr 1fr 1fr; }
  .vs-sub-time { font-size: 10px; padding: 5px 4px; }
  .vs-dropzone { min-height: 150px; }
  .vs-sub-3 input.vs-sub-input, .vs-sub-head { font-size: 11px; }
}
.vs-audio { width: 100%; margin-top: 12px; }
.vs-video { width: 100%; max-height: 420px; border-radius: var(--radius); background: #000; margin-top: 12px; display: block; }
.vs-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.vs-loading { display: flex; align-items: center; gap: 14px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.vs-error { color: var(--danger); font-size: 13px; margin-top: 12px; line-height: 1.6; }
@media (max-width: 640px) {
  .vs-card { padding: 16px; }
  .vs-sub-row { grid-template-columns: 86px 1fr; }
  .vs-sub-time { font-size: 10px; padding: 5px 4px; }
  .vs-dropzone { min-height: 150px; }
}

/* ============================================================
 * 一键成片 · 音色面板内嵌版 + 推荐文案库弹层（v9）
 * ============================================================ */
.voice-panel.vs-inline { min-height: 0; }
.vs-inline .voice-list { max-height: 360px; flex: none; }
@media (max-width: 900px) {
  .voice-panel.vs-inline {
    position: static;
    width: auto; max-width: none;
    transform: none;
    border-radius: var(--radius-lg);
    min-height: 0;
  }
}
/* 推荐文案库弹层 */
.vs-lib-mask {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.vs-lib-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.vs-lib-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.vs-lib-close {
  background: none; border: 0;
  font-size: 18px; color: var(--muted);
  cursor: pointer; padding: 4px 8px;
  border-radius: 8px;
}
.vs-lib-close:hover { color: var(--ink); background: var(--surface-2); }
.vs-lib-list {
  overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.vs-lib-item {
  display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
  transition: border-color .15s;
}
.vs-lib-item:hover { border-color: var(--accent); }
.vs-lib-text { flex: 1; font-size: 14px; line-height: 1.7; }
.vs-lib-item .btn { flex: none; padding: 7px 14px; font-size: 13px; }
@media (max-width: 640px) {
  .vs-lib-text { font-size: 13px; }
  .vs-lib-item { flex-direction: column; align-items: stretch; }
  .vs-inline .voice-list { max-height: 300px; }
}

/* ============================================================
 * 一键成片历史记录（紧凑版）
 * ============================================================ */
.vs-card-compact { padding: 12px 14px; }
.vs-card-compact .vs-step { font-size: 14px; gap: 8px; margin-bottom: 6px; }
.vs-card-compact .vs-num { width: 24px; height: 24px; font-size: 13px; }
.vs-card-compact .vs-actions { margin-top: 6px; }
.vs-card-compact .empty-state { padding: 14px 8px; }
.vs-card-compact .empty-state .ico { font-size: 22px; }

.vs-hist-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.vs-hist-item:last-child { border-bottom: none; }
.vs-hist-thumb {
  width: 42px; height: 42px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.vs-hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-hist-meta { flex: 1; min-width: 0; }
.vs-hist-text {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.vs-hist-cc {
  display: inline-block; vertical-align: 1px; margin-right: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--accent, #6c5ce7); border: 1px solid currentColor;
  border-radius: 4px; padding: 0 3px; line-height: 14px;
}
.vs-hist-info {
  display: flex; flex-wrap: nowrap; gap: 2px 10px;
  font-size: 11px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden;
}
.vs-hist-btns { display: flex; gap: 4px; flex: none; }
.vs-hist-btns .btn.sm { padding: 5px 8px; font-size: 13px; min-width: 0; }
.vs-hist-player { flex-basis: 100%; width: 100%; margin: 2px 0 6px; }
.vs-hist-player video {
  width: 100%; max-height: 320px; border-radius: var(--radius);
  background: #000; display: block;
}
@media (max-width: 640px) {
  .vs-card-compact { padding: 10px 12px; }
  .vs-hist-item { gap: 8px; padding: 6px 0; }
  .vs-hist-thumb { width: 36px; height: 36px; border-radius: 6px; font-size: 14px; }
  .vs-hist-text { font-size: 12px; }
  .vs-hist-info .vs-info-date { display: none; }
  .vs-hist-btns .btn.sm { padding: 4px 6px; font-size: 12px; }
  .vs-hist-player video { max-height: 230px; }
}

/* ============================================================
 * 首页 · Premium（aurora hero + 单 hero CTA + bento cards）v=14
 *   - 优化：去掉旁边的「一键成片」次按钮
 *   - 优化：去掉「48kHz / 双语 / 流式」三段 stats
 *   - 优化：primary CTA 加宽 + 加发光 + 箭头扫光
 * ============================================================ */
.hm-hero {
  position: relative;
  text-align: center;
  padding: 54px 24px 40px;
  margin: 0 auto 26px;
  max-width: 920px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 65% 60% at 50% 0%, rgba(191,219,254,.55), transparent 70%),
    linear-gradient(180deg, #fbfdff 0%, #f3f6fd 100%);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 20px 50px -28px rgba(37,99,235,.32), inset 0 1px 0 rgba(255,255,255,.7);
  isolation: isolate;
}
/* aurora 光斑 */
.hm-aurora { position: absolute; inset: 0; z-index: -1; filter: blur(70px); opacity: .65; pointer-events: none; }
.hm-aurora i { position: absolute; border-radius: 50%; }
.hm-aurora .b1 {
  width: 480px; height: 480px; left: -120px; top: -160px;
  background: radial-gradient(circle at 30% 30%, #93c5fd, transparent 70%);
  animation: hmFloat1 14s ease-in-out infinite;
}
.hm-aurora .b2 {
  width: 440px; height: 440px; right: -100px; top: -120px;
  background: radial-gradient(circle at 60% 40%, #c4b5fd, transparent 70%);
  animation: hmFloat2 18s ease-in-out infinite;
}
.hm-aurora .b3 {
  width: 520px; height: 320px; left: 50%; bottom: -200px; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, #a5f3fc, transparent 70%);
  animation: hmFloat3 16s ease-in-out infinite;
}
@keyframes hmFloat1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,30px)} }
@keyframes hmFloat2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,40px)} }
@keyframes hmFloat3 { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-46%,-24px)} }

/* 顶部装饰 hairline（仅大屏） */
.hm-hero::after {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 320px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.45), rgba(124,58,237,.4), transparent);
  pointer-events: none;
}

/* 玻璃徽章 */
.hm-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 6px 22px rgba(37,99,235,.12);
}
.hm-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #7c3aed); flex: none;
  box-shadow: 0 0 0 0 rgba(37,99,235,.5);
  animation: hmPulse 2.2s infinite;
}
@keyframes hmPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); }
  70% { box-shadow: 0 0 0 9px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* 标题（无副标题行） */
.hm-title {
  display: block;
  max-width: 100%;
  margin: 22px auto 0;
  padding: 0 8px;
  font-size: 33px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.18;
  text-align: center;
  overflow-wrap: break-word;
  word-break: keep-all;
  color: #0f172a;
  background: linear-gradient(120deg, #0f172a 20%, #2563eb 55%, #7c3aed 95%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.hm-title .accent {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 1100px) { .hm-title { font-size: 31px; } }
@media (max-width: 900px)  { .hm-title { font-size: 28px; } }
@media (max-width: 720px)  { .hm-title { font-size: 25px; } }
@media (max-width: 540px)  { .hm-title { font-size: 23px; } }
@media (max-width: 400px)  { .hm-title { font-size: 21px; } }

/* CTA 单按钮（与下方两张卡片同款边框比例：圆角 20px / 更大更宽） */
.hm-cta {
  margin-top: 28px; display: flex; justify-content: center;
}
.hm-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 34px; border-radius: 16px;
  font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: .01em;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, filter .25s ease;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.hm-btn:active { transform: scale(.97); }
.hm-btn svg { width: 20px; height: 20px; flex: none; transition: transform .3s ease; }
.hm-btn .hm-arrow { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }

.hm-btn.primary {
  color: #fff;
  padding: 20px 56px;
  border-radius: 18px;
  font-size: 17px;
  min-height: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 50%, #7c3aed 110%);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 14px 32px rgba(37,99,235,.4),
    0 6px 14px rgba(124,58,237,.28),
    inset 0 1px 0 rgba(255,255,255,.32),
    inset 0 -1px 0 rgba(0,0,0,.04);
}
.hm-btn.primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .9s ease;
}
.hm-btn.primary:hover {
  transform: translateY(-4px);
  box-shadow:
    0 22px 44px rgba(37,99,235,.55),
    0 8px 18px rgba(124,58,237,.45),
    inset 0 1px 0 rgba(255,255,255,.36);
  filter: brightness(1.05);
}
.hm-btn.primary:hover::before { transform: translateX(110%); }
.hm-btn.primary:hover .hm-arrow { transform: translateX(6px); }
.hm-btn.primary:active { transform: translateY(-1px) scale(.985); }

/* 入场动画（每个元素轻微 stagger） */
.hm-hero .hm-badge    { animation: hmFadeUp .7s .05s ease both; }
.hm-hero .hm-title    { animation: hmFadeUp .7s .12s ease both; }
.hm-hero .hm-cta      { animation: hmFadeUp .7s .20s ease both; }
.hm-card              { animation: hmFadeUp .5s ease both; }
.hm-card:nth-child(1) { animation-delay: .30s; }
.hm-card:nth-child(2) { animation-delay: .38s; }
@keyframes hmFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 双卡片（与上方大按钮同款圆角 20px，等宽排布） ---- */
.hm-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
}
.hm-card {
  position: relative; display: block; overflow: hidden;
  padding: 26px 26px 24px; border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
/* 渐变 hairline 描边（悬停点亮） */
.hm-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,.55), rgba(124,58,237,.35) 50%, rgba(59,130,246,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .22s ease; pointer-events: none;
}
.hm-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(37,99,235,.14), 0 4px 12px rgba(15,23,42,.05);
  border-color: transparent;
}
.hm-card:hover::before { opacity: 1; }
/* 悬停扫光 */
.hm-card-shine {
  position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-20deg); transition: left .6s ease; pointer-events: none;
}
.hm-card:hover .hm-card-shine { left: 130%; }

.hm-card-top { display: flex; align-items: center; justify-content: space-between; }
.hm-card-ico {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #7c3aed 140%);
  box-shadow: 0 8px 18px rgba(37,99,235,.3), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .22s ease;
}
.hm-card:hover .hm-card-ico { transform: scale(1.08) rotate(-4deg); }
.hm-card-ico svg { width: 26px; height: 26px; }
.hm-card-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid rgba(37,99,235,.18);
}
.hm-card-title { margin-top: 18px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.hm-card-desc { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.hm-card-go {
  display: inline-grid; place-items: center; margin-top: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--accent); background: var(--accent-tint);
  transition: transform .22s ease, background .22s ease, color .22s ease;
}
.hm-card-go svg { width: 15px; height: 15px; }
.hm-card:hover .hm-card-go { transform: translateX(4px); background: var(--accent); color: #fff; }

@media (max-width: 640px) {
  .hm-hero { padding: 48px 18px 36px; margin-bottom: 24px; border-radius: 18px; }
  .hm-title { font-size: 23px; }
  .hm-cta { margin-top: 28px; }
  .hm-btn.primary { padding: 18px 40px; font-size: 16px; border-radius: 16px; }
  .hm-btn.primary svg { width: 18px; height: 18px; }
  .hm-grid { grid-template-columns: 1fr; gap: 12px; }
  .hm-card { padding: 20px; border-radius: 16px; }
  .hm-card-ico { width: 46px; height: 46px; border-radius: 13px; }
  .hm-card-ico svg { width: 22px; height: 22px; }
  .hm-card-title { font-size: 16px; margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-aurora i, .hm-badge .dot, .hm-card-shine, .hm-card, .hm-hero > * { animation: none !important; transition: none !important; }
}

/* ============================================================
 * 全站 · Premium ui-kits 升级（v=14）
 *   - .glass：通用玻璃质感
 *   - .btn-glow：发光阴影按钮（用于按钮增强）
 *   - .composer：合成容器升级（带渐变 hairline + 玻璃）
 *   - .voice-panel：音色面板升级
 *   - .style-card：音乐卡片升级
 *   - .vs-textarea / .vs-dropzone：成片输入升级
 *   - .placeholder-page：占位页升级
 *   - .toast：toast 升级
 * ============================================================ */

/* 通用玻璃（用 -kit 内部引用，与现有 .glass 不冲突）*/
.uki-glass {
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.55));
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 18px 40px -22px rgba(15,23,42,.22);
}

/* 按钮：发光增强 */
.btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #4f46e5 100%);
  border-color: transparent;
  box-shadow:
    0 10px 24px rgba(37,99,235,.36),
    0 2px 6px rgba(15,23,42,.06),
    inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease, filter .18s ease;
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px rgba(37,99,235,.5),
    0 4px 10px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.3);
  filter: brightness(1.04);
}
.btn.primary:active { transform: translateY(0); }
.btn.ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.6));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148,163,184,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.btn.ghost:hover {
  border-color: rgba(37,99,235,.4);
  color: var(--accent);
  background: rgba(255,255,255,.92);
  transform: translateY(-1px);
}

/* Card 通用升级 */
.card {
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -22px rgba(15,23,42,.18),
    0 1px 3px rgba(15,23,42,.04);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.4), rgba(124,58,237,.32), transparent);
  opacity: .55; pointer-events: none;
}
.card h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  color: var(--ink);
}

/* Composer 升级（语音合成左栏容器） */
.composer {
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 18px;
  position: relative; overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -22px rgba(15,23,42,.18);
}
.composer::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.45), rgba(124,58,237,.35), transparent);
  opacity: .6; pointer-events: none;
}
.composer-tab {
  border-radius: 11px;
  transition: background .18s, color .18s, transform .18s;
}
.composer-tab.active {
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(124,58,237,.12));
  color: var(--accent-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

/* Voice Panel 升级（右侧音色面板） */
.voice-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  position: relative; overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -22px rgba(15,23,42,.18);
}
.voice-panel::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.45), rgba(37,99,235,.3), transparent);
  opacity: .55; pointer-events: none;
}

/* Style Card（音乐生成） */
.style-card {
  border-radius: 14px !important;
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(180deg, #ffffff, #fafbff);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  position: relative;
  overflow: hidden;
}
.style-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.3), transparent);
  opacity: 0; transition: opacity .2s;
}
.style-card:hover { transform: translateY(-2px); }
.style-card:hover::before { opacity: .8; }
.style-card.active {
  background: linear-gradient(135deg, rgba(59,130,246,.16), rgba(124,58,237,.1));
  border-color: rgba(99,102,241,.45);
  box-shadow: 0 12px 24px -16px rgba(99,102,241,.45);
}

/* 占位页（如 ASR / Membership） */
.placeholder-page {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 14px 36px -22px rgba(15,23,42,.22);
  padding: 56px 24px;
  text-align: center;
  overflow: hidden;
}
.placeholder-page::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.45), rgba(124,58,237,.35), transparent);
}
.placeholder-page .ico {
  font-size: 56px;
  filter: drop-shadow(0 8px 16px rgba(99,102,241,.3));
}

/* Editor / 输入框升级 */
textarea, input[type="text"] {
  background: var(--surface-2);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 13px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
  background: var(--surface);
}

/* vs-dropzone / vs-textarea 升级 */
.vs-dropzone {
  border-radius: 16px !important;
  border: 2px dashed rgba(99,102,241,.32) !important;
  background: linear-gradient(180deg, #f8faff, #f3f6fd) !important;
  transition: border-color .2s, background .2s, transform .2s !important;
}
.vs-dropzone:hover, .vs-dropzone.drag {
  border-color: rgba(99,102,241,.6) !important;
  background: linear-gradient(180deg, #eff4ff, #e8efff) !important;
  transform: scale(1.005);
}
.vs-textarea {
  background: var(--surface-2);
  border: 1px solid rgba(148,163,184,.22) !important;
  border-radius: 13px !important;
  transition: border-color .18s, box-shadow .18s !important;
}
.vs-textarea:focus {
  outline: none;
  border-color: rgba(99,102,241,.55) !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

/* Generate Button 升级 */
.generate-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #4f46e5 110%) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow:
    0 12px 28px rgba(37,99,235,.42),
    0 4px 10px rgba(124,58,237,.2),
    inset 0 1px 0 rgba(255,255,255,.32) !important;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease, filter .18s ease !important;
}
.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow:
    0 18px 36px rgba(37,99,235,.55),
    0 6px 14px rgba(124,58,237,.35),
    inset 0 1px 0 rgba(255,255,255,.36) !important;
  filter: brightness(1.05);
}

/* Toast 升级 */
#toast {
  border-radius: 14px !important;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(15,23,42,.85) !important;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(15,23,42,.35) !important;
  font-weight: 600;
}

/* Nav 升级（顶部导航栏） */
nav.nav-pill,
.top-nav,
.app-nav {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.7)) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 6px 18px -16px rgba(15,23,42,.2);
}

/* Audio Dock（生成音频条） */
.audio-dock {
  border-radius: 16px !important;
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(180deg, #ffffff, #fafbff);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 10px 24px -20px rgba(15,23,42,.15);
}

/* Mobile hide-aurora 优化（小屏禁用 blurs） */
@media (max-width: 640px) {
  .hm-aurora { filter: blur(50px); opacity: .5; }
}

/* ============ 微信登录 / 微信支付弹窗 ============ */
.wx-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: qrFade .15s ease-out;
}
.wx-modal[hidden] { display: none; }
.wx-modal-mask {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wx-modal-card {
  position: relative;
  background: #fff; color: #0f172a;
  width: min(400px, 100%);
  border-radius: 20px;
  padding: 26px 24px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.1);
  animation: qrPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.wx-modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 22px; line-height: 1; color: #64748b; cursor: pointer;
  border-radius: 8px; transition: background .15s, color .15s;
}
.wx-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.wx-modal-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding: 0 34px 0 4px;
}
.wx-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: #f1f5f9; color: #0f172a;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.wx-logo.green { background: linear-gradient(135deg, #07c160, #06ad56); color: #fff; }
.wx-logo svg { width: 22px; height: 22px; }
.wx-modal-title { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.wx-modal-body { min-height: 120px; }

/* 登录弹窗内容 */
.wx-sub { font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 16px; text-align: center; }
.wx-qr-stage {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 4px 0 2px;
}
.wx-qr-frame {
  width: 230px; height: 230px;
  border: 1px solid #e2e8f0; border-radius: 14px;
  background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.wx-qr-frame iframe { width: 100%; height: 100%; border: 0; }
.wx-qr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wx-qr-alt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: #f1f5f9; color: #475569;
  font-size: 12px; text-decoration: none; line-height: 1.5;
  transition: background .2s ease, color .2s ease;
}
.wx-qr-alt:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }
.wx-qr-demo {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background:
    repeating-linear-gradient(0deg, #0f172a 0 6px, transparent 6px 12px),
    repeating-linear-gradient(90deg, #0f172a 0 6px, transparent 6px 12px),
    #fff;
  background-blend-mode: multiply;
}
.wx-qr-demo-inner {
  background: #fff; border-radius: 12px; padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.wx-qr-demo-inner strong { font-size: 14px; }
.wx-qr-demo-inner span { font-size: 12px; color: #07c160; font-weight: 600; }
.wx-qr-scan-line {
  position: absolute; left: 10%; right: 10%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #07c160, transparent);
  animation: wxScan 2.4s ease-in-out infinite;
}
@keyframes wxScan { 0%,100% { top: 8%; } 50% { top: 90%; } }
.wx-waiting { font-size: 13px; color: #64748b; display: flex; align-items: center; gap: 8px; }
.wx-waiting .spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #e2e8f0; border-top-color: #07c160;
  animation: wxSpin .8s linear infinite;
}
@keyframes wxSpin { to { transform: rotate(360deg); } }
.wx-qr-hint {
  font-size: 12px; color: #94a3b8; line-height: 1.6;
  margin-top: 8px; text-align: center;
  padding: 8px 10px; border-radius: 10px;
  background: #f8fafc;
}
.wx-btn-green {
  width: 100%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 14px 20px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 16px rgba(7,193,96,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wx-btn-green:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(7,193,96,.45); }
.wx-btn-green:active { transform: scale(.97); }
.wx-btn-green svg { width: 20px; height: 20px; }
.wx-btn-outline {
  width: 100%; cursor: pointer;
  background: #fff; color: #334155;
  border: 1px solid #e2e8f0;
  font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 12px;
  transition: background .15s;
}
.wx-btn-outline:hover { background: #f8fafc; }
.wx-demo-tip {
  font-size: 12px; color: #94a3b8; text-align: center; line-height: 1.6;
  margin-top: 12px;
}
.wx-user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}
.wx-user-chip img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #e2e8f9;
}
.wx-user-chip .av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.wx-user-chip .nm { font-size: 14px; font-weight: 700; }
.wx-user-chip .tk { font-size: 12px; color: #64748b; margin-top: 2px; }

/* 支付弹窗内容 */
.wx-pay-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  margin-bottom: 16px;
}
.wx-pay-plan .nm { font-size: 14px; font-weight: 700; }
.wx-pay-plan .tk { font-size: 12px; color: #64748b; margin-top: 3px; }
.wx-pay-plan .pr { font-size: 22px; font-weight: 800; color: #07c160; }
.wx-pay-plan .pr small { font-size: 13px; font-weight: 600; }
.wx-code-url {
  font-size: 11px; color: #64748b; background: #f8fafc;
  border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 8px 10px; word-break: break-all; line-height: 1.5;
  margin-top: 12px; text-align: left;
  -webkit-user-select: text; user-select: text;
}
.wx-success {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 0 6px; text-align: center;
}
.wx-success .ok {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  animation: wxPop .35s cubic-bezier(.2, .9, .3, 1.4);
  box-shadow: 0 10px 26px rgba(7,193,96,.4);
}
@keyframes wxPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- 自定义金额充值 ---- */
.wx-amt-box {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.wx-amt-box:focus-within { border-color: #07c160; box-shadow: 0 0 0 3px rgba(7,193,96,.14); background: #fff; }
.wx-amt-cur { font-size: 22px; font-weight: 800; color: #07c160; }
.wx-amt-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 22px; font-weight: 700; color: #0f172a;
  min-width: 0; direction: ltr; text-align: left;
}
.wx-amt-input::placeholder { font-size: 14px; font-weight: 400; color: #94a3b8; }
.wx-amt-input.invalid { color: #ef4444; }
.wx-amt-get {
  margin: 12px 2px 16px; font-size: 13px; color: #64748b;
}
.wx-amt-get b { color: #07c160; font-size: 16px; }
.wx-success h4 { font-size: 17px; font-weight: 800; margin: 0; }
.wx-success p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.6; }
.wx-success p b { color: #07c160; }

/* 顶栏已登录头像 */
.account-btn .avatar img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
}

/* ============ 微信登录弹窗 · 图 1 样式 ============ */
.wx-modal-card.wx-login-card {
  width: min(420px, 100%);
  padding: 38px 32px 24px;
  text-align: center;
  border-radius: 22px;
}
.wx-login-card .wx-modal-close { top: 14px; right: 14px; }
.wx-login-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-bottom: 20px;
}
.wx-login-logo {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  box-shadow: 0 8px 22px rgba(7, 193, 96, 0.35);
}
.wx-login-logo svg { width: 36px; height: 36px; }
.wx-login-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
  letter-spacing: .02em;
}
.wx-login-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.65;
  margin: 0 14px 22px;
}
.wx-login-cta {
  width: 100%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  font-size: 15px; font-weight: 700;
  padding: 16px 20px;
  border-radius: 32px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 22px rgba(7, 193, 96, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
  letter-spacing: .03em;
}
.wx-login-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(7, 193, 96, 0.45); }
.wx-login-cta:active { transform: scale(.97); }
.wx-login-cta:focus-visible { outline: 2px solid #07c160; outline-offset: 3px; }
.wx-login-cta svg { width: 18px; height: 18px; }
.wx-login-body { margin-top: 14px; min-height: 0; }
.wx-login-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.6;
}
.wx-link { color: #64748b; text-decoration: none; transition: color .15s; }
.wx-link:hover { color: #07c160; text-decoration: underline; }

/* 在微信内：隐藏底部扫码按钮 + 显示授权按钮 */
.wx-login-card.is-wechat .wx-login-cta { display: none; }

/* 弹窗内的动态内容（QR / 等待状态） */
.wx-qr-stage {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 6px 0 2px;
}
.wx-qr-stage .wx-qr-frame {
  width: 200px; height: 200px;
  border: 1px solid #e2e8f0; border-radius: 14px;
  background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.wx-qr-stage .wx-qr-frame iframe { width: 100%; height: 100%; border: 0; }
.wx-qr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wx-qr-alt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: #f1f5f9; color: #475569;
  font-size: 12px; text-decoration: none; line-height: 1.5;
  transition: background .2s ease, color .2s ease;
}
.wx-qr-alt:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }
.wx-qr-demo {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background:
    repeating-linear-gradient(0deg, #0f172a 0 5px, transparent 5px 10px),
    repeating-linear-gradient(90deg, #0f172a 0 5px, transparent 5px 10px),
    #fff;
  background-blend-mode: multiply;
}
.wx-qr-demo-inner {
  background: #fff; border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.wx-qr-demo-inner strong { font-size: 13px; }
.wx-qr-demo-inner span { font-size: 11px; color: #07c160; font-weight: 700; }
.wx-qr-scan-line {
  position: absolute; left: 10%; right: 10%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #07c160, transparent);
  animation: wxScan 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes wxScan { 0%,100% { top: 8%; } 50% { top: 90%; } }
.wx-waiting {
  font-size: 12.5px; color: #64748b;
  display: flex; align-items: center; gap: 8px;
}
.wx-waiting .spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #e2e8f0; border-top-color: #07c160;
  animation: wxSpin .8s linear infinite;
}
@keyframes wxSpin { to { transform: rotate(360deg); } }
.wx-qr-hint {
  font-size: 12px; color: #94a3b8; line-height: 1.6;
  margin-top: 8px; text-align: center;
  padding: 8px 10px; border-radius: 10px;
  background: #f8fafc;
}
.wx-demo-tip {
  font-size: 11.5px; color: #94a3b8; line-height: 1.55; margin-top: 4px;
  padding: 8px 12px; border-radius: 10px;
  background: #f8fafc; border: 1px dashed #e2e8f0;
}
.wx-btn-mini {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  color: #07c160; background: transparent; border: 0;
  padding: 6px 10px; cursor: pointer; border-radius: 8px;
  transition: background .15s;
}
.wx-btn-mini:hover { background: #f1f5f9; }

/* ===== 微信内置浏览器内：一键登录卡片 ===== */
.wx-one-tap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 8px 4px 2px;
  text-align: center;
}
.wx-one-tap .wx-icon-big {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; line-height: 1;
  background: linear-gradient(135deg, #07c160 0%, #10b981 100%);
  color: #fff;
  border-radius: 18px; box-shadow: 0 6px 18px rgba(7,193,96,.35);
  margin: 4px 0 2px;
}
.wx-one-tap h3 {
  margin: 0; font-size: 15px; font-weight: 600; color: #1e293b;
}
.wx-one-tap p.hint {
  margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.5;
  padding: 0 8px;
}
.wx-btn-primary {
  width: 100%; max-width: 280px;
  padding: 13px 20px;
  font-size: 15px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #07c160 0%, #04a64f 100%);
  border: 0; border-radius: 999px; cursor: pointer;
  letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(7,193,96,.4);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.wx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(7,193,96,.5); }
.wx-btn-primary:active { transform: translateY(0); opacity: .9; }
.wx-btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.wx-one-tap .wx-qr-alt { margin-top: 2px; }

/* 「请先登录」占位页（在主区渲染） */
.login-required {
  max-width: 460px;
  margin: 80px auto 40px;
  padding: 40px 32px 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 12px 36px -16px rgba(15,23,42,.12);
}
.login-required .lr-icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; border-radius: 50%;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.32);
}
.login-required .lr-icon svg { width: 36px; height: 36px; }
.login-required h2 {
  font-size: 20px; font-weight: 800; color: #0f172a;
  margin: 0 0 10px; letter-spacing: .02em;
}
.login-required p {
  font-size: 13.5px; color: #64748b; line-height: 1.7;
  margin: 0 0 24px;
}
.login-required .lr-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff; font-weight: 700; font-size: 15px;
  border: 0; border-radius: 32px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(7, 193, 96, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.login-required .lr-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(7, 193, 96, 0.45); }
.login-required .lr-btn:active { transform: scale(.97); }
.login-required .lr-btn svg { width: 18px; height: 18px; }
.login-required .lr-meta {
  margin-top: 16px; font-size: 11.5px; color: #94a3b8;
}

/* === Mobile voice panel (bottom sheet) — 高 specificity 覆盖 .voice-panel{position:relative} === */
@media (max-width: 900px) {
  body .voice-panel#voicePanel {
    position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    top: 8vh !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: translateY(100%) !important;
    transition: transform .28s cubic-bezier(.2,.8,.2,1) !important;
    z-index: 30 !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(15,23,42,.18) !important;
  }
  body .voice-panel#voicePanel.open { transform: translateY(0) !important; }
  body .voice-panel#voicePanel::after {
    content: "";
    display: block;
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 2px;
    background: rgba(148,163,184,.45);
  }
  body .voice-panel#voicePanel .voice-list { flex: 1 1 auto; min-height: 0; }
  body .voice-panel#voicePanel .voice-cats { flex: 0 0 auto; }
  body .voice-panel#voicePanel .panel-search { flex: 0 0 auto; }
  body .voice-panel#voicePanel .panel-tabs { flex: 0 0 auto; }
}
