/*!
 * html_video.css — /tools/html-video「HTML 视频合成器」
 * 满屏三栏工作台（代码 / 预览 / 面板），时间轴横跨左中两列；三端响应式。
 * 设计令牌定义在 :root，浮层（toast / 历史下拉）不会脱离作用域。
 */

/* 整屏：解除站点 .app 的 1280px 限宽，保留左侧导航 */
body.page-html-video-full .app,
body.page-html-video-full .main-content,
body.page-html-video-full .page-container { max-width: 100%; width: 100%; border-right: 0; min-width: 0; }
/* 站点 body{overflow-y:scroll} 会让页内 sticky 全部失效，把滚动权交还 html */
body.page-html-video-full { overflow: visible; }

:root {
    color-scheme: dark;
    --hv-bg: #0d1118;
    --hv-card: #161b24;
    --hv-card2: #1d2330;
    --hv-card3: #232b3a;
    --hv-line: rgba(255, 255, 255, .10);
    --hv-line2: rgba(255, 255, 255, .17);
    --hv-fg: #e9edf6;
    --hv-sub: #a1acc0;
    --hv-faint: #93a1b8;
    --hv-accent: #8b9bff;
    --hv-accent2: #35d6e8;
    --hv-on-accent: #10142a;
    --hv-ok: #3ddc97;
    --hv-warn: #ffc857;
    --hv-err: #ff7a7a;
    --hv-soft: rgba(139, 155, 255, .13);
    --hv-shadow: 0 8px 22px rgba(0, 0, 0, .24);
    --hv-radius: 14px;
    --hv-mono: Consolas, Monaco, "SF Mono", "Courier New", monospace;
}
[data-theme="light"] {
    color-scheme: light;
    --hv-bg: #f4f6fa;
    --hv-card: #ffffff;
    --hv-card2: #f1f4f9;
    --hv-card3: #e8edf5;
    --hv-line: rgba(15, 20, 25, .10);
    --hv-line2: rgba(15, 20, 25, .18);
    --hv-fg: #1c2431;
    --hv-sub: #5b6879;
    --hv-faint: #5b6879;
    --hv-accent: #4c5bd4;
    --hv-accent2: #0b8fa8;
    --hv-on-accent: #ffffff;
    --hv-ok: #12805a;
    --hv-warn: #9a6700;
    --hv-err: #c0392b;
    --hv-soft: rgba(76, 91, 212, .10);
    --hv-shadow: 0 10px 28px rgba(20, 30, 50, .10);
}

.hv-page { max-width: 100%; padding: 20px 22px 64px; box-sizing: border-box; color: var(--hv-fg); font-size: 14px; }
.hv-page *, .hv-page *::before, .hv-page *::after { box-sizing: border-box; }
.hv-page [hidden] { display: none !important; }
.hv-page button, .hv-page input, .hv-page select, .hv-page textarea { font-family: inherit; }
.hv-page button { cursor: pointer; }
.hv-page .hv-toast[hidden], .hv-page .hv-pane[hidden], .hv-page .hv-hist-pop[hidden] { display: none !important; }

/* ---------------------------- hero ---------------------------- */
.hv-hero { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--hv-line); border-radius: var(--hv-radius); background: linear-gradient(110deg, var(--hv-soft), transparent 62%), var(--hv-card); box-shadow: var(--hv-shadow); position: relative; }
.hv-hero-ic { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #6366f1, #06b6d4); }
.hv-hero-t { flex: 1 1 auto; min-width: 0; }
.hv-hero h1 { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.hv-hero p { margin: 0; color: var(--hv-sub); font-size: 13px; line-height: 1.6; }
.hv-hero-tags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.hv-tag { font-size: 11.5px; padding: 5px 10px; border: 1px solid var(--hv-line2); border-radius: 999px; color: var(--hv-sub); white-space: nowrap; background: var(--hv-card2); }
.hv-hero-actions { display: flex; gap: 8px; align-items: center; position: relative; }

/* ---------------------------- 按钮 ---------------------------- */
.hv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 13px; border: 1px solid var(--hv-line2); border-radius: 9px; background: var(--hv-card2); color: var(--hv-fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.hv-btn:hover { background: var(--hv-card3); border-color: var(--hv-accent); }
.hv-btn:active { transform: translateY(1px); }
.hv-btn:disabled { opacity: .5; cursor: not-allowed; }
.hv-btn.is-primary { background: var(--hv-accent); color: var(--hv-on-accent); border-color: transparent; }
.hv-btn.is-primary:hover { filter: brightness(1.08); }
.hv-btn.is-danger { color: var(--hv-err); }
.hv-btn.is-icon { min-width: 34px; padding: 6px 9px; font-size: 15px; }
.hv-mini { padding: 4px 9px; min-height: 28px; font-size: 11.5px; border: 1px solid var(--hv-line2); border-radius: 7px; background: var(--hv-card2); color: var(--hv-fg); }
.hv-mini:hover { border-color: var(--hv-accent); }
.hv-mini.is-danger { color: var(--hv-err); }
.hv-btn:focus-visible, .hv-mini:focus-visible, .hv-tab:focus-visible, .hv-clip:focus-visible, .hv-page input:focus-visible, .hv-page select:focus-visible, .hv-page textarea:focus-visible { outline: 2px solid var(--hv-accent); outline-offset: 2px; }

/* ---------------------------- 工具条 ---------------------------- */
.hv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--hv-line); border-radius: 12px; background: var(--hv-card); }
.hv-bar-sep { width: 1px; height: 24px; background: var(--hv-line2); margin: 0 3px; }
.hv-bar-sp { flex: 1 1 auto; }
.hv-select, .hv-input { height: 34px; padding: 6px 10px; border: 1px solid var(--hv-line2); border-radius: 8px; background: var(--hv-card2); color: var(--hv-fg); font-size: 12.5px; min-width: 0; }
.hv-select:focus, .hv-input:focus { border-color: var(--hv-accent); }
.hv-bar .hv-select { max-width: 190px; }
.hv-status { font-size: 11.5px; color: var(--hv-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* ---------------------------- 工作区 ---------------------------- */
.hv-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 330px); grid-template-areas: "ed pv pa" "tl tl pa"; gap: 14px; align-items: start; }
.hv-col-ed { grid-area: ed; min-width: 0; }
.hv-col-pv { grid-area: pv; min-width: 0; }
.hv-col-pa { grid-area: pa; min-width: 0; position: sticky; top: 14px; }
.hv-tl { grid-area: tl; min-width: 0; }
.hv-card { border: 1px solid var(--hv-line); border-radius: var(--hv-radius); background: var(--hv-card); box-shadow: var(--hv-shadow); overflow: hidden; }
.hv-card-h { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--hv-line); background: var(--hv-card2); min-height: 42px; }
.hv-card-h h2 { margin: 0; font-size: 13px; font-weight: 700; }
.hv-card-h .hv-sp { flex: 1 1 auto; }
.hv-card-h .hv-hint { font-size: 11.5px; color: var(--hv-faint); }
.hv-card-b { padding: 12px 13px; }

/* ---------------------------- 编辑器 ---------------------------- */
.hv-editor-wrap { position: relative; height: clamp(320px, 56vh, 640px); background: #10141d; }
[data-theme="light"] .hv-editor-wrap { background: #fbfcfe; }
.hv-code { display: block; width: 100%; height: 100%; resize: none; border: 0; outline: 0; padding: 14px 16px; background: transparent; color: var(--hv-fg); font-family: var(--hv-mono); font-size: 12.5px; line-height: 1.65; tab-size: 2; }
.hv-editor-wrap.has-cm .hv-code { display: none; }
.hv-editor-wrap .CodeMirror { height: 100%; font-family: var(--hv-mono); font-size: 12.5px; background: transparent; color: var(--hv-fg); }
.hv-editor-wrap .CodeMirror-gutters { background: var(--hv-card2); border-right: 1px solid var(--hv-line); }
.hv-editor-info { padding: 6px 13px; border-top: 1px solid var(--hv-line); font-size: 11px; color: var(--hv-faint); background: var(--hv-card2); }

/* ---------------------------- 预览 ---------------------------- */
.hv-preview-box { position: relative; height: clamp(280px, 48vh, 540px); background: color-mix(in srgb, var(--hv-card2) 70%, #000 30%); background-image: linear-gradient(45deg, rgba(127,127,127,.09) 25%, transparent 25%), linear-gradient(-45deg, rgba(127,127,127,.09) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(127,127,127,.09) 75%), linear-gradient(-45deg, transparent 75%, rgba(127,127,127,.09) 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
[data-theme="light"] .hv-preview-box { background: color-mix(in srgb, var(--hv-card2) 90%, #000 10%); }
.hv-stage { position: relative; flex: 0 0 auto; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); background: var(--hv-bg, #000); }
.hv-frame { position: absolute; top: 0; left: 0; border: 0; display: block; background: transparent; pointer-events: none; }
.hv-guides { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hv-guides::before, .hv-guides::after { content: ''; position: absolute; border: 1px dashed rgba(255, 255, 255, .38); }
.hv-guides::before { inset: 5%; }
.hv-guides::after { inset: 10%; border-color: rgba(255, 200, 80, .5); }
.hv-preview-box.is-pseudo-fs { position: fixed; inset: 0; z-index: 99998; height: 100vh; height: 100dvh; border-radius: 0; }
.hv-preview-box:fullscreen { height: 100vh; height: 100dvh; }
.hv-preview-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--hv-line); background: var(--hv-card2); flex-wrap: wrap; }
.hv-meta { font-size: 11.5px; color: var(--hv-faint); flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------- 播放控制 ---------------------------- */
.hv-player { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--hv-line); background: var(--hv-card2); flex-wrap: wrap; }
.hv-play { width: 38px; height: 34px; font-size: 15px; border-radius: 9px; border: 1px solid var(--hv-line2); background: var(--hv-accent); color: var(--hv-on-accent); }
.hv-time { font-family: var(--hv-mono); font-size: 12.5px; color: var(--hv-sub); white-space: nowrap; }
.hv-scrub { flex: 1 1 160px; min-width: 100px; accent-color: var(--hv-accent); height: 24px; }
.hv-player .hv-select { height: 30px; padding: 3px 7px; font-size: 11.5px; }
.hv-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--hv-sub); white-space: nowrap; }
.hv-chk input { accent-color: var(--hv-accent); }

/* ---------------------------- 时间轴 ---------------------------- */
.hv-tl .hv-card-b { padding: 10px 13px 14px; }
.hv-tl-body { position: relative; }
/* 时间轴区域禁止浏览器触摸手势接管，保证触屏拖拽 scrub / 片段可用 */
#hvTimeline, .hv-ruler, .hv-track-body { touch-action: none; }
.hv-ruler { position: relative; height: 26px; margin-left: 44px; border-bottom: 1px solid var(--hv-line); }
.hv-tick { position: absolute; top: 0; bottom: 0; width: 1px; }
.hv-tick i { position: absolute; top: 15px; left: 0; width: 1px; height: 10px; background: var(--hv-line2); }
.hv-tick em { position: absolute; top: 0; left: 3px; font-style: normal; font-size: 10px; color: var(--hv-faint); white-space: nowrap; }
.hv-track { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.hv-track-l { width: 38px; flex: 0 0 38px; font-size: 10.5px; color: var(--hv-faint); font-family: var(--hv-mono); text-align: right; }
.hv-track-body { position: relative; flex: 1 1 auto; height: 28px; border-radius: 6px; background: var(--hv-card2); border: 1px solid var(--hv-line); }
.hv-clip { position: absolute; top: 2px; height: 22px; border-radius: 5px; background: linear-gradient(100deg, var(--hv-accent), #6d78d8); color: #fff; display: flex; align-items: center; padding: 0 7px; overflow: hidden; cursor: grab; user-select: none; touch-action: none; font-size: 10.5px; box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.hv-clip.is-dragging { cursor: grabbing; opacity: .85; z-index: 6; }
.hv-clip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.hv-clip-r { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; background: rgba(255,255,255,.22); }
.hv-clip-r:hover { background: rgba(255,255,255,.5); }
.hv-playhead { position: absolute; top: 0; bottom: 0; left: 44px; /* 实际位置由 JS 按进度覆写 */ width: 2px; background: var(--hv-err); z-index: 7; pointer-events: none; box-shadow: 0 0 6px var(--hv-err); }
.hv-playhead::before { content: ''; position: absolute; top: -5px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--hv-err); }
.hv-tl-empty { padding: 16px; text-align: center; color: var(--hv-faint); font-size: 12px; }

/* ---------------------------- 右侧面板 ---------------------------- */
.hv-tabs { display: flex; gap: 3px; padding: 6px; border-bottom: 1px solid var(--hv-line); background: var(--hv-card2); overflow-x: auto; scrollbar-width: thin; }
.hv-tab { flex: 1 0 auto; min-width: 52px; padding: 7px 6px; border: 0; border-radius: 7px; background: transparent; color: var(--hv-sub); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.hv-tab:hover { background: var(--hv-card3); }
.hv-tab.is-on { background: var(--hv-accent); color: var(--hv-on-accent); }
.hv-panel { max-height: min(74vh, 780px); overflow-y: auto; overscroll-behavior: contain; }
.hv-panel::-webkit-scrollbar { width: 9px; }
.hv-panel::-webkit-scrollbar-thumb { background: var(--hv-line2); border-radius: 9px; }
.hv-pane { padding: 13px; }
.hv-sec { margin-bottom: 15px; }
.hv-sec-t { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; color: var(--hv-faint); letter-spacing: .6px; text-transform: uppercase; }
.hv-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hv-row > label { flex: 0 0 84px; font-size: 12px; color: var(--hv-sub); }
.hv-row .hv-input, .hv-row .hv-select { flex: 1 1 auto; width: 100%; }
.hv-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hv-row-2 .hv-f { min-width: 0; }
.hv-f > span { display: block; font-size: 11px; color: var(--hv-faint); margin-bottom: 4px; }
.hv-f .hv-input, .hv-f .hv-select { width: 100%; }
.hv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hv-actions .hv-btn { flex: 1 1 auto; }
.hv-tip { font-size: 11.5px; line-height: 1.7; color: var(--hv-faint); margin: 8px 0 0; }
.hv-empty { padding: 14px; text-align: center; color: var(--hv-faint); font-size: 11.5px; border: 1px dashed var(--hv-line2); border-radius: 9px; }
.hv-mini-hr { height: 1px; background: var(--hv-line); margin: 14px 0; }

/* 检查 */
.hv-lint-stat { padding: 8px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; margin-bottom: 10px; background: var(--hv-card2); color: var(--hv-sub); }
.hv-lint-stat.is-ok { background: rgba(61, 220, 151, .13); color: var(--hv-ok); }
.hv-lint-stat.is-warn { background: rgba(255, 200, 87, .13); color: var(--hv-warn); }
.hv-lint-stat.is-err { background: rgba(255, 122, 122, .13); color: var(--hv-err); }
.hv-lint-list { display: grid; gap: 7px; /* 不再内嵌第二层滚动，统一由 .hv-panel 滚动 */ }
.hv-lint-i { display: flex; gap: 9px; padding: 9px 10px; border: 1px solid var(--hv-line); border-radius: 9px; background: var(--hv-card2); }
.hv-lint-i.is-error { border-color: rgba(255, 122, 122, .4); }
.hv-lint-badge { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--hv-warn); color: #201900; }
.hv-lint-i.is-error .hv-lint-badge { background: var(--hv-err); color: #fff; }
.hv-lint-msg { font-size: 12px; line-height: 1.55; }
.hv-lint-fix { font-size: 11px; color: var(--hv-faint); margin-top: 4px; line-height: 1.5; }
.hv-lint-empty { padding: 16px; text-align: center; color: var(--hv-ok); font-size: 12px; border: 1px dashed var(--hv-line2); border-radius: 9px; }

/* 资源 */
.hv-asset { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--hv-line); border-radius: 9px; background: var(--hv-card2); margin-bottom: 7px; }
.hv-asset-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--hv-card3); flex: 0 0 auto; }
.hv-asset-i { flex: 1 1 auto; min-width: 0; }
.hv-asset-i b { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-asset-i span { font-size: 10.5px; color: var(--hv-faint); }
.hv-file-in { width: 100%; font-size: 11.5px; color: var(--hv-sub); }
.hv-file-in::file-selector-button { margin-right: 8px; padding: 5px 10px; border: 1px solid var(--hv-line2); border-radius: 7px; background: var(--hv-card3); color: var(--hv-fg); cursor: pointer; }

/* 导出 */
.hv-ex-result { margin-top: 9px; font-size: 11.5px; line-height: 1.5; word-break: break-all; }
.hv-ex-result.is-ok { color: var(--hv-ok); }
.hv-ex-result.is-err { color: var(--hv-err); }
.hv-ex-bar { height: 8px; border-radius: 8px; background: var(--hv-card3); overflow: hidden; margin: 9px 0 5px; }
.hv-ex-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--hv-accent), var(--hv-accent2)); transition: width .12s linear; }
.hv-ex-progress { font-family: var(--hv-mono); font-size: 11px; color: var(--hv-faint); }
.hv-ex-note { font-size: 11.5px; color: var(--hv-sub); min-height: 17px; line-height: 1.5; }
.hv-page.is-busy .hv-ex-go { opacity: .65; }

/* 帮助 */
.hv-help { font-size: 12px; line-height: 1.75; color: var(--hv-sub); }
.hv-help h3 { font-size: 12.5px; color: var(--hv-fg); margin: 14px 0 6px; }
.hv-help h3:first-child { margin-top: 0; }
.hv-help ul { margin: 5px 0; padding-left: 18px; }
.hv-help code { font-family: var(--hv-mono); font-size: 11px; background: var(--hv-card3); padding: 1px 5px; border-radius: 4px; color: var(--hv-accent2); }
.hv-help pre { background: #0d1220; color: #d8e2ff; padding: 10px 12px; border-radius: 9px; overflow-x: auto; font-size: 10.5px; line-height: 1.6; }
[data-theme="light"] .hv-help pre { background: #eef2f8; color: #2a3547; }

/* 历史下拉 */
.hv-hist-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(320px, 82vw); max-height: 380px; overflow-y: auto; padding: 8px; border: 1px solid var(--hv-line2); border-radius: 12px; background: var(--hv-card); box-shadow: var(--hv-shadow); }
.hv-hist-i { display: block; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 5px; border: 1px solid var(--hv-line); border-radius: 8px; background: var(--hv-card2); color: var(--hv-fg); }
.hv-hist-i:hover { border-color: var(--hv-accent); }
.hv-hist-i b { display: block; font-size: 12px; }
.hv-hist-i span { display: block; font-size: 10.5px; color: var(--hv-faint); margin-top: 2px; }

/* toast */
.hv-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 100001; max-width: min(560px, 90vw); padding: 10px 18px; border-radius: 10px; background: var(--hv-card3); color: var(--hv-fg); border: 1px solid var(--hv-line2); box-shadow: var(--hv-shadow); font-size: 12.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.hv-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.hv-toast.is-ok { border-color: var(--hv-ok); }
.hv-toast.is-err { border-color: var(--hv-err); }

/* ---------------------------- 底部说明 ---------------------------- */
.hv-about { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--hv-line); border-radius: var(--hv-radius); background: var(--hv-card); }
.hv-about h2 { margin: 0 0 8px; font-size: 14px; }
.hv-about p { margin: 0 0 8px; font-size: 12px; line-height: 1.8; color: var(--hv-sub); }
.hv-about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.hv-about-c { padding: 11px 13px; border: 1px solid var(--hv-line); border-radius: 10px; background: var(--hv-card2); }
.hv-about-c b { display: block; font-size: 12px; margin-bottom: 5px; }
.hv-about-c span { font-size: 11.5px; line-height: 1.65; color: var(--hv-faint); }
.hv-note { margin-top: 12px; padding: 10px 13px; border-left: 3px solid var(--hv-warn); border-radius: 7px; background: var(--hv-card2); font-size: 11.5px; line-height: 1.7; color: var(--hv-sub); }

/* ---------------------------- 响应式 ---------------------------- */
/* 1201px 以上：真三列工作台（1280 / 1366 笔记本也保持三列，面板列自动收窄） */
@media (max-width: 1440px) {
    .hv-work { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 300px); }
}
/* 769–1200px 平板 / 小窗口：编辑器与预览并排、时间轴横跨两者（保持"所见即所拖"），面板全宽走双栏 */
@media (max-width: 1200px) {
    .hv-work { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-areas: "ed pv" "tl tl" "pa pa"; }
    .hv-col-pa { position: static; }
    .hv-panel { max-height: none; }
    .hv-editor-wrap { height: clamp(280px, 42vh, 460px); }
    .hv-preview-box { height: clamp(280px, 42vh, 460px); }
    .hv-pane { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-content: start; }
    .hv-pane > .hv-sec, .hv-pane > .hv-actions, .hv-pane > .hv-tip, .hv-pane > .hv-help { min-width: 0; }
}
@media (max-width: 1100px) {
    .hv-hero { flex-wrap: wrap; }
    .hv-hero-tags { justify-content: flex-start; }
}
@media (max-width: 767px) {
    /* 手机：单列堆叠，顺序为 编辑器 → 预览 → 时间轴 → 面板 */
    .hv-work { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ed" "pv" "tl" "pa"; }
    .hv-page { padding: 14px 12px 56px; }
    .hv-hero { padding: 13px 14px; gap: 11px; }
    .hv-hero-ic { width: 40px; height: 40px; }
    .hv-hero h1 { font-size: 18px; }
    .hv-hero-tags { display: none; }
    .hv-bar { padding: 8px; gap: 6px; }
    .hv-bar .hv-btn { min-height: 40px; padding: 8px 11px; }
    .hv-bar .hv-select { max-width: none; flex: 1 1 130px; }
    .hv-bar-sep, .hv-status { display: none; }
    .hv-pane { grid-template-columns: minmax(0, 1fr); }
    .hv-page input, .hv-page select, .hv-page textarea { font-size: 16px; }
    .hv-code { font-size: 15px; }
    .hv-editor-wrap { height: clamp(240px, 38vh, 420px); }
    .hv-editor-wrap .CodeMirror { font-size: 15px; }
    .hv-btn, .hv-mini, .hv-tab { min-height: 40px; }
    .hv-btn.is-icon { min-width: 40px; }
    .hv-play { width: 44px; height: 40px; }
    .hv-tab { flex: 1 1 0; font-size: 11px; }
    .hv-preview-box { height: min(48vh, 380px); }
    .hv-player { gap: 6px; }
    .hv-scrub { flex: 1 1 100%; order: 5; }
    .hv-track-body { height: 32px; }
    .hv-clip { height: 26px; font-size: 10px; }
    .hv-clip-r { width: 20px; }
    .hv-about-grid { grid-template-columns: minmax(0, 1fr); }
    .hv-hist-pop { position: fixed; right: 12px; left: 12px; width: auto; top: auto; bottom: 12px; }
}
@media (max-width: 420px) {
    .hv-row > label { flex: 0 0 70px; }
    .hv-row-2 { grid-template-columns: minmax(0, 1fr); }
    .hv-hero-actions { width: 100%; justify-content: flex-end; }
}
@media (hover: none) {
    .hv-btn:hover, .hv-mini:hover, .hv-hist-i:hover { background: var(--hv-card2); border-color: var(--hv-line2); }
    .hv-btn:active { transform: none; }
    .hv-tab:hover { background: transparent; }
    .hv-tab.is-on:hover { background: var(--hv-accent); }
    .hv-clip-r:hover { background: rgba(255,255,255,.22); }
}
@media (prefers-reduced-motion: reduce) {
    .hv-page *, .hv-page *::before, .hv-page *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media print {
    .hv-bar, .hv-player, .hv-col-pa, .hv-tl, .hv-toast, .hv-hero-actions { display: none !important; }
    .hv-work { display: block; }
}
