/* 智能剪口播 · 页面样式 */
.mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-grid .opt { min-height: 78px; }
.lang-row { justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
.lang-row .seg button { padding: 6px 12px; }

.workspace.ce { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.workspace.ce.portrait { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); }
.preview-card { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 12px; }
.grow-pill { flex: 1; padding: 6px 10px; }
.grow-pill .fp-ic { width: 32px; height: 32px; }
.video-stage { display: flex; align-items: center; justify-content: center; padding: 10px; min-height: 220px; height: min(calc(100vh - 430px), 560px); background: radial-gradient(ellipse at center, rgba(213,179,121,.06), transparent 70%), repeating-conic-gradient(var(--checker-a) 0 25%, var(--checker-b) 0 50%) 0 0/20px 20px; }
.vbox { position: relative; max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; height: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); background: #000; }
.vbox video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.audio-art { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(220,192,143,.28), transparent 60%), linear-gradient(135deg, #261e11, #312717); }
.audio-art svg { width: 64px; height: 64px; color: #e9d7b8; filter: drop-shadow(0 0 18px rgba(220,192,143,.6)); }
.cut-flash { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 4; font-size: 11.5px; padding: 5px 10px; border-radius: 999px; color: #fff; background: rgba(239,68,68,.75); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; animation: pop .15s ease-out; }
.player-row { display: flex; align-items: center; gap: 12px; }
.player-row .play-btn { width: 40px; height: 40px; }
.ptime { display: flex; align-items: baseline; gap: 4px; font-size: 14px; font-weight: 600; }
.ptime .faint { font-size: 12px; font-weight: 400; }
.skip-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.timeline { padding: 8px 10px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.timeline .wave { height: 72px; }
.tl-legend { display: flex; gap: 14px; align-items: center; font-size: 11.5px; color: var(--text-2); margin-top: 4px; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-keep { background: linear-gradient(135deg, #d5b379, #d6b57c); }
.lg-cut { background: rgba(248,113,113,.55); }
.tl-legend .faint { margin-left: auto; font-size: 11.5px; }
.stats { display: flex; align-items: stretch; gap: 8px; }
.stats .st { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); min-width: 0; }
.stats .st .faint { font-size: 11.5px; }
.stats .st b { font-size: 16px; font-weight: 650; white-space: nowrap; }
.stats .st.hi { border-color: rgba(220,192,143,.45); background: var(--accent-soft); }
.stats .st.hi b { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats .st.arrow { flex: none; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--text-3); }
.stats .st.arrow svg { width: 16px; height: 16px; }

.wide-side { gap: 12px; }
.tabs { padding: 4px; border-radius: 14px; background: var(--card-solid); position: sticky; top: 58px; z-index: 6; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; font-weight: 550; }
.tabs button svg { width: 16px; height: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head .card-title { margin: 0; }
.btn-row-sm { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row-sm .icon-btn { min-width: 36px; padding: 0 8px; }
.btn-row-sm .icon-btn:disabled { opacity: .35; cursor: default; }
.switch-row.tight { padding: 4px 0; }
.switch-row.tight > span { display: flex; flex-direction: column; gap: 2px; }
.switch-row.tight b { font-weight: 600; font-size: 14px; }
.switch-row.tight small { font-size: 12px; }
.lbl-note { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.opt-desc { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.55; }
.field-foot { font-size: 11.5px; margin-top: 6px; }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; }

/* 文稿 */
.text-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 16px; border-radius: 14px; border: 1px dashed var(--border-strong); background: var(--card); }
.text-empty .te-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--border); }
.text-empty .te-ic svg { width: 22px; height: 22px; color: var(--accent-1); }
.text-empty p { margin: 0; max-width: 380px; line-height: 1.6; }
.text-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.click-seg button { padding: 6px 11px; font-size: 13px; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.lgd { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--card); white-space: nowrap; }
.lgd i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.transcript { max-height: calc(100vh - 290px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; margin-right: -4px; scroll-behavior: smooth; }
.transcript:empty { display: none; }
.sent { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 6px; border-radius: 12px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.sent + .sent { margin-top: 2px; }
.sent:hover { background: var(--card); border-color: var(--border); }
.sent.playing { background: linear-gradient(135deg, rgba(213,179,121,.08), rgba(214,181,124,.06)); border-color: rgba(220,192,143,.3); }
.sent.all-rm .s-text { opacity: .55; }
.s-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 4px; cursor: pointer; border: 0; background: none; text-align: left; display: inline-flex; align-items: center; gap: 3px; }
.s-time svg { width: 10px; height: 10px; color: var(--accent-1); }
.s-time:hover { color: var(--accent-1); }
.s-text { font-size: 15.5px; line-height: 2; word-break: break-word; -webkit-user-select: text; user-select: text; }
.s-ops { display: flex; gap: 4px; opacity: .25; transition: opacity .15s; }
.sent:hover .s-ops, .sent.playing .s-ops { opacity: 1; }
.s-ops button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); background: var(--card-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.s-ops button svg { width: 14px; height: 14px; }
.s-ops button:hover { color: var(--text); border-color: var(--border-strong); }
.s-ops button.rm-on { color: var(--err); border-color: rgba(248,113,113,.4); }
.w { cursor: pointer; border-radius: 4px; padding: 1px 0; transition: background .1s, color .1s; -webkit-tap-highlight-color: transparent; }
.w:hover { background: rgba(220,192,143,.18); }
.w.k-filler, .w.k-weak { color: #fbbf24; border-bottom: 2px dotted rgba(251,191,36,.7); }
.w.k-repeat, .w.k-stutter { color: #eddec5; border-bottom: 2px dotted rgba(226,203,163,.7); }
.w.k-sound { color: var(--text-3); font-style: italic; font-size: 13px; }
:root[data-theme="light"] .w.k-filler, :root[data-theme="light"] .w.k-weak { color: #b45309; }
:root[data-theme="light"] .w.k-repeat, :root[data-theme="light"] .w.k-stutter { color: #c3923e; }
.w.rm { text-decoration: line-through; text-decoration-color: rgba(248,113,113,.9); text-decoration-thickness: 1.5px; color: var(--text-3) !important; background: rgba(248,113,113,.10); border-bottom-color: transparent !important; }
.w.cur { background: var(--accent) !important; color: #fff !important; box-shadow: 0 0 0 2px rgba(220,192,143,.25); text-decoration: none; }
.w.rm.cur { background: rgba(248,113,113,.5) !important; }
.pz { display: inline-flex; align-items: center; gap: 2px; margin: 0 3px; padding: 0 6px; height: 20px; border-radius: 999px; font-size: 11px; line-height: 20px; vertical-align: 2px; color: var(--text-2); border: 1px dashed var(--border-strong); background: var(--card); cursor: pointer; font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none; }
.pz svg { width: 10px; height: 10px; }
.pz.cut { color: #fca5a5; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.08); text-decoration: line-through; }
:root[data-theme="light"] .pz.cut { color: #dc2626; }
.tx-tip { margin: 10px 2px 0; font-size: 12px; line-height: 1.55; }

/* 自动检测 */
.pace-grid { margin-top: 2px; }
.pace-grid .opt { min-height: 0; padding: 9px 6px; }
.det-list { display: flex; flex-direction: column; gap: 8px; }
.det { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.det .d-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.det .d-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.det .d-main b { font-size: 14px; font-weight: 600; }
.det .d-main small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det .d-cnt { font-size: 12px; font-variant-numeric: tabular-nums; }
.det.off { opacity: .6; }
.det.na { opacity: .45; }

/* 导出 */
.result { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(52,211,153,.3); background: linear-gradient(135deg, rgba(52,211,153,.07), rgba(213,179,121,.06)); }
.result video { width: 100%; max-height: 52vh; border-radius: 10px; background: #000; }
.result audio { width: 100%; }
.res-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ios-tip { margin: 0; font-size: 12px; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sub-dl .btn { height: 40px; font-size: 13.5px; }
.sub-dl .btn svg { width: 16px; height: 16px; }
.kv b { font-weight: 600; }

@media (max-width: 1100px) {
  .workspace.ce, .workspace.ce.portrait { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .workspace.ce, .workspace.ce.portrait { grid-template-columns: minmax(0, 1fr); }
  .preview-card { position: sticky; top: 56px; z-index: 7; padding: 10px; gap: 8px; box-shadow: var(--shadow); background: var(--card-solid); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
  .preview-card .toolbar, .preview-card .stats, .preview-card .tl-legend { display: none; }
  .video-stage { height: 30vh; min-height: 0; padding: 6px; }
  .timeline { padding: 4px 6px; }
  .timeline .wave { height: 44px; }
  .player-row { gap: 10px; }
  .player-row .play-btn { width: 36px; height: 36px; }
  .tabs { position: static; }
  body[data-tab=export] .preview-card { position: relative; top: 0; }
  .transcript { max-height: none; overflow: visible; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .mode-grid .opt { min-height: 0; }
  .video-stage { height: 26vh; }
  .tabs button { font-size: 13px; }
  .sent { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; padding: 8px 4px; }
  .sent .s-time { grid-column: 1; grid-row: 1; padding-top: 0; }
  .sent .s-text { grid-column: 1 / -1; grid-row: 2; font-size: 16px; line-height: 1.95; }
  .sent .s-ops { grid-column: 2; grid-row: 1; opacity: 1; }
  .s-ops button { width: 28px; height: 26px; }
  .legend { margin-left: 0; }
  .skip-toggle span:first-child { font-size: 12px; }
  .lang-row .seg button { padding: 6px 9px; }
}
