:root {
  --bg: #060912;
  --bg2: #0b1020;
  --panel: rgba(20, 27, 48, .82);
  --panel-solid: #121a2e;
  --line: rgba(140, 165, 255, .13);
  --text: #eaf0ff;
  --text2: #94a3c4;
  --text3: #64708c;
  --cyan: #38e1ff;
  --violet: #9b6bff;
  --pink: #ff5b7f;
  --ok: #38e8a8;
  --warn: #ffb454;
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* 视口不锁死高度：由内容决定，避免部分 WebView / 微信内核里页面滑不动 */
html {
  min-height: 100%;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-overflow-scrolling: touch;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(680px 420px at 88% -8%, rgba(155, 107, 255, .22), transparent 62%),
    radial-gradient(560px 380px at -12% 12%, rgba(56, 225, 255, .16), transparent 60%),
    linear-gradient(180deg, #060912 0%, #080d1c 45%, #060912 100%);
  z-index: -2;
}

input, textarea, select, button { font-family: inherit; }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-t);
  padding-bottom: calc(84px + var(--safe-b));
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, rgba(6, 9, 18, .96), rgba(6, 9, 18, .72) 70%, transparent);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(80, 160, 255, .3);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 10px; color: var(--text3); letter-spacing: .6px; margin-top: 1px; }

.chip {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--text2); font-size: 12px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }
.chip.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------------- 视图 ---------------- */
.view { padding: 0 16px; animation: fade .28s ease; }
.view.hidden { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero { padding: 6px 2px 16px; }
.hero h1 {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(100deg, #fff 20%, var(--cyan) 60%, var(--violet) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 7px 0 0; font-size: 13px; color: var(--text2); }

.page-head { padding: 6px 2px 14px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; }

.block { margin-bottom: 22px; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 11px; padding: 0 2px;
}
.block-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.hint { font-size: 11px; color: var(--text3); }
.head-actions { display: flex; gap: 14px; }
.link {
  background: none; border: 0; padding: 0;
  color: var(--cyan); font-size: 12px;
}

/* ---------------- 模板 ---------------- */
.tpl-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  margin: 0 -16px; padding: 2px 16px 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tpl-scroll::-webkit-scrollbar { display: none; }

.tpl {
  position: relative; flex: 0 0 104px; height: 138px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px;
  transition: transform .18s ease, box-shadow .18s ease;
  background: #131a2e;
}
.tpl:active { transform: scale(.97); }
.tpl.sel {
  border-color: rgba(56, 225, 255, .85);
  box-shadow: 0 0 0 2px rgba(56, 225, 255, .25), 0 10px 26px rgba(56, 225, 255, .18);
}
.tpl-cover { position: absolute; inset: 0; opacity: .92; }
.tpl-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .55));
}
.tpl-name { position: relative; font-size: 13px; font-weight: 700; }
.tpl-desc { position: relative; font-size: 10px; color: rgba(255, 255, 255, .72); margin-top: 3px; }
.tpl-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .38); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .22);
}

/* ---------------- 文案 ---------------- */
.textarea-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 13px 8px;
  backdrop-filter: blur(10px);
}
textarea {
  width: 100%; border: 0; outline: none; resize: none;
  background: transparent; color: var(--text);
  font-size: 16px; line-height: 1.72;
}
textarea::placeholder { color: var(--text3); }
.ta-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text3);
  border-top: 1px solid rgba(255, 255, 255, .05);
  padding-top: 8px;
}
.tip { font-size: 11px; color: var(--text3); margin: 9px 2px 0; line-height: 1.6; }

/* ---------------- 素材 ---------------- */
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.asset-add {
  aspect-ratio: 3/4; border-radius: 14px;
  border: 1.5px dashed rgba(120, 150, 220, .34);
  background: rgba(255, 255, 255, .025);
  color: var(--text2); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.asset-add .plus { font-size: 24px; font-weight: 300; color: var(--cyan); line-height: 1; }
.asset-item {
  position: relative; aspect-ratio: 3/4; border-radius: 14px;
  overflow: hidden; background: #101728; border: 1px solid var(--line);
}
.asset-item img, .asset-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-item .del {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; border: 0;
  font-size: 14px; line-height: 22px; text-align: center;
}
.asset-item .first {
  position: absolute; left: 5px; bottom: 5px;
  font-size: 9px; padding: 2px 6px; border-radius: 6px;
  background: rgba(56, 225, 255, .9); color: #04121a; font-weight: 700;
}
.asset-item .up {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 18, .68); color: #dff4ff; font-size: 12px;
}

/* ---------------- 表单 ---------------- */
.field { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.field label { flex: 0 0 62px; font-size: 13px; color: var(--text2); }
.field label b { color: var(--cyan); font-weight: 600; margin-left: 4px; }

select, input[type="tel"], input[type="text"] {
  flex: 1; appearance: none;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 13px;
  color: var(--text); font-size: 16px; outline: none;
  width: 100%;
}
select:focus, input:focus { border-color: rgba(56, 225, 255, .5); }

input[type="range"] {
  flex: 1; -webkit-appearance: none; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.seg { flex: 1; display: flex; gap: 6px; }
.seg button {
  flex: 1; padding: 9px 0; border-radius: 10px; font-size: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text2);
}
.seg button.on {
  background: linear-gradient(120deg, rgba(56, 225, 255, .18), rgba(155, 107, 255, .22));
  border-color: rgba(56, 225, 255, .5); color: #eafcff; font-weight: 600;
}

.adv {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 12px; margin-top: 4px;
}
.adv summary { font-size: 13px; color: var(--text2); list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: "⌄"; float: right; color: var(--text3); }
.adv-body { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--text); border-radius: 12px; padding: 11px 16px;
  font-size: 14px; font-weight: 600; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.primary {
  background: linear-gradient(100deg, var(--cyan), #6aa8ff 45%, var(--violet));
  color: #04121c; border: 0;
  box-shadow: 0 8px 24px rgba(80, 160, 255, .28);
}
.btn.ghost { background: transparent; }
.btn.block { display: flex; width: 100%; }
.btn.small { padding: 8px 12px; font-size: 12px; }
.btn.tiny { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn[disabled] { opacity: .45; }

.fab-wrap {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(74px + var(--safe-b)); z-index: 25;
  transition: opacity .2s, transform .2s;
}
.fab-wrap.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab {
  position: relative; width: 100%; height: 52px; border: 0; border-radius: 16px;
  background: linear-gradient(100deg, #3ce3ff, #6b9dff 45%, #a172ff);
  color: #05121c; font-size: 16px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(90, 160, 255, .34);
  overflow: hidden;
}
.fab-glow {
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: sweep 2.8s infinite;
}
@keyframes sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 28;
  display: flex;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: rgba(8, 12, 24, .88);
  border-top: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px);
}
.tab {
  flex: 1; border: 0; background: none; color: var(--text3);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0; font-size: 11px;
}
.tab-ico { font-size: 17px; line-height: 1; }
.tab.active { color: var(--cyan); }
.tab.active .tab-ico { text-shadow: 0 0 14px rgba(56, 225, 255, .7); }

/* ---------------- 作品 ---------------- */
.stat-row { display: flex; gap: 10px; margin-top: 10px; }
.stat {
  flex: 1; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 13px;
}
.stat b { display: block; font-size: 20px; font-weight: 800; }
.stat span { font-size: 11px; color: var(--text3); }

.works { display: flex; flex-direction: column; gap: 12px; }
.work {
  display: flex; gap: 12px; padding: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; align-items: center;
}
.work-thumb {
  position: relative; width: 66px; height: 92px; flex: 0 0 66px;
  border-radius: 11px; overflow: hidden; background: #0d1424;
  display: flex; align-items: center; justify-content: center;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb .ph { font-size: 22px; opacity: .5; }
.work-thumb .dur {
  position: absolute; right: 4px; bottom: 4px;
  font-size: 9px; padding: 1px 5px; border-radius: 5px;
  background: rgba(0, 0, 0, .66); color: #fff;
}
.work-main { flex: 1; min-width: 0; }
.work-title { font-size: 13px; font-weight: 600; line-height: 1.5; max-height: 3em; overflow: hidden; }
.work-meta { font-size: 11px; color: var(--text3); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; }
.work-actions { display: flex; gap: 7px; margin-top: 9px; }
.mini {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
  color: var(--text2); font-size: 11px; padding: 6px 11px; border-radius: 8px;
}
.mini.pri { color: #04121c; background: linear-gradient(100deg, var(--cyan), #7aa5ff); border: 0; font-weight: 700; }
.badge-run { color: var(--cyan); }
.badge-done { color: var(--ok); }
.badge-fail { color: var(--pink); }

.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-ico { font-size: 40px; opacity: .5; margin-bottom: 12px; }
.empty p { font-size: 13px; }

/* ---------------- 我的 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px; margin-bottom: 12px;
  backdrop-filter: blur(10px);
}
.user-card { display: flex; align-items: center; justify-content: space-between; }
.uc-left { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #04121c; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.uc-name { font-size: 15px; font-weight: 700; }
.uc-sub { font-size: 11px; color: var(--text3); margin-top: 3px; }
.kv {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text2); }
.kv b { font-weight: 600; }
.kv b.ok { color: var(--ok); }
.kv b.bad { color: var(--pink); }

.row-btn {
  width: 100%; background: none; border: 0; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 2px; font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.row-btn:last-child { border-bottom: 0; }
.row-btn span { color: var(--text3); }

.footnote {
  text-align: center; font-size: 11px; color: var(--text3);
  line-height: 1.8; margin-top: 22px;
}

/* ---------------- 弹层 ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 6, 14, .72);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-end;
  animation: fade .2s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet.hidden { display: none; }
.sheet-body {
  width: 100%; background: #0c1324;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(140, 170, 255, .18);
  padding: 20px 18px calc(22px + var(--safe-b));
  animation: up .26s cubic-bezier(.2, .8, .2, 1);
  /* 小屏手机弹层内容超高时自身可滚，不会被顶出屏幕 */
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet-body.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
@keyframes up { from { transform: translateY(40px); } to { transform: none; } }

.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; font-size: 17px; }
.sheet-desc { font-size: 12px; color: var(--text3); line-height: 1.7; margin: 0 0 16px; }
.sheet-foot { font-size: 11px; color: var(--text3); text-align: center; margin: 14px 0 0; }
.close { background: none; border: 0; color: var(--text3); font-size: 24px; line-height: 1; padding: 0 4px; }
.err { color: var(--pink); font-size: 12px; min-height: 16px; margin-bottom: 6px; }

/* 进度环 */
.ring { position: relative; width: 148px; height: 148px; margin: 6px 0 16px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: rgba(255, 255, 255, .07); }
.ring-fg {
  stroke: url(#g);
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset .5s ease, stroke .3s;
  filter: drop-shadow(0 0 8px rgba(56, 225, 255, .6));
}
.ring-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; letter-spacing: -1px;
}
.ring-num span { font-size: 14px; color: var(--text3); margin-left: 2px; }
.sheet-body h3 { margin: 0 0 6px; font-size: 16px; }
.prog-sub { font-size: 11px; color: var(--text3); margin: 0 0 18px; }

/* 播放器 */
.player {
  position: fixed; inset: 0; z-index: 70;
  background: #000;
  display: flex; flex-direction: column;
  padding-top: var(--safe-t);
}
.player.hidden { display: none; }
.player-top {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--text2);
}
.player video { flex: 1; width: 100%; object-fit: contain; background: #000; }
.player-actions {
  display: flex; gap: 10px; padding: 12px 16px calc(18px + var(--safe-b));
}
.player-actions .btn { flex: 1; text-decoration: none; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-b));
  transform: translateX(-50%) translateY(12px);
  background: rgba(16, 24, 42, .96);
  border: 1px solid var(--line);
  color: var(--text); font-size: 13px;
  padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .24s; z-index: 90;
  max-width: 84vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.bottom-space { height: 24px; }

/* 作品进度条 */
.work-bar {
  height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08);
  margin-top: 9px; overflow: hidden;
}
.work-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .4s ease;
}


/* ---------------- iOS 适配（Safari / 主屏幕 App） ---------------- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-overflow-scrolling: touch; }

/* iOS 专用：把滚动交给 #app，避开 iOS 上 body 高度/overflow 导致的整页滑不动 */
html.is-ios,
html.is-ios body {
  height: 100%;
  overflow: hidden;
}
html.is-ios #app {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
/* iOS 上 body 内部滚动容器里，固定底栏照旧贴视口底部 */
button, a, .tab, .tpl, .chip, .seg, .row-btn { touch-action: manipulation; }
button, .tab, .chip, .row-btn, .tpl { -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
/* 独立运行时顶部安全区由 #app 处理，这里只修正刘海屏横屏两侧 */
@supports (padding: max(0px)) {
  .topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .tabbar { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
}
/* iOS 播放器：不显示系统画中画按钮，避免和自绘按钮重叠 */
video::-webkit-media-controls-picture-in-picture-button { display: none; }

/* ===== 测试版登录区 ===== */
.test-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(56, 225, 255, .38);
  background: linear-gradient(180deg, rgba(56, 225, 255, .09), rgba(155, 107, 255, .07));
}
.test-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.test-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 700; letter-spacing: .5px;
  color: #04121b; background: linear-gradient(135deg, var(--cyan), #7ef0c6);
}
.test-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text2); padding: 3px 0; }
.test-row b { color: var(--text); font-weight: 600; letter-spacing: .4px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.test-acts { display: flex; gap: 8px; margin-top: 10px; }
.test-acts .btn { flex: 1; }
.test-tip { margin: 8px 0 0; font-size: 10.5px; line-height: 1.5; color: var(--text3); }

/* 诊断信息（我的页底部，排查环境用） */
.diag { display: inline-block; margin-top: 6px; font-size: 10px; color: var(--text3); opacity: .72; letter-spacing: .2px; }

/* ================= 新功能：字幕匹配 / 模板中心 / AI 文案 / 声音克隆 ================= */

.field.stack { display: block; }
.field.stack > label { display: block; flex: none; margin-bottom: 8px; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.field.two > div > label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text2); }

textarea, input[type="password"], input[type="number"], .input {
  width: 100%; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 13px;
  color: var(--text); font-size: 15px; outline: none; font-family: inherit;
}
textarea { resize: vertical; line-height: 1.6; }
textarea:focus, input[type="password"]:focus, input[type="number"]:focus { border-color: rgba(56, 225, 255, .5); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .opt {
  padding: 7px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text2);
}
.chips .opt.on {
  background: linear-gradient(120deg, rgba(56, 225, 255, .2), rgba(155, 107, 255, .24));
  border-color: rgba(56, 225, 255, .55); color: #eafcff; font-weight: 600;
}

.voice-row { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 0; }
.voice-row select { flex: 1; min-width: 0; }
.voice-row .btn { white-space: nowrap; padding: 10px; font-size: 12px; }

/* 手风琴（背景音乐） */
.acc { border-top: 1px solid rgba(255, 255, 255, .06); padding-top: 12px; margin-top: 4px; }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 8px 0; color: var(--text); font-size: 13px;
}
.acc-title { color: var(--text2); }
.acc-title i { font-style: normal; font-size: 11px; color: var(--text3); margin-left: 4px; }
.acc-val { margin-left: auto; font-size: 12px; color: var(--text3); max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-ar { color: var(--text3); transition: transform .2s; }
.acc.open .acc-ar { transform: rotate(180deg); }
.acc-body { padding-top: 10px; }
.acc-body.hidden { display: none; }
.bgm-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; }

/* 模板中心 */
.fullpage { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--safe-t); }
.fullpage.hidden { display: none; }
.fp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.fp-head h3 { font-size: 17px; margin: 0; }
.fp-head .close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); color: var(--text); font-size: 18px; line-height: 1;
}
.fp-count { margin-left: auto; font-size: 12px; color: var(--text3); }
.fp-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(28px + var(--safe-b)); }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpl-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); position: relative; }
.tpl-card.on { border-color: rgba(56, 225, 255, .65); box-shadow: 0 0 0 1px rgba(56, 225, 255, .4), 0 10px 26px rgba(56, 225, 255, .14); }
.tpl-card .cover { height: 112px; display: flex; align-items: flex-end; padding: 10px; }
.tpl-card .cover span { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .55); line-height: 1.25; }
.tpl-card .meta { padding: 9px 11px 11px; }
.tpl-card .nm { font-size: 13px; font-weight: 600; }
.tpl-card .ds { font-size: 10.5px; color: var(--text3); margin-top: 3px; line-height: 1.5; }
.tpl-card .tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.tpl-card .tags i { font-style: normal; font-size: 9.5px; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--text2); }
.tpl-card .pick { position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(4, 10, 22, .7); color: #bff3ff; }
.fp-tip { text-align: center; font-size: 11px; color: var(--text3); margin: 16px 0 0; }

/* AI 输出区 */
.ai-out { margin-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .1); padding-top: 12px; }
.ai-out.hidden { display: none; }
.ai-out > label { font-size: 12px; color: var(--text2); display: block; margin-bottom: 8px; }
.ai-text {
  max-height: 210px; overflow-y: auto; font-size: 13px; line-height: 1.7; color: var(--text);
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; white-space: pre-wrap; -webkit-overflow-scrolling: touch;
}
.ai-acts { display: flex; gap: 8px; margin-top: 10px; }
.ai-acts .btn { flex: 1; }
.ai-status { font-size: 12px; color: var(--text3); margin: 4px 0 10px; line-height: 1.6; }
.ai-status.ok { color: #6ee7b7; }
.ai-status.err { color: #fca5a5; }
.clone-list { margin-top: 12px; }
.clone-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: rgba(255, 255, 255, .04); }
.clone-item .ci-name { font-size: 13px; }
.clone-item .ci-sub { font-size: 10.5px; color: var(--text3); }
.clone-item .ci-acts { margin-left: auto; display: flex; gap: 6px; }
.clone-item .btn { padding: 6px 10px; font-size: 11px; }
.clone-empty { font-size: 12px; color: var(--text3); text-align: center; padding: 8px 0; }
