/* 口播剪輯：深色專業感、暖橘主色、字和按鈕偏大 */
:root {
  --bg: #111113;
  --surface: #1b1b1f;
  --surface-2: #24242a;
  --surface-3: #2e2e35;
  --line: #34343c;
  --line-soft: #26262d;
  --ink: #f4f2ef;
  --ink-2: #c9c6c1;
  --muted: #8e8b87;
  --accent: #ff8a1f;
  --accent-hover: #ff9c42;
  --accent-ink: #1d1206;
  --accent-soft: rgb(255 138 31 / 0.14);
  --accent-line: rgb(255 138 31 / 0.45);
  --ok: #4fd18b;
  --ok-soft: rgb(79 209 139 / 0.13);
  --warn: #f5c04e;
  --warn-soft: rgb(245 192 78 / 0.12);
  --danger: #ff6b6b;
  --danger-soft: rgb(255 107 107 / 0.12);
  --hl-1: #ff8000;
  --hl-2: #ff4d4d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgb(0 0 0 / 0.35);
  color-scheme: dark;
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 30px; line-height: 1.25; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: 21px; margin: 0; }
h3 { font-size: 18px; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }

/* ── 頂部 ── */
.topbar {
  position: sticky; top: 0; z-index: 10; height: 64px; display: flex; align-items: center; gap: 20px;
  padding: 0 28px; background: rgb(17 17 19 / 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 17px; }
#crumbs { color: var(--muted); font-size: 15px; display: flex; gap: 8px; align-items: center; min-width: 0; }
#crumbs a:hover { color: var(--ink); }
main { max-width: 1120px; margin: 0 auto; padding: 28px 28px 140px; }

/* ── 步驟條 ── */
.stepper { display: flex; align-items: center; margin: 0 0 28px; }
.stepper .step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 16px; white-space: nowrap; }
.stepper .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 800; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--muted); }
.stepper .bar { flex: 1; height: 2px; background: var(--line); margin: 0 14px; min-width: 20px; }
.stepper .step.done { color: var(--ink-2); }
.stepper .step.done .dot { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.stepper .bar.done { background: var(--ok); opacity: .6; }
.stepper .step.now { color: var(--ink); }
.stepper .step.now .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper a.step:hover { color: var(--ink); }

/* ── 每一步的標題＋一句說明＋「？」 ── */
.step-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.step-head .lead { font-size: 18px; color: var(--ink-2); margin-top: 8px; }
.help-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 18px; font-weight: 700; cursor: pointer; }
.help-btn:hover, .help-btn[aria-expanded=true] { border-color: var(--accent); color: var(--accent); }
.help { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 20px; margin: -8px 0 24px; color: var(--ink-2); font-size: 16px; }
.help ul { margin: 6px 0 0; padding-left: 20px; }
.help li + li { margin-top: 4px; }

/* ── 卡片、區塊 ── */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title .num { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 15px; font-weight: 800; color: var(--accent); }

/* ── 按鈕 ── */
.btn {
  appearance: none; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  min-height: 48px; padding: 0 20px; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { border-color: var(--muted); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.big { min-height: 58px; padding: 0 30px; font-size: 19px; border-radius: 14px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn.icon { min-height: 42px; width: 42px; padding: 0; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── 底部按鈕列：每一步只有一個主要按鈕 ── */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: rgb(17 17 19 / 0.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line-soft); }
.actionbar .inner { max-width: 1120px; margin: 0 auto; padding: 16px 28px; display: flex; gap: 14px; align-items: center; }
.actionbar .status { flex: 1; min-width: 0; color: var(--muted); font-size: 15px; }
.actionbar .status.dirty { color: var(--accent); }

/* ── 表單 ── */
label.field { display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 600; color: var(--ink-2); }
label.field .muted { font-weight: 400; font-size: 14px; }
input[type=text], input[type=search], select, textarea {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 50px;
}
textarea { min-height: 0; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #5f5c58; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; background: var(--surface-2); font-weight: 700; transition: border-color .12s, background .12s; }
.choice input { position: absolute; opacity: 0; }
.choice .muted { display: block; font-weight: 400; font-size: 14px; margin-top: 4px; }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:checked)::after { content: "✓"; position: absolute; top: 12px; right: 14px; color: var(--accent); font-weight: 900; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--ink); }

/* ── 提示框 ── */
.notice { padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 15px; border: 1px solid rgb(245 192 78 / 0.25); }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: rgb(79 209 139 / 0.25); }
.notice.info { background: var(--accent-soft); color: var(--ink-2); border-color: var(--accent-line); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.run { background: var(--surface-3); color: var(--ink-2); }
.chip { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
mark { background: #ffd43b; color: #1a1406; border-radius: 4px; padding: 0 2px; }

/* ── 首頁：大縮圖卡片 ── */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.project { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; transition: transform .15s, border-color .15s; }
.project:hover { transform: translateY(-3px); border-color: var(--line); }
.project .thumb { position: relative; aspect-ratio: 9/14; background: var(--surface-2) center/cover no-repeat; }
.project .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .75), transparent 45%); }
.project .thumb .badge { position: absolute; top: 12px; left: 12px; z-index: 1; backdrop-filter: blur(6px); }
.project .thumb .badge.warn { background: rgb(40 32 10 / .8); }
.project .thumb .badge.ok { background: rgb(10 40 25 / .8); }
.project .thumb .badge.run { background: rgb(30 30 34 / .85); }
.project .thumb .name { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-size: 22px; font-weight: 800; text-shadow: 0 2px 10px rgb(0 0 0 / .5); }
.project .meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.mini-steps { display: flex; gap: 5px; }
.mini-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); }
.mini-steps span.done { background: var(--ok); }
.mini-steps span.now { background: var(--accent); }
.project .btn { width: 100%; }
.new-card { display: grid; place-items: center; min-height: 360px; border: 2px dashed var(--line); border-radius: 18px; color: var(--muted); font-weight: 700; font-size: 18px; transition: border-color .15s, color .15s; }
.new-card:hover { border-color: var(--accent); color: var(--accent); }
.new-card .plus { font-size: 44px; line-height: 1; margin-bottom: 8px; text-align: center; }
.empty { text-align: center; padding: 64px 24px; }
.empty .big-emoji { font-size: 54px; margin-bottom: 8px; }

/* ── ① 選素材：檔案瀏覽 ── */
.browser { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.browser-head { display: flex; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); flex-wrap: wrap; }
.browser-head .path { flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 15px; padding: 0 8px; }
.browser-note { border-radius: 0; border-width: 0 0 1px 0; }
.browser-list { max-height: 340px; overflow: auto; }
.entry { display: flex; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line-soft); font-size: 17px; }
.entry:last-child { border-bottom: 0; }
.entry:hover { background: var(--surface-2); }
.entry.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.entry .meta { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.picked { display: flex; gap: 18px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.picked video { width: 110px; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; flex: none; }

/* ── 進度視窗 ── */
.modal { position: fixed; inset: 0; background: rgb(0 0 0 / .6); display: grid; place-items: center; z-index: 40; padding: 20px; backdrop-filter: blur(4px); }
.modal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px; width: min(560px, 100%); box-shadow: var(--shadow); }
.modal-card h2 { font-size: 23px; }
.modal-card pre { max-height: 260px; overflow: auto; font-size: 13px; background: var(--bg); color: var(--ink-2); padding: 12px; border-radius: 10px; white-space: pre-wrap; }
.modal-card details summary { cursor: pointer; color: var(--muted); font-size: 15px; margin-top: 8px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 20px 0 6px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 3px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.spinner { width: 20px; height: 20px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 104px; left: 50%; transform: translateX(-50%); background: var(--surface-3); color: var(--ink); border: 1px solid var(--line); padding: 14px 20px; border-radius: 14px; z-index: 50; font-size: 16px; max-width: min(640px, 90vw); box-shadow: var(--shadow); }
.toast.error { background: #3a1717; border-color: var(--danger); color: #ffd6d6; }

/* ── ② 逐字稿 ── */
.split { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.side { position: sticky; top: 88px; }
.side video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 14px; background: #000; display: block; }
.tx-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tx-list { padding: 6px; }
.tx-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px; border-radius: 12px; }
.tx-row + .tx-row { border-top: 1px solid var(--line-soft); }
.tx-row.playing { background: var(--accent-soft); }
.tx-row .play { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; padding: 0; flex: none; }
.tx-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tx-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.tx-orig { font-size: 15px; color: var(--muted); }
.tx-main textarea { font-size: 19px; resize: none; overflow: hidden; background: transparent; border-color: transparent; padding: 8px 10px; margin: -4px -10px; width: calc(100% + 20px); }
.tx-main textarea:hover { border-color: var(--line); background: var(--bg); }
.tx-main textarea:focus { background: var(--bg); }
.tx-row.deleted textarea { text-decoration: line-through; opacity: .4; }
.tx-row.deleted .tx-meta, .tx-row.deleted .tx-orig { opacity: .4; }

/* ── ③ 重點與動畫 ── */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 17px; font-weight: 700; padding: 12px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { background: var(--surface-3); color: var(--ink-2); border-radius: 999px; font-size: 13px; padding: 1px 9px; }
.lines { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; max-height: 360px; overflow: auto; background: var(--bg); }
.line { padding: 10px 0; font-size: 18px; line-height: 1.7; user-select: text; cursor: text; }
.line + .line { border-top: 1px dashed var(--line-soft); }
.line .id { color: var(--muted); font-size: 13px; margin-right: 8px; user-select: none; }
.line .hl { font-weight: 800; border-radius: 4px; padding: 0 2px; }
.line .hl.s1 { color: var(--hl-1); background: rgb(255 128 0 / .12); }
.line .hl.s2, .line .hl.s3 { color: var(--hl-2); background: rgb(255 77 77 / .12); }
.item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); }
.item .word { font-weight: 800; font-size: 18px; }
.item .word.s1 { color: var(--hl-1); }
.item .word.s2, .item .word.s3 { color: var(--hl-2); }
.item select { width: auto; min-height: 40px; padding: 6px 36px 6px 12px; font-size: 15px; background-position: calc(100% - 18px) 17px, calc(100% - 12px) 17px; }
.item .reason { flex-basis: 100%; color: var(--muted); font-size: 14px; }
.anim .head { display: flex; align-items: center; gap: 10px; }
.anim .type { font-weight: 800; font-size: 18px; }
.anim-preview video { width: 100%; max-width: 240px; aspect-ratio: 9/16; border-radius: 12px; background: #3b3b3b; display: block; }
.sel-pop { position: absolute; z-index: 25; display: flex; gap: 6px; align-items: center; background: var(--surface-3); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.sel-pop .label { color: var(--muted); font-size: 14px; padding: 0 6px; }
.sel-pop .btn { min-height: 38px; font-size: 15px; padding: 0 12px; }
.md table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14px; }
.md th, .md td { border-bottom: 1px solid var(--line-soft); padding: 8px; text-align: left; vertical-align: top; }
.md th { color: var(--muted); font-weight: 600; }
.md h3 { margin-top: 16px; }

/* ── ④ 完成 ── */
.done-hero { text-align: center; padding: 36px 24px; background: radial-gradient(ellipse at top, var(--accent-soft), transparent 70%), var(--surface); }
.done-hero .big-emoji { font-size: 60px; }
.done-hero h1 { margin-top: 8px; }
.done-hero .project-name { display: inline-block; margin-top: 14px; padding: 8px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 800; font-size: 19px; }
.check-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }

@media (max-width: 860px) {
  main { padding: 20px 16px 140px; }
  .topbar { padding: 0 16px; }
  .actionbar .inner { padding: 12px 16px; }
  .split { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
  .side .card { display: flex; gap: 14px; align-items: center; padding: 14px; }
  .side video { width: 96px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 > :first-child { grid-column: 1 / -1; }
  .stepper .label { display: none; }
  .stepper .step.now .label { display: inline; }
  h1 { font-size: 25px; }
}

/* ③ 左影片、右分頁籤 */
.split.left { grid-template-columns: 300px 1fr; }
.split.left .side { order: -1; }
@media (max-width: 860px) { .split.left { grid-template-columns: 1fr; } }

/* 🔊 音效庫 */
.sfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.sfx-card { padding: 18px; }
.sfx-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; }
.sfx-row + .sfx-row { border-top: 1px solid var(--line-soft); }
.sfx-row.playing { background: var(--accent-soft); }
.sfx-row.chosen { box-shadow: inset 3px 0 0 var(--accent); }
.sfx-row .play { width: 42px; height: 42px; min-height: 42px; border-radius: 50%; padding: 0; flex: none; }
.sfx-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src { font-weight: 700; }
.src-mixkit { color: #7cc4ff; }
.src-capcut { color: var(--ink-2); }
.src-合成 { color: var(--ok); }
.pick { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.pick:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); }
.sfx-pick { flex-basis: 100%; display: flex; align-items: center; gap: 8px; }
.sfx-pick select { flex: 1; min-width: 0; }
.defaults { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px 24px; }
.def-row { display: flex; align-items: center; gap: 10px; }
.def-name { width: 140px; flex: none; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.def-row select { flex: 1; min-width: 0; min-height: 44px; padding-top: 8px; padding-bottom: 8px; background-position: calc(100% - 20px) 19px, calc(100% - 14px) 19px; }
.anim-result { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.anim-result video { width: 100%; aspect-ratio: 9/16; border-radius: 12px; background: #000; display: block; }
@media (max-width: 860px) { .anim-result { grid-template-columns: 1fr; } .anim-result video { max-width: 240px; } }

/* 補畫面 */
.br-item { display: flex; flex-direction: column; gap: 12px; }
.br-item input[type=text] { min-height: 40px; padding: 6px 12px; font-size: 15px; }
.br-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.br-result { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 9/16; background: #000; cursor: pointer; }
.br-result:hover { border-color: var(--accent); }
.br-result img, .br-result video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.br-result .dur { position: absolute; right: 6px; bottom: 6px; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgb(0 0 0 / .65); color: #fff; }
.br-chosen { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.br-chosen video { width: 100%; aspect-ratio: 9/16; border-radius: 10px; background: #000; display: block; }

/* ── 大眾版 ── */
.upload { display: block; cursor: pointer; border: 2px dashed var(--line); transition: border-color .15s, background .15s; }
.upload:hover, .upload.over { border-color: var(--accent); background: var(--accent-soft); }
.up-progress { max-width: 420px; margin: 18px auto 0; }
.progress.solid span { animation: none; width: 0; transition: width .4s; }
.privacy { margin-top: 20px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink-2); }
.privacy h3 { font-size: 16px; margin-bottom: 6px; }
.privacy ul { margin: 0; padding-left: 20px; }
.mine-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.mine-row:hover { border-color: var(--accent-line); }
.wait { max-width: 560px; }
.wait .progress { margin: 18px 0 10px; }
.tx-row { align-items: center; }
.tx-time { flex: none; min-width: 74px; font-variant-numeric: tabular-nums; }
.tx-del { flex: none; }
.slider { display: flex; align-items: center; gap: 14px; margin-top: 20px; font-weight: 700; color: var(--ink-2); }
.slider input { flex: 1; accent-color: var(--accent); height: 28px; }
.slider b { width: 54px; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.music-choice .play { min-height: 40px; width: 40px; flex: none; }
.music-choice:has(input:checked)::after { content: none; }
.play.playing { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.def-row .play { min-height: 44px; width: 44px; flex: none; }
.done-hero video.result { display: block; width: min(320px, 100%); aspect-ratio: 9/16; margin: 22px auto 0; border-radius: 16px; background: #000; }
@media (max-width: 860px) {
  .defaults { grid-template-columns: 1fr; }
  .def-name { width: 96px; }
  .tx-row { flex-wrap: wrap; }
  .tx-main { flex-basis: calc(100% - 100px); }
  .actionbar .btn.big { min-height: 52px; padding: 0 20px; font-size: 17px; }
  .actionbar .status { display: none; }
}
@media (max-width: 520px) {
  .stepper .bar { margin: 0 6px; min-width: 10px; }
  .stepper .dot { width: 30px; height: 30px; }
  .stepper .step { gap: 6px; font-size: 15px; }
}

/* 意見回饋 */
.report-link { margin-left: auto; font-size: 15px; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.report-link:hover { color: var(--accent); border-color: var(--accent-line); }
.feedback { margin-top: 20px; max-width: 640px; }
.feedback textarea { width: 100%; resize: vertical; }
.stars { display: flex; gap: 6px; margin-bottom: 12px; }
.star { font-size: 30px; line-height: 1; background: none; border: 0; color: var(--surface-3); cursor: pointer; padding: 2px; }
.star.on { color: var(--accent); }
.thanks { font-size: 18px; font-weight: 700; padding: 10px 0; }
.done-hero + .feedback { margin-left: auto; margin-right: auto; }
.brand { white-space: nowrap; }
@media (max-width: 520px) {
  .topbar { gap: 10px; }
  #crumbs { display: none; }
  .report-link { font-size: 14px; padding: 6px 10px; }
}

/* 上傳自己的素材 */
.rights { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.rights li + li { margin-top: 6px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; padding: 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.agree input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.modal-card input[type=file] { width: 100%; font-size: 15px; }
.modal-card { max-height: 90vh; overflow: auto; }
.rights-box summary { cursor: pointer; padding: 6px 0; }
.music-choice .swap { min-height: 36px; }

/* 自己加字卡 */
.card-form input[type=text], .card-form textarea, .card-form select { width: 100%; }
.card-form .seg { flex-wrap: wrap; }
.item.row { align-items: center; }

/* 配樂分類 */
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat { border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.cat:hover { border-color: var(--muted); }
.cat.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ✨ 動畫範本 */
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 12px; padding: 8px; cursor: pointer; font: inherit; }
.tpl:hover { border-color: var(--accent); }
.tpl img { width: 100%; aspect-ratio: 9/10; object-fit: cover; object-position: top; border-radius: 8px; background: #3b3b3b; }
.tpl b { font-size: 15px; }
.tpl .small { font-size: 12.5px; line-height: 1.4; }
.tpl-cat { grid-column: 1 / -1; font-weight: 800; color: var(--accent); margin: 8px 0 0; }
.tpl-big { width: 120px; aspect-ratio: 9/10; object-fit: cover; object-position: top; border-radius: 10px; background: #3b3b3b; flex: none; }

/* 片頭和結尾 */
.styles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.style-choice .thumbs { display: flex; gap: 6px; margin-bottom: 10px; }
.style-choice .thumbs img { width: 50%; aspect-ratio: 9/10; object-fit: cover; border-radius: 8px; background: #3b3b3b; }
.io-box { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.io-box input[type=text] { width: 100%; }
.io-box input:disabled { opacity: .4; }
.av-row img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none; }

/* 使用規範 */
.consent { margin-top: 16px; }
.consent a, .legal a, .foot a { color: var(--accent); text-decoration: underline; }
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin-top: 18px; }
.legal ul { margin: 6px 0 0; padding-left: 22px; color: var(--ink-2); }
.legal p { color: var(--ink-2); }
.foot { max-width: 1120px; margin: -110px auto 0; padding: 0 28px 130px; color: var(--muted); font-size: 14px; text-align: center; }

/* 一鍵方案、進階設定 */
.presets { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.estimate { margin-top: 14px; color: var(--ink-2); }
.advanced > summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); list-style: none; }
.advanced > summary::before { content: '▸ '; color: var(--accent); }
.advanced[open] > summary::before { content: '▾ '; }
#land .seg button.on, #cutmode button.on, #fxmode button.on, #pos button.on { background: var(--accent); color: var(--accent-ink); }

/* 選重點 */
.hl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tx-text { font-size: 19px; line-height: 1.8; padding: 4px 0; user-select: text; -webkit-user-select: text; cursor: text; }
.tx-edit { flex: none; }
mark.hl { background: transparent; color: var(--hl-1); font-weight: 900; border-radius: 6px; padding: 1px 3px; cursor: pointer; border-bottom: 2px solid currentColor; }
mark.hl.s2 { color: var(--hl-2); }
mark.hl.e-螢光筆 { background: #FFE14D; color: #1d1206; border-bottom-color: transparent; }
mark.hl.e-發光 { color: #fff; -webkit-text-stroke: 1px currentColor; text-shadow: 0 0 6px var(--hl-1); }
mark.hl.e-彈跳 { display: inline-block; transform: translateY(-3px); }
mark.hl.e-逐字出現 { border-bottom-style: dashed; }
.sel-pop { position: absolute; z-index: 30; }
.hl-edit { position: absolute; z-index: 31; width: min(330px, calc(100vw - 16px)); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); border-color: var(--line); }
.hl-edit .seg { flex-wrap: wrap; }
.hl-edit .seg button.on { background: var(--accent); color: var(--accent-ink); }
.hl-how { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); }
