/* 文生视频 / 首尾帧：复用全能参考原生版式(topbar/workspace/composer/preview-panel)，只补内部字段样式 */
/* 侧栏导航按 CSS order 重排：全能参考(1)/首尾帧(2)/文生视频(3)/任务队列(4)/角色资产(5) */
.mode-nav { display: flex; flex-direction: column; }
body.h3-modes-open .main-stage { visibility: hidden; }
#h3-modes-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 274px;
  z-index: 9;
  overflow: auto;
  background: var(--canvas, #0b0d0f);
  padding: 34px clamp(26px, 3.2vw, 58px) 48px;
}
#h3-modes-panel[hidden] { display: none !important; }
#h3-modes-panel .topbar { max-width: 1480px; margin: 0 auto 20px; }

/* composer 内部字段 */
.hm-composer { display: flex; flex-direction: column; gap: 14px; }
.hm-card-head { display: flex; align-items: center; gap: 10px; }
.hm-badge { background: color-mix(in srgb, var(--accent, #7c8cff) 18%, transparent); color: var(--accent, #7c8cff); border-radius: 8px; padding: 4px 9px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.hm-card-head strong { display: block; font-size: 16px; color: var(--ink, #e8eaed); }
.hm-card-head small { display: block; color: var(--muted, #9aa4b2); font-size: 12px; margin-top: 2px; }
.hm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-field > span { color: var(--ink-soft, #c7ccd2); font-size: 12px; font-weight: 600; }
.hm-field textarea, .hm-field select, .hm-field input[type="number"], .hm-field input[type="text"], .hm-field input[type="password"] {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line, #2a2f37); background: var(--field, #14181d); color: var(--ink, #e8eaed);
  border-radius: 11px; padding: 11px 12px; font-size: 13px; outline: none;
}
.hm-field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.hm-field :is(input,select,textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-field input::placeholder { color: var(--muted); }
.hm-field small { color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.hm-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.hm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hm-row3 { grid-template-columns: 1fr 1fr 1fr; }
.hm-seed-row { grid-template-columns: 1fr; }
#h3-modes-panel .workspace { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
#h3-modes-panel :is(.composer,.preview-panel,.workspace) { min-width: 0; }
.hm-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-slot { display: flex; flex-direction: column; gap: 8px; }
.hm-drop { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-strong, #3a404a); border-radius: 14px; padding: 11px 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.hm-drop:hover { border-color: var(--accent, #7c8cff); background: color-mix(in srgb, var(--accent, #7c8cff) 6%, transparent); }
.hm-drop .drop-icon { width: 36px; height: 36px; flex: 0 0 36px; }
.hm-drop.has-file .drop-icon { color: var(--success, #76c7a4); background: color-mix(in srgb, var(--success, #76c7a4) 16%, transparent); }
.hm-preview:empty { display: none; }
.hm-preview img { width: 100%; max-height: 130px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line, #2a2f37); }
.hm-composer .hm-gen { display: grid; grid-template-columns: 1fr auto; justify-items: center; margin-top: 4px; min-height: 48px; height: auto; padding: 12px 16px; border: 0; border-radius: 11px; cursor: pointer; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.hm-composer .hm-gen > span { white-space: nowrap; text-align: center; min-width: 0; line-height: 1.5; }
.hm-composer .hm-gen > small:empty { display: none; }
.hm-composer .hm-gen:has(> small:empty) { grid-template-columns: 1fr; }
.hm-composer .hm-gen:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hm-gen:hover { filter: brightness(1.08); }
.hm-gen:disabled { opacity: .6; cursor: default; }
#h3-modes-panel .h3-cancel-button { margin-top: 8px; }
.hm-note { color: var(--muted, #9aa4b2); font-size: 12px; line-height: 1.5; }

/* 预览内部（外框用原生 preview-viewport/preview-frame） */
.hm-pv-empty { text-align: center; color: var(--muted, #9aa4b2); padding: 40px 20px; }
.hm-pv-cam { font-size: 34px; margin-bottom: 10px; }
.hm-pv-spin { width: 34px; height: 34px; margin: 0 auto 12px; border: 3px solid var(--line, #2a2f37); border-top-color: var(--accent, #7c8cff); border-radius: 50%; animation: hmspin .8s linear infinite; }
@keyframes hmspin { to { transform: rotate(360deg); } }
.hm-pv-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.hm-dl-row { margin-top: 12px; text-align: right; min-height: 0; }
.hm-pv-dl { display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--field, #14181d); border: 1px solid var(--line, #2a2f37); color: var(--ink, #e8eaed); font-size: 12.5px; text-decoration: none; }
.hm-pv-dl:hover { border-color: var(--accent, #7c8cff); color: var(--accent, #7c8cff); }
.mode-button.h3-injnav .mode-icon { font-size: 16px; }

@media(max-width:700px){.hm-row,.hm-row3,.hm-frames{grid-template-columns:1fr}.hm-composer{min-width:0}.hm-gen{max-width:100%}}
@media(max-width:1100px){#h3-modes-panel .workspace{grid-template-columns:minmax(0,1fr)}}
