/* =====================================================
   格式工坊 · 勒佩科技 —— 深藏蓝 × 鎏金（与 lepei.xin 统一）
   ===================================================== */
:root {
  --bg: #0c1226;
  --bg-2: #101736;
  --bg-3: #141b3f;
  --card: rgba(255, 255, 255, 0.045);
  --card-brd: rgba(255, 255, 255, 0.09);
  --gold: #d9b15c;
  --gold-2: #f2d492;
  --gold-grad: linear-gradient(120deg, #f2d492, #d9b15c 45%, #b98a35);
  --red: #c25450;
  --txt: #eef1fa;
  --txt-2: #a9b2cf;
  --txt-3: #6e7898;
  --tb-font: "Jomolhari", "Noto Serif Tibetan", "Microsoft Himalaya", serif;
  --serif: "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.tb { font-family: var(--tb-font); }

/* ---------- 背景装饰 ---------- */
.bg-deco { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.orb-1 { width: 520px; height: 520px; background: #22348a; top: -160px; left: -120px; animation: drift 18s ease-in-out infinite alternate; }
.orb-2 { width: 460px; height: 460px; background: #6e4a12; top: 30%; right: -160px; animation: drift 22s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 420px; height: 420px; background: #7a1f1f; bottom: -140px; left: 24%; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
.pattern-layer {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: radial-gradient(circle at 50% 50%, var(--gold) 1.2px, transparent 1.2px);
  background-size: 34px 34px;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 15, 33, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.nav-inner {
  width: min(1280px, 94vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.brand-txt strong { display: block; font-size: 18.5px; letter-spacing: 2px; }
.brand-txt em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 4px; color: var(--gold); }
.menu { display: flex; align-items: center; gap: 4px; }
.menu-link {
  padding: 8px 13px; border-radius: 10px; font-size: 14.5px;
  color: var(--txt-2); transition: color 0.25s, background 0.25s;
}
.menu-link:hover, .menu-link.active { color: var(--gold-2); background: rgba(217, 177, 92, 0.1); }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--txt); margin: 5px 0; border-radius: 2px; transition: 0.3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px; font-size: 15px;
  border: 0; cursor: pointer; transition: 0.3s; white-space: nowrap;
}
.btn-primary { background: var(--gold-grad); color: #241a05; font-weight: 700; box-shadow: 0 8px 26px rgba(217, 177, 92, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(217, 177, 92, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--txt); border: 1px solid var(--card-brd); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(217, 177, 92, 0.08); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-ghost {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--card-brd); color: var(--txt-2);
  display: grid; place-items: center; transition: 0.25s;
}
.icon-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.grad { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 页头 ---------- */
.tool-page { width: min(1180px, 92vw); margin: 0 auto; padding: 128px 0 90px; }
.tool-head { text-align: center; margin-bottom: 38px; }
.tool-head h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 48px); font-weight: 900; letter-spacing: 2px; line-height: 1.3;
}
.tool-head .tb-dim { font-family: var(--tb-font); font-size: 17px; color: var(--gold); margin-top: 6px; }
.tool-sub { color: var(--txt-2); margin-top: 12px; font-size: 15px; }

/* ---------- 主面板 ---------- */
.tool-shell {
  background: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* 分类标签 */
.cat-bar { display: grid; grid-template-columns: repeat(9, 1fr); border-bottom: 1px solid var(--card-brd); }
.cat-tab {
  min-width: 0; border: 0; background: transparent; cursor: pointer;
  padding: 16px 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--txt-2); position: relative; transition: background 0.25s, color 0.25s;
}
.cat-tab .cat-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--card-brd);
  display: grid; place-items: center; font-size: 19px;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.cat-tab span { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cat-tab small { font-size: 10px; color: var(--txt-3); letter-spacing: 0.04em; white-space: nowrap; }
.cat-tab:hover { color: var(--txt); background: rgba(255, 255, 255, 0.03); }
.cat-tab:hover .cat-ico { border-color: rgba(217, 177, 92, 0.4); color: var(--gold-2); }
.cat-tab.active { color: var(--gold-2); background: rgba(217, 177, 92, 0.07); }
.cat-tab.active .cat-ico {
  background: var(--gold-grad); border-color: transparent; color: #241a05;
  box-shadow: 0 6px 18px rgba(217, 177, 92, 0.35);
}
.cat-tab.active small { color: rgba(242, 212, 146, 0.75); }
.cat-tab.active::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 0;
  height: 2.5px; border-radius: 2px; background: var(--gold-grad);
}

/* 工作区双栏 */
.workspace { display: grid; grid-template-columns: 1.05fr 0.95fr; }
.col-input { padding: 26px 28px 30px; border-right: 1px solid var(--card-brd); min-width: 0; }
.col-output { padding: 26px 28px 30px; display: flex; flex-direction: column; min-width: 0; }

/* 拖放区 */
.drop-zone {
  border: 2px dashed rgba(217, 177, 92, 0.35); border-radius: 14px;
  padding: 34px 20px; text-align: center; cursor: pointer; transition: 0.25s;
  background: rgba(255, 255, 255, 0.02);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  outline: none;
}
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.over {
  border-color: var(--gold); background: rgba(217, 177, 92, 0.07);
}
.drop-zone.over { transform: scale(1.005); }
.drop-ico {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(217, 177, 92, 0.12); border: 1px solid rgba(217, 177, 92, 0.3);
  display: grid; place-items: center; font-size: 22px; color: var(--gold-2);
  margin-bottom: 8px; transition: 0.25s;
}
.drop-zone:hover .drop-ico { transform: translateY(-3px); }
.drop-copy strong { font-size: 16px; color: var(--txt); }
.drop-copy strong b { color: var(--gold-2); font-weight: 700; }
.drop-hint { display: block; color: var(--txt-3); margin-top: 6px; font-size: 13px; }
.drop-zone.has-files { flex-direction: row; padding: 15px 18px; gap: 14px; justify-content: center; }
.drop-zone.has-files .drop-ico { width: 38px; height: 38px; font-size: 17px; margin: 0; }
.drop-zone.has-files .drop-copy strong { font-size: 14px; }
.drop-zone.has-files .drop-hint { margin-top: 2px; font-size: 12px; }

/* 嵌入字幕面板 */
.companion-panel {
  margin-top: 14px; border: 1px solid rgba(217, 177, 92, 0.3); border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  background: rgba(217, 177, 92, 0.06);
}
.companion-copy { flex: 1; min-width: 0; }
.companion-copy strong { display: block; font-size: 13.5px; }
.companion-copy p { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

/* 结果横幅 */
.result-banner {
  margin-top: 16px; border: 1px solid rgba(217, 177, 92, 0.45); border-radius: 14px;
  padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(120deg, rgba(217, 177, 92, 0.14), rgba(217, 177, 92, 0.06));
  animation: bannerIn 0.35s ease;
}
@keyframes bannerIn { from { opacity: 0; transform: translateY(-6px); } }
.rb-copy { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.rb-copy svg { color: var(--gold-2); font-size: 18px; flex: 0 0 auto; }
.rb-copy strong { color: var(--gold-2); }
.rb-acts { display: flex; gap: 8px; flex-shrink: 0; }

/* 文件列表 */
.file-list { display: grid; gap: 10px; margin-top: 14px; }
.f-row {
  border: 1px solid var(--card-brd); border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px; align-items: flex-start;
  transition: border-color 0.3s;
  animation: rowIn 0.3s ease;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }
.f-row.done { border-color: rgba(217, 177, 92, 0.45); background: rgba(217, 177, 92, 0.05); }
.f-row.error { border-color: rgba(194, 84, 80, 0.55); }
.f-row.busy .f-ico-tile::after {
  content: ""; position: absolute; inset: -3px; border-radius: 13px;
  border: 2px solid transparent; border-top-color: var(--gold);
  animation: rot 0.9s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
.f-ico-tile {
  width: 46px; height: 52px; border-radius: 12px; position: relative;
  background: rgba(217, 177, 92, 0.1); border: 1px solid rgba(217, 177, 92, 0.22);
  color: var(--gold-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; letter-spacing: 0.03em;
}
.f-row[data-kind="video"] .f-ico-tile, .f-row[data-kind="audio"] .f-ico-tile { background: rgba(122, 139, 255, 0.1); border-color: rgba(122, 139, 255, 0.25); color: #9db4ff; }
.f-row[data-kind="image"] .f-ico-tile { background: rgba(82, 182, 154, 0.1); border-color: rgba(82, 182, 154, 0.25); color: #6fd0b2; }
.f-row[data-kind="archive"] .f-ico-tile { background: rgba(194, 84, 80, 0.1); border-color: rgba(194, 84, 80, 0.3); color: #e08e8a; }
.f-body { min-width: 0; }
.f-top { display: flex; align-items: center; gap: 10px; }
.f-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-chip {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
  background: rgba(255, 255, 255, 0.07); color: var(--txt-3);
}
.f-chip.busy { background: rgba(217, 177, 92, 0.14); color: var(--gold-2); }
.f-chip.ok { background: rgba(217, 177, 92, 0.2); color: var(--gold-2); }
.f-chip.err { background: rgba(194, 84, 80, 0.18); color: #e59995; }
.f-meta { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-meta b { color: var(--gold); font-weight: 700; }
.f-err { font-size: 12px; color: #e59995; margin-top: 4px; }
.f-prog { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); margin-top: 9px; overflow: hidden; }
.f-prog i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--gold-grad); transition: width 0.3s ease;
}
.f-row.done .f-prog i { background: var(--gold-grad); }
.f-row.error .f-prog i { background: var(--red); }
.f-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.f-del {
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--card-brd); color: var(--txt-3);
  display: grid; place-items: center; transition: 0.25s; font-size: 13px;
}
.f-del:hover { border-color: var(--red); color: #e59995; }
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 20px; border-radius: 11px;
  background: var(--gold-grad); color: #241a05; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(217, 177, 92, 0.3); transition: 0.25s;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217, 177, 92, 0.45); }
.pv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 15px; border-radius: 11px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-brd);
  color: var(--txt-2); font-size: 13px; font-weight: 700; transition: 0.25s;
}
.pv-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.retry-btn {
  height: 36px; padding: 0 16px; border-radius: 10px; cursor: pointer; border: 0;
  background: rgba(194, 84, 80, 0.15); color: #e59995; font-size: 12.5px; font-weight: 700;
  transition: 0.25s;
}
.retry-btn:hover { background: rgba(194, 84, 80, 0.28); }

/* 右栏 */
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-heading h3 { font-family: var(--serif); font-size: 18px; letter-spacing: 1px; }
.target-count { color: var(--txt-3); font-size: 11.5px; border: 1px solid var(--card-brd); border-radius: 999px; padding: 3px 11px; }
.target-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.target-card {
  border: 1px solid var(--card-brd); border-radius: 13px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 13px 11px; text-align: left; position: relative;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  min-height: 74px;
}
.target-card:hover { border-color: rgba(217, 177, 92, 0.45); transform: translateY(-1px); }
.target-card strong { font-size: 14.5px; }
.target-card small { color: var(--txt-3); font-size: 10.5px; line-height: 1.4; }
.target-card .target-mark {
  position: absolute; right: 11px; top: 11px; width: 17px; height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%;
}
.target-card.active {
  border-color: var(--gold); background: rgba(217, 177, 92, 0.09);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.target-card.active strong { color: var(--gold-2); }
.target-card.active .target-mark { border-color: var(--gold); background: var(--gold); }
.target-card.active .target-mark::after {
  content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: #241a05;
}
.format-note {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--card-brd);
  color: var(--txt-3); font-size: 12px; line-height: 1.6;
}
.options-block { margin-top: 22px; }
.option-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; min-height: 40px; }
.control-group { min-width: 150px; }
.control-group > label {
  display: flex; justify-content: space-between; gap: 14px; margin-bottom: 7px;
  font-size: 12px; font-weight: 600; color: var(--txt-2);
}
.control-group > label output { color: var(--gold-2); font-weight: 800; }
.range-wrap { display: flex; align-items: center; gap: 10px; }
input[type="range"] { width: 130px; accent-color: var(--gold); }
input[type="number"], .control-input, select {
  width: 72px; height: 36px; border: 1px solid var(--card-brd); border-radius: 9px;
  background: var(--bg-3); padding: 0 9px; color: var(--txt); font-size: 12.5px; outline: none;
  transition: border-color 0.2s;
}
input[type="number"]:focus, .control-input:focus, select:focus { border-color: var(--gold); }
.segmented { display: flex; border: 1px solid var(--card-brd); border-radius: 10px; padding: 3px; background: rgba(255,255,255,0.03); }
.segmented button {
  border: 0; border-radius: 7px; background: transparent; padding: 7px 13px;
  font-size: 12px; font-weight: 700; cursor: pointer; color: var(--txt-3); white-space: nowrap;
  transition: 0.2s;
}
.segmented button.active { color: #241a05; background: var(--gold-grad); }
.option-inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-2); white-space: nowrap; }
.option-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-2); font-weight: 600; }
.option-check input { accent-color: var(--gold); }

/* 转换按钮 */
.convert-button {
  margin-top: auto; padding-top: 24px;
}
.convert-button button {
  width: 100%; height: 56px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--gold-grad); color: #241a05;
  font-size: 16.5px; font-weight: 800; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(217, 177, 92, 0.3);
  transition: 0.25s;
}
.convert-button button:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(217, 177, 92, 0.45); }
.convert-button button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.convert-button button.busy svg { animation: rot 1s linear infinite; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 60px 0 40px; background: rgba(5, 8, 20, 0.5); }
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.footer-brand img { width: 52px; border-radius: 14px; }
.footer-brand strong { display: block; letter-spacing: 2px; }
.footer-brand p { font-family: var(--tb-font); font-size: 14px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 28px; }
.footer-links a { font-size: 14px; color: var(--txt-2); transition: color 0.25s; }
.footer-links a:hover { color: var(--gold-2); }
.beian { font-size: 12.5px; color: var(--txt-3); }
.beian a { color: var(--txt-3); }
.beian a:hover { color: var(--gold-2); }
.beian .sep { margin: 0 10px; }

/* ---------- 引擎抽屉 ---------- */
.engine-drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.engine-drawer.open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 20, 0.6); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.25s ease;
}
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 92vw);
  background: var(--bg-2); border-left: 1px solid var(--card-brd);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  padding: 40px 32px; transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overflow: auto;
}
.engine-drawer.open .drawer-backdrop { opacity: 1; }
.engine-drawer.open .drawer-panel { transform: none; }
.drawer-close {
  position: absolute; right: 22px; top: 22px; border: 0; width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--txt-2);
  cursor: pointer; display: grid; place-items: center;
}
.drawer-close:hover { color: var(--gold-2); }
.drawer-panel h2 { font-family: var(--serif); font-size: 26px; letter-spacing: 1px; }
.drawer-lead { color: var(--txt-2); font-size: 13px; line-height: 1.8; margin: 12px 0 22px; }
.engine-list { border-top: 1px solid var(--card-brd); }
.engine-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--card-brd);
}
.engine-row strong { font-size: 13.5px; display: block; }
.engine-row small {
  display: block; margin-top: 3px; max-width: 280px; color: var(--txt-3); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-tag {
  border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 800;
  background: rgba(217, 177, 92, 0.15); color: var(--gold-2);
}
.status-tag.off { background: rgba(255, 255, 255, 0.06); color: var(--txt-3); }
.drawer-note {
  background: rgba(217, 177, 92, 0.08); border: 1px solid rgba(217, 177, 92, 0.3);
  padding: 15px 16px; border-radius: 13px; margin-top: 18px;
}
.drawer-note strong { font-size: 13px; }
.drawer-note p { font-size: 12px; line-height: 1.7; color: var(--txt-2); margin: 6px 0 12px; }

/* ---------- 预览弹窗 ---------- */
.pv-overlay {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(5, 8, 20, 0.78); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.pv-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.pv-panel {
  width: min(880px, 100%); max-height: 90vh;
  background: var(--bg-2); border: 1px solid var(--card-brd); border-radius: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  animation: pvIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes pvIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } }
.pv-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--card-brd); flex-shrink: 0;
}
.pv-title { min-width: 0; }
.pv-title strong {
  display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pv-title small { color: var(--txt-3); font-size: 11.5px; }
.pv-acts { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pv-body { overflow: auto; background: #0a0f22; min-height: 200px; display: flex; }
.pv-body img { margin: auto; max-width: 100%; max-height: 74vh; object-fit: contain; }
.pv-body iframe, .pv-body video { width: 100%; height: 72vh; border: 0; background: #000; }
.pv-body audio { width: 100%; margin: auto; padding: 40px 20px; }
.pv-body pre {
  width: 100%; padding: 22px 24px; color: var(--txt); font-size: 14px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word; font-family: inherit;
}
.pv-empty { margin: auto; color: var(--txt-3); font-size: 13.5px; padding: 40px; text-align: center; }

/* ---------- 拖拽遮罩 / 浮动进度 / Toast ---------- */
.drag-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(12, 18, 38, 0.85); backdrop-filter: blur(8px);
  display: none; place-items: center; pointer-events: none;
}
.drag-overlay.visible { display: grid; }
.drag-overlay > div {
  border: 2px dashed var(--gold); border-radius: 24px;
  width: min(420px, 80vw); height: 230px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(217, 177, 92, 0.07);
}
.drag-overlay svg { font-size: 40px; color: var(--gold-2); }
.drag-overlay strong { font-size: 20px; letter-spacing: 2px; }

.float-progress {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 105; display: flex; align-items: center; gap: 12px;
  background: rgba(16, 23, 54, 0.95); border: 1px solid rgba(217, 177, 92, 0.4);
  border-radius: 999px; padding: 11px 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  font-size: 13.5px; color: var(--txt); white-space: nowrap;
  animation: fpIn 0.3s ease;
}
@keyframes fpIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
.fp-spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(217, 177, 92, 0.25); border-top-color: var(--gold);
  animation: rot 0.9s linear infinite;
}
.fp-bar {
  width: 120px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.1);
  overflow: hidden; flex: 0 0 auto;
}
.fp-bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width 0.3s ease; }

.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: #16213a; color: #fff; padding: 11px 24px; border-radius: 999px;
  font-size: 13.5px; opacity: 0; transition: 0.35s; z-index: 140; pointer-events: none;
  border: 1px solid rgba(217, 177, 92, 0.35); max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(194, 84, 80, 0.6); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .col-input { border-right: 0; border-bottom: 1px solid var(--card-brd); }
  .cat-bar { grid-template-columns: repeat(9, 104px); overflow-x: auto; scrollbar-width: thin; }
}
@media (max-width: 860px) {
  .menu {
    position: fixed; top: 72px; right: 4vw; flex-direction: column; align-items: stretch;
    background: rgba(12, 18, 38, 0.97); border: 1px solid var(--card-brd);
    border-radius: 16px; padding: 16px; gap: 4px; min-width: 200px;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.3s;
  }
  .menu.open { opacity: 1; visibility: visible; transform: none; }
  .burger { display: block; }
  .tool-page { padding-top: 104px; }
  .col-input, .col-output { padding: 20px 16px 24px; }
  .target-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-tab { padding: 12px 8px 11px; }
  .cat-tab .cat-ico { width: 36px; height: 36px; font-size: 17px; }
  .cat-tab span { font-size: 12.5px; }
  .cat-tab small { display: none; }
  .f-row { grid-template-columns: 40px minmax(0, 1fr); }
  .f-ico-tile { width: 40px; height: 46px; }
  .f-acts { grid-column: 1 / -1; justify-content: flex-end; padding-top: 2px; }
  .result-banner { flex-direction: column; align-items: stretch; }
  .rb-acts { justify-content: flex-end; }
  .pv-body iframe, .pv-body video { height: 56vh; }
  .float-progress { bottom: 16px; max-width: 92vw; }
  .fp-bar { width: 70px; }
}
