/* CapCut 式外觀（2026-10-16）：數值取自 capcut.com 工作區 CSS（lv-workspace／lvv 設計變數）。
   字型：CapCut Sans Text 唔公開 → 用佢自己嘅後備 Inter，中文用蘋方／思源黑體；大標題旁嘅斜體用 Source Serif 4（同 CapCut 一樣）。
   顏色：中性色全部跟 CapCut；重點色用 852Gen LOGO 紅色（2026-10-21 由綠色改），成功狀態用 --ok 綠色。 */
:root {
  --font: "Inter", "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --bg: #fff;                 /* fill-bg-1 */
  --surface: #fff;
  --fill-2: #f2f5f7;          /* fill-bg-2：輸入框、次要底 */
  --fill-3: #eff3f5;          /* fill-bg-3：hover */
  --fill-sel: #33668014;      /* fill-transparency-block：已選項目 */
  --fg: #16161d;              /* text-primary */
  --fg-2: #111a2cb3;          /* text-secondary */
  --muted: #15293c80;         /* text-tertiary */
  --line: #00000014;          /* line-2 */
  --line-1: #00000029;        /* line-1 */
  --line-3: #0000000a;        /* line-3 */
  --accent: #D3121B;          /* LOGO 紅 */
  --accent-fg: #fff;
  --accent-soft: #d3121b14;   /* 淡紅 */
  --accent-grad: linear-gradient(112deg, #b00a12 3.71%, #ef2b2b 36.34%, #c90f17 96.02%);
  --ok: #0B7A4B; --ok-soft: #0b7a4b14;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11; --surface: #0e0e11; --fill-2: #1c1d21; --fill-3: #25262b; --fill-sel: #e5ecff1a;
    --fg: #fafbff; --fg-2: #f6f7ffb3; --muted: #edf0fd80; --line: #ffffff1f; --line-1: #fff3; --line-3: #ffffff0f;
    --accent: #FF4D52; --accent-fg: #1A0507; --accent-soft: #ff4d521f;
    --accent-grad: linear-gradient(112deg, #d81e26 3.71%, #ff5a5f 36.34%, #e0262e 96.02%);
    --ok: #5CC495; --ok-soft: #5cc4951f;
  }
}

/* ---------- 字型、字級 ---------- */
body { font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 700; letter-spacing: .01em; }
.page-title { font-size: 24px; line-height: 32px; font-weight: 700; }
.sub, .section-head h2, .home-sec h2 { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: .015em; margin-top: 0; }
.lede, p.muted { font-size: 14px; line-height: 20px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; line-height: 16px; }
.eyebrow { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: .01em; color: var(--fg); }
a { color: var(--accent); }

/* ---------- 版面：標題列 72px、內容白底 ---------- */
body.app .app-top { min-height: 72px; padding: 0 32px; border-bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); }
body.app main.wrap { padding-inline: 48px; max-width: 1280px; }
body.app main.wrap.wide { max-width: 1440px; }
.page { padding-block: 8px 0; gap: 16px; }

/* ---------- 側欄（lv-workspace-side-menu） ---------- */
:root { --side-w: 240px; }
body.app .side { padding: 0 16px 16px; gap: 0; background: var(--bg); border-right: 1px solid var(--line); scrollbar-width: none; }
body.app .side::-webkit-scrollbar { display: none; }
.side-brand { min-height: 72px; padding: 0 16px; font-size: 16px; font-weight: 700; }
.side-new { height: 40px; padding: 0 16px; margin-bottom: 16px; border-radius: var(--r-s); background: var(--accent-grad); color: #fff;
  font-size: 14px; font-weight: 800; line-height: 20px; justify-content: flex-start; gap: 10px; box-shadow: 0 0 12px #04040405; }
.side-new:hover { filter: none; background: var(--accent-grad); opacity: .92; }
.side-nav { gap: 0; }
.side-group { padding: 4px 16px; margin-top: 12px; font-size: 14px; font-weight: 700; line-height: 22px; letter-spacing: 0; color: var(--muted); }
.side-link { gap: 10px; padding: 9px 8px 9px 16px; margin-bottom: 2px; border-radius: var(--r-s); font-size: 16px; font-weight: 500; line-height: 22px; color: var(--fg-2); }
.side-link .ic { width: 22px; height: 22px; color: currentColor; }
.side-link:hover { background: var(--fill-3); color: var(--fg); }
.side-link.on { background: var(--fill-sel); color: var(--fg); font-weight: 600; }
.side-link.on .ic { color: var(--fg); }
.side-foot { border-top: 0; padding-top: 0; gap: 0; }
.side-foot::before { content: ""; display: block; border-top: 1px solid var(--line-3); margin: 20px 0 16px; }
.side-token { padding: 9px 8px 9px 16px; border-radius: var(--r-s); background: var(--fill-2); color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.avatar { width: 32px; height: 32px; background: var(--fill-2); color: var(--fg); font-size: 14px; }
.credits { background: var(--fill-2); color: var(--fg); border-radius: var(--r-s); padding: 6px 12px; font-weight: 600; font-size: 13px; }
@media (max-width: 1180px) and (min-width: 761px) {
  :root { --side-w: 72px; }
  body.app .side { padding: 0 14px 14px; }
  .side-brand { padding: 0; justify-content: center; }
  .side-new { width: 44px; padding: 0; justify-content: center; }
  .side-link, .side-token { width: 44px; padding: 9px 11px; flex-direction: row; font-size: 0; gap: 0; }
  .side-link span, .side-token span { display: none; }
  .side-foot::before { margin: 14px auto 16px; width: 22px; }
}
@media (max-width: 760px) {
  body.app .side { width: 280px; }
  body.app .app-top { min-height: 56px; padding: 0 16px; }
  body.app main.wrap { padding-inline: 16px; }
}

/* ---------- 按鈕（lv-button：高 36、圓角 8、14px） ---------- */
.btn { height: 36px; padding: 0 16px; border-radius: var(--r-s); border: 0; background: var(--fill-2); color: var(--fg); font-size: 14px; font-weight: 600; line-height: 20px; }
.btn:hover { background: var(--fill-3); }
.btn.primary { background: var(--fg); color: var(--bg); border: 0; }
.btn.primary:hover { background: color-mix(in srgb, var(--fg) 85%, var(--bg)); }
.btn.small { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.btn.danger, .link.danger { color: var(--danger); }
.side-new, .home-send { } /* 主要「建立」動作用紅色漸變，其他主要按鈕用黑色（同 CapCut 一樣） */

/* ---------- 輸入（lv-input：fill-bg-2 底、無邊、圓角 8、14px） ---------- */
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], input[type=number], input[type=date], input:not([type]), textarea, select {
  background: var(--fill-2); border: 1px solid transparent; border-radius: var(--r-s); font-size: 14px; line-height: 22px; color: var(--fg); padding: 7px 12px; }
select { height: 36px; padding: 0 12px; }
input:hover, textarea:hover, select:hover { background: var(--fill-3); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--accent); background: var(--bg); }
textarea { line-height: 22px; font-size: 15px; }
.field { gap: 8px; }
.field label, legend { font-size: 14px; font-weight: 600; line-height: 20px; color: var(--fg); letter-spacing: 0; }
.field small, fieldset small { color: var(--muted); }

/* ---------- 面板、卡片（圓角 16、0.5px line-1） ---------- */
.panel { border-radius: var(--r-l); border: .5px solid var(--line-1); padding: 24px; background: var(--bg); }
.card, .ratio-card, .size-card, .layer-card, .style-card span { border-radius: var(--r-m); border: 1px solid var(--line); background: var(--bg); }
.card:hover { background: var(--fill-3); }
.card:has(input:checked), .ratio-card:has(input:checked) { border-color: var(--fg); background: var(--fill-sel); box-shadow: inset 0 0 0 1px var(--fg); }
.card b { font-size: 14px; font-weight: 600; }
.card small { font-size: 12px; color: var(--muted); }
.row-card { border-radius: var(--r-m); border: .5px solid var(--line-1); }
.row-card:hover, a.proj-card:hover { border-color: var(--line-1); box-shadow: 0 4px 12px #0000000d; }
.job { border-radius: var(--r-l); border: .5px solid var(--line-1); }
.drop { border: 1px dashed var(--line-1); border-radius: var(--r-l); background: var(--fill-2); padding: 40px 16px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-main { font-size: 16px; font-weight: 600; }
.drop-sub { font-size: 12px; color: var(--muted); }
.drop-icon { border-color: var(--fg); }
.drop-icon::after { border-left-color: var(--fg); }
.toggle span { background: var(--line-1); }
.toggle input:checked + span { background: var(--fg); }
details.adv { border-radius: var(--r-l); border: .5px solid var(--line-1); padding: 12px 16px; }
details summary { color: var(--fg); font-weight: 600; }
.hint { border-radius: var(--r-s); font-size: 13px; }
.chip, .help-link { border-radius: 6px; border: 0; background: var(--fill-2); color: var(--fg-2); font-size: 12px; font-weight: 500; padding: 2px 8px; }
.pill { border-radius: 6px; font-size: 12px; font-weight: 600; }
.ws-main-empty { border: 1px dashed var(--line-1); border-radius: var(--r-l); background: var(--fill-2); color: var(--muted); }

/* 分類膠囊（categoryItem）：淡灰底、圓角 8、14px 500；已選：淡綠底、600 */
.chat-chip, .prompt-examples .chat-chip, .home-tools span, .toggle-chip span {
  height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: var(--r-s); background: var(--fill-sel);
  color: var(--fg-2); font-size: 14px; font-weight: 500; line-height: 20px; }
.chat-chip:hover, .home-tools span:hover { background: var(--fill-3); }
.home-tools input:checked + span, .toggle-chip input:checked + span { background: var(--accent-soft); color: var(--fg); font-weight: 600; border: 0; box-shadow: none; }
.plan-tags li { border-radius: 6px; background: var(--accent-soft); color: var(--fg); font-weight: 600; font-size: 12px; padding: 2px 8px; }
.plan-out { border: 0; border-radius: var(--r-m); background: var(--fill-2); }

/* ---------- 首頁（content assistant home） ---------- */
.home-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 0 16px; background: none; border: 0; border-radius: 0; text-align: center; }
.home-eyebrow { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: .01em; color: var(--fg); }
.home-hero .page-title { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: .01em; margin: 6px 0 24px; }
.home-ask { width: min(720px, 100%); padding: 20px 12px 12px; gap: 12px; border-radius: var(--r-xl); border: 1px solid #fff; background: #f9fcffe0;
  backdrop-filter: blur(20px); box-shadow: 0 1px 4px rgba(0, 0, 0, .059), 0 50px 250px rgba(58, 81, 108, .08); text-align: left; }
.home-ask:focus-within { border-color: #fff; }
.home-ask textarea { background: none; border: 0; padding: 0 8px; min-height: 48px; font-size: 15px; line-height: 22px; resize: none; }
.home-ask textarea:hover, .home-ask textarea:focus { background: none; border: 0; }
.home-tools span { height: 40px; border-radius: 24px; background: none; padding: 0 12px; }
.home-tools span:hover { background: #2e4a660f; }
.home-tools input:checked + span { background: var(--accent-soft); color: var(--accent); }
.home-send { width: 40px; height: 40px; padding: 0; border-radius: 32px; background: var(--fg); color: var(--bg); }
.home-send:hover { background: var(--fg); opacity: .85; }
@media (prefers-color-scheme: dark) { .home-ask { background: #25262bb3; border-color: #ffffff0a; box-shadow: 0 10px 24px 0 #3a516c0d; } }
.home-sec { gap: 12px; margin-top: 32px; }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tool-tile { border: .5px solid var(--line-1); border-radius: var(--r-l); padding: 12px; gap: 2px; background: var(--bg); }
.tool-tile:hover { transform: none; border-color: var(--line-1); box-shadow: 0 4px 12px #0000000d; }
.tool-tile b { font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: .0067em; }
.tool-tile small { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.tool-ic { width: 40px; height: 40px; border-radius: var(--r-s); background: var(--fill-2); color: var(--fg); margin-bottom: 8px; }
.proj-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.proj-card { border: .5px solid var(--line-1); border-radius: var(--r-l); padding: 4px 4px 12px; gap: 2px; }
.proj-card > b, .proj-card > span, .proj-new summary > b { padding: 0 8px; }
.proj-card > b, .proj-new summary > b { font-size: 14px; font-weight: 500; line-height: 1.3; }
.proj-card .small { font-size: 12px; font-weight: 500; color: var(--muted); }
.proj-thumb { border-radius: 12px; aspect-ratio: 16 / 9; margin-bottom: 8px; background: var(--fill-2); color: var(--fg-2); font-size: 24px; }
.proj-thumb-1, .proj-thumb-2, .proj-thumb-3 { background: var(--fill-2); }
.proj-new .proj-thumb { border: 1px dashed var(--line-1); background: var(--fill-2); }
@media (max-width: 760px) {
  .home-hero { padding-top: 16px; }
  .home-hero .page-title { font-size: 28px; line-height: 34px; margin-bottom: 16px; }
  .tool-grid, .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 頁尾 */
body.app .footer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line-3); margin-top: 48px; padding-block: 24px; }
.home-ask-row { flex-wrap: nowrap; align-items: flex-end; }
.home-ask-row .home-send { width: 40px; flex: none; }
.home-tools { flex-wrap: wrap; gap: 4px; }
body.app .side > *, .side-nav > *, .side-foot > * { flex-shrink: 0; }
/* 斜體襯線字只用喺英文；中文唔好人工打斜 */
.home-eyebrow, .eyebrow { font-synthesis: none; }

/* ================= 首頁排版（跟 CapCut my-edit：container／creation-form／section／card） ================= */
.cc-hero { display: flex; flex-direction: column; align-items: center; margin: 40px 0 16px; gap: 24px; width: 100%; }
.cc-hero-text { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 68px; text-align: center; }
.cc-eyebrow { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: .01em; color: var(--fg); font-synthesis: none; }
.cc-hero-title { font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: .01em; margin-top: 6px; color: var(--fg); }
.cc-form { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.cc-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--line-1); border-radius: 40px; }
.cc-tabs label { position: relative; }
.cc-tabs input { position: absolute; opacity: 0; }
.cc-tabs span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 10px; border-radius: 40px; color: var(--fg-2); font-size: 14px; font-weight: 500; line-height: 18px; cursor: pointer; }
.cc-tabs input:checked + span { background: var(--fill-sel); color: var(--fg); }
.cc-tabs input:focus-visible + span { box-shadow: 0 0 0 2px var(--accent) inset; }
.cc-input { width: min(720px, 100%); display: flex; flex-direction: column; padding: 20px 12px 12px; border-radius: 24px; border: 1px solid #fff; background: #f9fcffe0;
  backdrop-filter: blur(20px); box-shadow: 0 1px 4px rgba(0, 0, 0, .059), 0 50px 250px rgba(58, 81, 108, .08); }
.cc-input textarea, .cc-input textarea:hover, .cc-input textarea:focus { background: none; border: 0; padding: 0 8px; min-height: 48px; font-size: 15px; line-height: 22px; resize: none; outline: 0; }
.cc-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.cc-actions { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cc-round { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 24px; color: var(--fg); }
.cc-round:hover { background: #2e4a660f; }
.cc-send { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 32px; background: var(--fg); color: var(--bg); cursor: pointer; }
.cc-send:hover { opacity: .85; }
@media (prefers-color-scheme: dark) { .cc-input { background: #25262bb3; border-color: #ffffff0a; box-shadow: 0 10px 24px 0 #3a516c0d; } .cc-round:hover { background: #e5ecff1a; } }

.cc-sec { display: flex; flex-direction: column; margin-top: 32px; min-width: 0; }
.cc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cc-title { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: .015em; color: var(--fg); }
.cc-all { display: flex; align-items: center; gap: 4px; color: var(--fg-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.cc-all:hover { opacity: .8; }
.cc-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 48px), transparent); }
.cc-row::-webkit-scrollbar { display: none; }
.cc-row > * { scroll-snap-align: start; }
.cc-row > :last-child { margin-right: 40px; }
.cc-card { flex: none; display: flex; flex-direction: column; justify-content: flex-end; width: 202px; height: 176px; padding: 4px 4px 0; box-sizing: border-box;
  border: .5px solid var(--line-1); border-radius: 16px; color: var(--fg); text-decoration: none; transition: box-shadow .2s; }
.cc-card:hover { box-shadow: 0 4px 12px #0000000d; }
.cc-card-img { display: grid; place-items: center; width: 100%; height: 112px; border-radius: 12px; color: var(--fg); }
.cc-card-img .ic { stroke-width: 1.4; }
.cc-tone-0 { background: linear-gradient(135deg, #dff3e9, #c4e8d6); }
.cc-tone-1 { background: linear-gradient(135deg, #e3eefb, #cddff5); }
.cc-tone-2 { background: linear-gradient(135deg, #f6e9dc, #f0d8c0); }
.cc-tone-3 { background: linear-gradient(135deg, #ece5f8, #dccff2); }
.cc-tone-4 { background: linear-gradient(135deg, #f8e2ea, #f1cbd8); }
.cc-tone-5 { background: linear-gradient(135deg, #e6f2f4, #cde5ea); }
@media (prefers-color-scheme: dark) {
  .cc-tone-0 { background: linear-gradient(135deg, #17352a, #1d4535); } .cc-tone-1 { background: linear-gradient(135deg, #182638, #1f3350); }
  .cc-tone-2 { background: linear-gradient(135deg, #36281b, #4a3522); } .cc-tone-3 { background: linear-gradient(135deg, #271f3a, #33284d); }
  .cc-tone-4 { background: linear-gradient(135deg, #3a1f29, #4d2836); } .cc-tone-5 { background: linear-gradient(135deg, #18303a, #1f3e4a); }
}
.cc-card-body { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 60px; padding: 12px 8px; box-sizing: border-box; min-width: 0; }
.cc-card-title { font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: .0067em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-card-foot { position: relative; height: 18px; }
.cc-card-desc, .cc-card-try { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: .0134em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s, transform .2s; }
.cc-card-desc { display: block; color: var(--muted); }
.cc-card-try { color: var(--accent); opacity: 0; transform: translateY(2px); }
.cc-card:hover .cc-card-desc { opacity: 0; transform: translateY(-2px); }
.cc-card:hover .cc-card-try { opacity: 1; transform: none; }
.cc-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(202px, 1fr)); }
.cc-grid .cc-card { width: auto; }
.cc-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.cc-chips::-webkit-scrollbar { display: none; }
.cc-chip { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--fill-sel);
  color: var(--fg-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.cc-chip:hover { background: var(--fill-3); }
.cc-chip.on { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
.proj-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
@media (max-width: 760px) {
  .cc-hero { margin-top: 16px; }
  .cc-hero-title { font-size: 28px; line-height: 34px; }
  .cc-tabs span { padding: 10px 8px; gap: 4px; }
  .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 側欄分隔線、組別標題（lv-divider：上 20 下 16；subtitle 12px 700） */
.side-div { border: 0; border-top: 1px solid var(--line-3); margin: 20px 0 16px; }
.side-group { margin-top: 0; display: flex; align-items: center; gap: 6px; }
.side-group .ic { width: 14px; height: 14px; }
@media (max-width: 1180px) and (min-width: 761px) { .side-div { margin: 14px auto 16px; width: 22px; } }
.chat-chip, .prompt-examples .chat-chip { height: auto; min-height: 32px; padding: 6px 12px; text-align: left; }

/* 生成頁分頁＋影片編輯 */
/* 生成頁：加素材（圖片／影片）掣 */
.gen-adds { display: flex; flex-wrap: wrap; gap: 8px; }
.gen-add { position: relative; cursor: pointer; }
.gen-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.gen-add:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.gen-add.is-off { opacity: .5; cursor: not-allowed; }
.gen-picked { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.gen-picked img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.gen-picked[hidden] { display: none; }
.gen-video { display: grid; gap: 10px; }
.gen-video[hidden] { display: none; }
.ed-preview { width: 100%; max-height: 260px; border-radius: 12px; background: #000; }
.ed-refs { display: grid; gap: 10px; }
.ed-ref { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 10px; border: .5px solid var(--line-1); border-radius: 12px; }
.ed-ref img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--fill-2); }
.ed-ref img[hidden] { display: block !important; visibility: hidden; }
.ed-ref-fields { display: grid; gap: 6px; min-width: 0; }
.ed-ref-head { display: flex; justify-content: space-between; align-items: center; }
.top-pad { align-self: end; padding-bottom: 8px; }

/* 側欄：製作流程步驟（1 構思 → 2 拍攝 → 3 生成 → 4 剪接 → 5 後期 → 6 交付） */
.side-nav .side-group { margin-top: 10px; padding-top: 2px; padding-bottom: 2px; }
.side-step { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; }
@media (max-width: 1180px) and (min-width: 761px) { .side-nav .side-group + .side-link { margin-top: 10px; } }

/* 關鍵字落地頁（使用場景） */
.crumbs { margin-bottom: 6px; }
.crumbs a { color: inherit; }
.guide-steps { list-style: none; counter-reset: gs; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.guide-steps li { counter-increment: gs; display: grid; align-content: start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-1); border-radius: 12px; }
.guide-steps li::before { content: counter(gs); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.guide-points { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.guide-points .panel { margin: 0; }
.guide-points p { margin: 4px 0 0; }
.guide-faq details { border-bottom: 1px solid var(--line-1); padding: 12px 0; }
.guide-faq summary { cursor: pointer; font-weight: 600; }
.guide-faq p { margin: 8px 0 0; color: var(--fg-2); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0; }
.guide-cta .btn { margin-left: auto; }

/* 教學文章 */
.post { max-width: 760px; }
.post-body { font-size: 16px; line-height: 1.8; }
.post-body h2 { font-size: 22px; margin: 32px 0 8px; }
.post-body h3 { font-size: 18px; margin: 24px 0 6px; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 14px; }
.post-body li { margin: 4px 0; }
.post-body blockquote { margin: 16px 0; padding: 8px 16px; border-left: 3px solid var(--accent); color: var(--fg-2); background: var(--fill-2); border-radius: 0 8px 8px 0; }
.post-body a { color: var(--accent); }
.post-form textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.6; }

/* 「講你想要咩」：AI 理解咗嘅設定 */
.ud-out { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.ud-out b { font-weight: 600; font-size: 13px; }
.ud-chip { padding: 3px 10px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 18px; }
.ud-out small { width: 100%; }
.prompt-box[data-understand] { margin-bottom: 18px; }
.prompt-box[data-understand] > small.muted { display: block; margin-top: 6px; }

/* 生成頁「AI 導演」：追問（按鈕作答）→ 確認卡 */
.director { margin: 4px 0 14px; }
.dir-card { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.dir-head { margin: 0; font-weight: 600; }
.dir-q { margin: 6px 0 0; font-size: 14px; }
.dir-summary { margin: 0; font-size: 15px; line-height: 1.5; }
.dir-card .chat-chip.on { background: var(--accent); color: var(--accent-fg, #fff); }
.dir-card .dir-other { max-width: 320px; }
.dir-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.dir-opts .field { flex: 1 1 140px; max-width: 220px; }
.dir-card .field { margin: 0; }
.dir-card .submit-row { margin: 4px 0 0; }
.dir-wait { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--fill-3); color: var(--muted); }
.dir-wait { animation: dir-pulse 1.4s ease-in-out infinite; }
@keyframes dir-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .dir-wait { animation: none; } }
.dir-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* 首頁帶路：例子膠囊＋AI 追問／建議卡（同輸入框一樣闊） */
.cc-examples { justify-content: center; width: min(720px, 100%); margin-top: -12px; }
.cc-guide { width: min(720px, 100%); margin: -12px 0 0; text-align: left; }
.cc-guide .chat-chips a.chat-chip { text-decoration: none; }

/* LOGO：只用圖案（同 CapCut 一樣簡約），透明背景；淺色網頁用深色版（白色部分轉深色），深色網頁用原色 */
.brand-logo { display: block; height: 32px; width: auto; }
/* Logo 深淺色用 <picture> 揀（只下載一張） */
.side-brand .brand-logo { height: 36px; }
@media (max-width: 1180px) and (min-width: 761px) { .side-brand .brand-logo { width: 54px; height: auto; } }
/* 日文介面：漢字用日文字形（唔用中文字體） */
:lang(ja) { font-family: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif; }

/* 登入後首頁工具卡：大圖 */
.cc-grid-lg { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cc-grid-lg .cc-card { height: auto; }
.cc-grid-lg .cc-card-img { height: 180px; }
.cc-grid-lg .cc-card-img svg { width: 72px; height: 72px; }
.cc-grid-lg .cc-card-body { height: auto; gap: 4px; padding: 12px 10px 14px; }
.cc-grid-lg .cc-card-title { font-size: 19px; font-weight: 600; }
.cc-grid-lg .cc-card-foot { height: 22px; }
.cc-grid-lg .cc-card-desc, .cc-grid-lg .cc-card-try { font-size: 14px; }
@media (max-width: 760px) {
  .cc-grid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cc-sec .cc-grid-lg .cc-card-img { height: 120px; }
  .cc-grid-lg .cc-card-img svg { width: 52px; height: 52px; }
  .cc-grid-lg .cc-card-title { font-size: 17px; }
  .cc-grid-lg .cc-card-desc, .cc-grid-lg .cc-card-try { font-size: 13px; }
}
/* 新專案打開時唔使大格空白 */
.proj-new[open] .proj-thumb { aspect-ratio: auto; height: 64px; }

/* 觸控裝置：文字掣、教學標籤至少 24px 高，方便手指撳中（WCAG 2.2 目標尺寸）；桌面不變 */
@media (pointer: coarse) { button.link { padding: 5px 0; } .help-link { padding: 4px 10px; } }
