/* ============================================================
   Lyrics MV Studio — styled per ui_spec.md (Duolingo style)
   Reuses the global design tokens defined in style.css:
   --primary, --surface, --surface-muted, --text, --radius-*,
   --shadow-card, --shadow-btn, --font-rounded, etc.
   ============================================================ */
.mv-app {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h));
  min-height: 560px;
  background: var(--surface-muted);
  color: var(--text);
  font-family: var(--font-rounded);
}
.mv-app * { box-sizing: border-box; }

/* ---------- Top global toolbar ---------- */
.mv-topbar {
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 20px; flex: 0 0 auto;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-muted);
}
.mv-topbar-left { flex: 0 0 auto; min-width: 0; }
.mv-topbar-center { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.mv-topbar-right { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.mv-brand { font-weight: 900; font-size: 16px; letter-spacing: 0.2px; display: flex; align-items: center; gap: 8px; }
.mv-brand em { font-style: normal; color: var(--primary); }
.mv-brand-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--primary); stroke-width: 2.5; }
.mv-save-status { flex: 0 0 auto; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.mv-save-status::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--safe-text); box-shadow: 0 0 6px var(--safe-text); }
.mv-export-status { flex: 0 1 auto; max-width: min(220px, 22vw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-secondary); font-size: 12px; font-weight: 800; line-height: 1.25; text-align: right; }
.mv-export-status.is-ready { color: var(--safe-text); }
.mv-topbar .mv-export-btn { flex: 0 1 auto; width: auto; min-width: 116px; max-width: min(190px, 28vw); overflow: hidden; padding-inline: 16px; white-space: nowrap; text-overflow: ellipsis; }

.mv-aspect-switch { display: inline-flex; gap: 6px; background: var(--surface-muted); border-radius: var(--radius-full); }
.mv-aspect-btn {
  border: none; background: transparent; color: var(--text-secondary);
  padding: 9px 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 800; cursor: pointer;
  transition: transform 0.08s, background 0.12s, color 0.12s; white-space: nowrap;
}
.mv-aspect-btn:hover { color: var(--text); }
.mv-aspect-btn:active { transform: translateY(2px); }
.mv-aspect-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn-pressed); }

/* ---------- Workspace + resizable columns ---------- */
.mv-workspace { flex: 1 1 auto; display: flex; min-height: 0; overflow: hidden; }
.mv-col { display: flex; flex-direction: column; min-height: 0; background: var(--surface); position: relative; }
.mv-col-left { width: 288px; flex: 0 0 auto; border-right: 1px solid var(--surface-muted); }
.mv-col-right { width: 344px; flex: 0 0 auto; border-left: 0; background: var(--surface-soft); }
.mv-col-center { flex: 1 1 auto; min-width: 0; background: var(--bg); }
.mv-col.collapsed { width: 34px !important; min-width: 34px; flex: 0 0 34px; }
.mv-col.collapsed .mv-col-body { display: none; }
.mv-col.collapsed .mv-col-title { display: none; }
.mv-col.collapsed .mv-col-head { padding: 0; justify-content: center; }
.mv-col.collapsed .mv-resizer { flex-basis: 6px; }
.mv-col-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 14px; flex: 0 0 auto;
  border-bottom: 1px solid var(--surface-muted); background: var(--surface);
}
.mv-col-title { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); }
.mv-col-title i, .mv-col-title svg { width: 15px; height: 15px; stroke-width: 2.4; }
.mv-col-toggle { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--surface-muted); border-radius: 9px; background: var(--surface); color: var(--text-secondary); font-size: 19px; font-weight: 900; line-height: 1; cursor: pointer; transition: border-color 0.14s, color 0.14s, background 0.14s, transform 0.08s; }
.mv-col-toggle:hover { border-color: var(--primary); background: var(--safe-bg); color: var(--primary-border); }
.mv-col-toggle:active { transform: translateY(1px); }
.mv-col-body { flex: 1 1 auto; overflow: auto; padding: 14px; }

.mv-resizer { position: relative; z-index: 5; flex: 0 0 10px; cursor: col-resize; touch-action: none; background: var(--surface); border-inline: 1px solid var(--surface-muted); transition: background 0.15s, border-color 0.15s; }
.mv-resizer::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 48px; border-radius: 99px; background: var(--text-dim); opacity: 0.5; transform: translate(-50%, -50%); transition: height 0.15s, width 0.15s, opacity 0.15s, background 0.15s; }
.mv-resizer:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--surface-muted)); background: var(--safe-bg); }
.mv-resizer:hover::after { height: 62px; background: var(--primary-border); opacity: 0.85; }
.mv-resizer.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.mv-resizer.active::after { width: 4px; height: 72px; background: var(--primary); opacity: 1; }

/* The properties sidebar uses a quieter background so each setting group reads
   as an independent card while scrolling. */
.mv-col-right .mv-col-head { height: 48px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--surface-muted); background: var(--surface); box-shadow: 0 3px 12px rgba(31,42,31,0.045); }
.mv-col-right .mv-col-body { padding: 12px 12px 18px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; background: var(--surface-soft); }
.mv-col-right .mv-col-body::-webkit-scrollbar { width: 9px; }
.mv-col-right .mv-col-body::-webkit-scrollbar-track { background: transparent; }
.mv-col-right .mv-col-body::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: color-mix(in srgb, var(--text-secondary) 34%, transparent); background-clip: padding-box; }
.mv-col-right .mv-col-body::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-secondary) 54%, transparent); background-clip: padding-box; }

/* ---------- Tabs (left) ---------- */
.mv-tabs { display: flex; gap: 6px; background: var(--surface-muted); padding: 5px; border-radius: var(--radius-full); margin-bottom: 16px; }
.mv-tab { flex: 1; border: none; background: transparent; color: var(--text-secondary); padding: 9px 4px; border-radius: var(--radius-full); font-size: 14px; font-weight: 800; cursor: pointer; transition: transform 0.08s, background 0.12s, color 0.12s; }
.mv-tab:hover { color: var(--text); }
.mv-tab:active { transform: translateY(2px); }
.mv-tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn-pressed); }
.mv-tab-panels { position: relative; }
.mv-tab-panel { display: none; }
.mv-tab-panel.active { display: block; }

/* ---------- Right panel tabs ---------- */
.mv-rtabs { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; position: sticky; top: 30px; z-index: 4; background: var(--surface-muted); border-radius: 11px; }
.mv-rtab { position: relative; z-index: 1; display: flex; flex: 1; min-width: 0; min-height: 42px; align-items: center; justify-content: center; flex-direction: column; gap: 1px; border: none; background: transparent; color: var(--text-secondary); padding: 6px 3px; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; transition: transform 0.08s, background 0.12s, color 0.12s, box-shadow 0.12s; }
.mv-rtab small { overflow: hidden; max-width: 100%; font-size: 8px; font-weight: 900; line-height: 1; opacity: 0.7; text-overflow: ellipsis; white-space: nowrap; }
.mv-rtab:hover { color: var(--text); }
.mv-rtab:active { transform: translateY(2px); }
.mv-rtab.active { background: var(--primary); color: #fff; box-shadow: 0 2px 0 var(--primary-border), 0 4px 10px rgba(88,204,2,0.18); }
.mv-rtab-panel { display: none; }
.mv-rtab-panel.active { display: flex; flex-direction: column; gap: 12px; }
#mv-motion-controls { order: 1; }
#mv-background-controls { order: 2; }
#mv-background-advanced { order: 3; }
#mv-artwork-controls { order: 4; }
#mv-song-info-controls { order: 5; }

.mv-field-label { display: block; font-size: 13px; font-weight: 800; color: var(--text-secondary); margin: 4px 0 8px; }
.mv-or { display: flex; align-items: center; gap: 10px; text-align: center; font-size: 12px; font-weight: 800; color: var(--text-secondary); margin: 14px 0; }
.mv-or::before, .mv-or::after { content: ""; flex: 1; height: 3px; background: var(--surface-muted); border-radius: 3px; }

/* ---------- Song panel ---------- */
.dl-input-wrap { border: 1px solid var(--surface-muted); border-radius: 12px; background: var(--surface); overflow: hidden; }
.dl-input-wrap textarea { width: 100%; border: none; background: transparent; color: var(--text); padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 600; resize: vertical; outline: none; }
.dl-input-bar { display: flex; padding: 10px 0 0; background: none; border: none; }
.dl-btn-primary {
  border: none; background: var(--primary); color: #fff; padding: 11px 18px;
  border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer;
  width: 100%; box-shadow: 0 3px 0 var(--primary-border); transition: transform 0.08s, box-shadow 0.08s, background 0.12s;
}
.dl-btn-primary:hover { background: var(--primary-pressed); }
.dl-btn-primary:active { transform: translateY(3px); box-shadow: var(--shadow-btn-pressed); }
.dl-btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: var(--shadow-btn); }
.dl-form-hint { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-top: 10px; min-height: 18px; }

.me-drop-zone { border: 1px dashed var(--primary-border); border-radius: 12px; padding: 16px 14px; text-align: center; cursor: pointer; transition: all 0.15s; background: var(--surface); }
.me-drop-zone:hover, .me-drop-zone.is-dragover { border-color: var(--primary); background: var(--surface-soft); }
.me-drop-icon { color: var(--primary); margin-bottom: 8px; }
.me-drop-text { display: flex; flex-direction: column; gap: 4px; }
.me-drop-hint { font-size: 14px; font-weight: 800; color: var(--text); }
.me-drop-sub { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.mv-song-info { margin-top: 16px; display: flex; gap: 12px; background: var(--surface-muted); border-radius: var(--radius-lg); padding: 12px; }
.mv-song-cover { width: 76px; height: 76px; border-radius: var(--radius); overflow: hidden; flex: 0 0 auto; background: var(--surface); border: 3px solid var(--surface); }
.mv-song-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-song-meta { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mv-text-input { width: 100%; box-sizing: border-box; border: 3px solid var(--surface); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 9px 12px; font-family: inherit; font-size: 14px; font-weight: 700; outline: none; }
.mv-text-input:focus { border-color: var(--primary); }
.mv-song-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.mv-import-recovery { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; padding: 12px; border: 1px solid var(--warning, #ff9f1c); border-radius: 12px; background: var(--surface-soft); }
.mv-import-recovery strong { color: var(--text); font-size: 13px; font-weight: 900; }
.mv-import-recovery > span { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.4; }
.mv-import-recovery > div { display: flex; flex-wrap: wrap; gap: 7px; }
.mv-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 3px solid var(--surface-muted); background: var(--surface); color: var(--text); border-radius: var(--radius); cursor: pointer; box-shadow: 0 3px 0 var(--surface-muted); transition: transform 0.08s, border-color 0.12s, color 0.12s; flex: 0 0 auto; }
.mv-icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.mv-icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--surface-muted); }
.mv-icon-btn i, .mv-icon-btn svg { width: 18px; height: 18px; }
.mv-icon-btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: var(--radius);
  white-space: nowrap; box-shadow: 0 3px 0 var(--primary-border); z-index: 200; pointer-events: none;
}
.mv-icon-btn[data-tip]:hover::before {
  content: ''; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid var(--primary);
  z-index: 200; pointer-events: none;
}
.mv-mini-btn { border: 3px solid var(--surface-muted); background: var(--surface); color: var(--text); padding: 7px 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 800; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; box-shadow: 0 3px 0 var(--surface-muted); }
.mv-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.mv-mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--surface-muted); }
.mv-link-btn { text-decoration: none; color: var(--text-secondary); border-color: transparent; background: transparent; box-shadow: none; }
.mv-link-btn:hover { color: var(--primary); background: var(--surface-soft); border-color: var(--surface-muted); }
.mv-mini-btn.mv-primary { background: var(--primary); color: #fff; border-color: var(--primary-border); box-shadow: 0 3px 0 var(--primary-border); }
.mv-mini-btn.mv-primary:hover { background: var(--primary-pressed); color: #fff; }

/* ---------- Lyrics panel ---------- */
.mv-lyrics-actions { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.mv-lyrics-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; padding: 12px; border: 1px dashed var(--surface-muted); border-radius: 12px; background: var(--surface-soft); }
.mv-lyrics-empty strong { color: var(--text); font-size: 13px; font-weight: 900; }
.mv-lyrics-empty span { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.4; }
.mv-lyrics-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--surface-muted); border-radius: 12px; background: var(--surface-soft); }
.mv-lyrics-summary-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.mv-lyrics-summary-label { color: var(--text-secondary); font-size: 11px; font-weight: 900; letter-spacing: 0.55px; text-transform: uppercase; }
.mv-lyrics-summary strong { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.mv-lyrics-summary-copy > span:last-child { color: var(--text-secondary); font-size: 11px; font-weight: 700; line-height: 1.35; }
.mv-lyrics-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mv-lyrics-editor-footer .mv-hint { margin-top: 0; }
.mv-lyrics-text { width: 100%; border: 3px solid var(--surface-muted); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); padding: 12px 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 600; line-height: 1.6; resize: vertical; outline: none; }
.mv-lyrics-text:focus { border-color: var(--primary); }
.mv-lyrics-preview { max-height: 320px; overflow-y: auto; border: 3px solid var(--surface-muted); border-radius: var(--radius-lg); background: var(--surface); padding: 6px; }
.mv-lrc-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: var(--radius); transition: background 0.12s; cursor: pointer; }
.mv-lrc-line:hover { background: var(--surface-soft); }
.mv-lrc-line.is-active { background: var(--primary); }
.mv-lrc-line.is-active .mv-lrc-time { background: rgba(255,255,255,0.25); color: #fff; }
.mv-lrc-time { flex: 0 0 auto; min-width: 52px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 800; color: var(--primary); background: var(--surface-soft); border-radius: var(--radius-full); padding: 2px 8px; text-align: center; }
.mv-lrc-text { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.5; word-break: break-word; }
.mv-lrc-line.is-active .mv-lrc-text { color: #fff; }
.mv-lyrics-toggle { margin-top: 8px; display: flex; justify-content: center; }
.mv-hint { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-top: 8px; }

.mv-lyrics-nolrc { margin-top: 10px; padding: 12px 14px; border: 3px solid var(--warning, #ff9f1c); border-radius: var(--radius-lg); background: var(--surface-soft); }
.mv-nolrc-head { font-size: 13px; font-weight: 900; color: var(--warning-text, #b25e00); margin-bottom: 4px; }
.mv-nolrc-body { font-size: 12px; font-weight: 600; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.mv-nolrc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mv-nolrc-create { display: inline-block; text-decoration: none; }
.mv-lyrics-validation { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 12px 14px; border: 1px solid rgba(88, 204, 2, 0.38); border-radius: 12px; background: var(--safe-bg); }
.mv-lyrics-validation strong { color: var(--text); font-size: 13px; font-weight: 900; }
.mv-lyrics-validation > span { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.45; }
.mv-lyrics-validation.is-warning { border-color: var(--warning, #ff9f1c); background: var(--surface-soft); }
.mv-lyrics-validation.is-error { border-color: var(--risk-text); background: var(--risk-bg); }
.mv-lyrics-validation-link { align-self: flex-start; margin-top: 4px; color: var(--primary); font-size: 12px; font-weight: 900; text-decoration: none; }
.mv-lyrics-validation-link:hover { text-decoration: underline; }

/* ---------- Background panel ---------- */
.mv-bg-source { display: flex; gap: 4px; background: var(--surface-muted); padding: 4px; border-radius: 10px; margin-bottom: 12px; }
.mv-bg-source-btn { flex: 1; border: none; background: transparent; color: var(--text-secondary); padding: 8px 4px; border-radius: 7px; font-size: 12px; font-weight: 800; cursor: pointer; }
.mv-bg-source-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn-pressed); }
.mv-artwork-source-btn { flex: 1; border: none; background: transparent; color: var(--text-secondary); padding: 8px 4px; border-radius: 7px; font-size: 12px; font-weight: 800; cursor: pointer; }
.mv-artwork-source-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn-pressed); }
.mv-artwork-upload { margin-bottom: 12px; }
.mv-bg-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--surface-muted); background: var(--surface); }
.mv-bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-bg-coverview:not(.has-cover) .mv-bg-thumb,
.mv-bg-coverview:not(.has-cover) > .mv-hint { display: none; }
.mv-bg-empty { min-height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; padding: 18px; border: 1px dashed var(--surface-muted); border-radius: 10px; text-align: center; color: var(--text-secondary); }
.mv-bg-empty i, .mv-bg-empty svg { width: 24px; height: 24px; color: var(--primary); }
.mv-bg-empty strong { color: var(--text); font-size: 13px; }
.mv-bg-empty span { font-size: 12px; line-height: 1.45; }
.mv-bg-empty .mv-mini-btn { margin-top: 4px; }
.mv-bg-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.mv-bg-empty-actions .mv-mini-btn { margin-top: 4px; }
.mv-bg-coverview.has-cover .mv-bg-empty { display: none; }
.mv-bg-preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mv-bg-category { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--surface-muted); }
.mv-bg-category:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.mv-bg-category strong { color: var(--text); font-size: 12px; font-weight: 900; letter-spacing: 0.55px; text-transform: uppercase; }
.mv-bg-category span { color: var(--text-secondary); font-size: 10px; font-weight: 700; text-align: right; }
.mv-bg-preset { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--surface-muted); cursor: pointer; transition: border-color 0.12s, transform 0.08s; background: #000; box-shadow: none; }
.mv-bg-preset:hover { transform: translateY(-2px); }
.mv-bg-preset.active { border-color: var(--primary); box-shadow: 0 4px 0 var(--primary-border); }
.mv-bg-preset canvas { width: 100%; height: 100%; display: block; }
.mv-bg-preset span { position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.mv-artwork-preview { display: none; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--surface-muted); border-radius: 10px; background: var(--surface-soft); }
.mv-artwork-preview.has-image { display: block; }
.mv-artwork-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mv-artwork-preview span { display: block; padding: 7px 9px; color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.mv-artwork-upload .mv-link-btn { margin-top: 8px; }
.mv-artwork-availability { margin: 0 0 10px; padding: 9px 11px; border: 1px solid var(--warning, #ff9f1c); border-radius: 9px; background: var(--surface-soft); color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.4; }
#mv-artwork-layout-controls.is-limited { opacity: 0.62; }
#mv-artwork-layout-controls :disabled { cursor: not-allowed; }

/* ---------- Center: canvas toolbar ---------- */
.mv-canvas-toolbar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 14px; flex: 0 0 auto; background: var(--surface); border-bottom: 1px solid var(--surface-muted); }
.mv-tool-btn { border: 3px solid var(--surface-muted); background: var(--surface); color: var(--text); height: 32px; min-width: 32px; padding: 0 12px; border-radius: var(--radius); font-size: 16px; font-weight: 900; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; box-shadow: 0 3px 0 var(--surface-muted); }
.mv-tool-btn:hover { border-color: var(--primary); color: var(--primary); }
.mv-tool-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--surface-muted); }
.mv-zoom-label { font-size: 13px; font-weight: 800; color: var(--text-secondary); min-width: 40px; text-align: center; }
.mv-tool-group { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--surface-muted); border-radius: var(--radius-full); }
.mv-tool-label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); }
.mv-spacer { flex: 1; }
.mv-timecode { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 800; color: var(--text); min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
.mv-zoom-input { width: 46px; height: 30px; text-align: center; border: 2px solid var(--surface-muted); border-radius: var(--radius); background: var(--surface); color: var(--text); font-family: inherit; font-size: 12px; font-weight: 800; outline: none; padding: 0; }
.mv-zoom-input:focus { border-color: var(--primary); }
.mv-zoom-pct { font-size: 11px; font-weight: 800; color: var(--text-secondary); }
.mv-review-tools .mv-icon-btn { width: 30px; height: 30px; }
.mv-now-title { font-size: 14px; font-weight: 800; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Stage / preview ---------- */
.mv-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; position: relative; overflow: hidden; }
.mv-stage-empty { text-align: center; color: var(--text-secondary); font-size: 15px; font-weight: 700; max-width: 1080px; width: 100%; line-height: 1.6; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 32px; border: 1px solid var(--surface-muted); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 45px rgba(31, 42, 31, 0.06); }
.mv-start-kicker { align-self: center; display: inline-flex; align-items: center; gap: 7px; color: var(--primary-border); font-size: 12px; font-weight: 900; letter-spacing: 0.7px; text-transform: uppercase; }
.mv-start-kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.mv-stage-empty-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; font-weight: 900; color: var(--text); letter-spacing: -0.7px; }
.mv-stage-empty-sub { max-width: 470px; align-self: center; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.mv-start-methods { display: flex; align-items: stretch; align-self: center; gap: 14px; width: 100%; max-width: 720px; margin-top: 10px; text-align: left; }
.mv-start-method { flex: 1 1 0; padding: 14px; border: 1px solid var(--surface-muted); border-radius: 12px; background: var(--surface); }
.mv-start-method-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 900; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.55px; }
.mv-stage-empty-actions { display: flex; gap: 8px; width: 100%; }
.mv-stage-empty-input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--surface-muted); border-radius: 9px; background: var(--surface); color: var(--text); padding: 10px 12px; font-family: inherit; font-size: 13px; font-weight: 600; outline: none; }
.mv-stage-empty-actions .dl-btn-primary { width: auto; flex: 0 0 auto; padding: 10px 14px; }
.mv-stage-empty-input:focus { border-color: var(--primary); }
.mv-start-divider { display: flex; align-items: center; color: var(--text-dim); font-size: 12px; font-weight: 800; }
.mv-start-divider::before, .mv-start-divider::after { content: ""; display: none; }
.mv-stage-empty-drop { cursor: pointer; border: 1px dashed var(--primary-border); border-radius: 12px; padding: 12px 18px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 800; transition: all 0.15s; }
.mv-stage-empty-drop:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-soft); }
.mv-start-upload { flex: 1 1 0; min-height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.mv-start-upload i, .mv-start-upload svg { width: 22px; height: 22px; margin-bottom: 3px; }
.mv-start-upload-title { color: var(--text); font-size: 14px; }
.mv-start-upload-sub { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.mv-start-note { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.mv-start-note i, .mv-start-note svg { width: 15px; height: 15px; color: var(--safe-text); }
.mv-draft-restore { display: flex; align-items: center; align-self: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 720px; padding: 12px 14px; border: 1px solid rgba(88, 204, 2, 0.38); border-radius: 12px; background: var(--safe-bg); text-align: left; }
.mv-draft-restore > div:first-child { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.mv-draft-restore strong { color: var(--text); font-size: 13px; font-weight: 900; }
.mv-draft-restore span { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.35; }
.mv-draft-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.mv-stage-loading { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(5px); text-align: center; }
.mv-stage-loading strong { color: var(--text); font-size: 17px; font-weight: 900; }
.mv-stage-loading span:last-child { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.mv-loading-spinner { width: 34px; height: 34px; border: 3px solid var(--surface-muted); border-top-color: var(--primary); border-radius: 50%; animation: mv-loading-spin 0.75s linear infinite; }
.mv-stage-error { position: absolute; z-index: 11; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(420px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--warning, #ff9f1c); border-radius: 14px; background: var(--surface); box-shadow: 0 16px 45px rgba(31,42,31,0.16); text-align: center; }
.mv-stage-error strong { color: var(--text); font-size: 16px; font-weight: 900; }
.mv-stage-error > span { color: var(--text-secondary); font-size: 13px; font-weight: 700; line-height: 1.4; }
.mv-stage-error > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mv-app.mv-is-importing .mv-stage-empty,
.mv-app.mv-is-importing .mv-preview-section { filter: blur(2px); pointer-events: none; }
@keyframes mv-loading-spin { to { transform: rotate(360deg); } }
.mv-preview-section { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: auto; }
.mv-preview-wrap {
  --ar-w: 16; --ar-h: 9;
  position: relative; background: #000; border-radius: 0;
  overflow: hidden; box-shadow: none; container-type: inline-size;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  margin: auto;
}
.mv-preview-wrap canvas { width: 100%; height: 100%; display: block; object-fit: contain; cursor: default; touch-action: none; }
.mv-preview-wrap canvas.is-lyrics-hover { cursor: move; }
.mv-preview-wrap canvas.is-lyrics-drag { cursor: grabbing; }
.mv-preview-wrap canvas.is-title-hover { cursor: move; }
.mv-preview-wrap canvas.is-title-drag { cursor: grabbing; }
.mv-lyrics-selection-hint { position: absolute; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 7px 9px 7px 12px; border-radius: 999px; background: rgba(20, 29, 23, 0.85); color: #fff; font-size: 12px; font-weight: 800; transform: translateX(-50%); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.mv-lyrics-selection-hint button { border: none; border-radius: 999px; background: var(--primary); color: #fff; padding: 5px 9px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.mv-context-toolbar { position: absolute; z-index: 4; left: 50%; bottom: 14px; display: flex; align-items: center; gap: 4px; box-sizing: border-box; max-width: calc(100% - 24px); padding: 6px; border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; background: rgba(20, 29, 23,0.92); box-shadow: 0 7px 22px rgba(0,0,0,0.28); color: #fff; transform: translateX(-50%); }
.mv-context-toolbar button { border: none; border-radius: 8px; background: rgba(255,255,255,0.12); color: #fff; padding: 6px 8px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.mv-context-toolbar button:hover { background: var(--primary); }
.mv-context-toolbar button.is-active { background: var(--primary); }
.mv-context-toolbar .mv-context-more { background: var(--primary); }
.mv-context-title { padding: 0 5px 0 3px; font-size: 11px; font-weight: 900; }
.mv-preview-wrap canvas.is-artwork-hover { cursor: pointer; }
.mv-preview-wrap canvas.is-artwork-drag { cursor: grabbing; }

/* ---------- Transport ---------- */
.mv-transport { display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--surface-muted); }
.mv-play { width: 60px; height: 44px; border-radius: 9999px; border: none; background: var(--primary); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: var(--shadow-btn); transition: transform 0.08s, box-shadow 0.08s, background 0.12s; }
.mv-play:hover { background: var(--primary-pressed); }
.mv-play:active { transform: translateY(3px); box-shadow: var(--shadow-btn-pressed); }
.mv-play .mv-icon-play { width: 0; height: 0; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 5px; }
.mv-play .mv-icon-pause { display: none; width: 14px; height: 18px; border-left: 5px solid #fff; border-right: 5px solid #fff; box-sizing: border-box; margin: 0 auto; }
.mv-play.is-playing .mv-icon-play { display: none; }
.mv-play.is-playing .mv-icon-pause { display: block; }
.mv-time { font-size: 13px; font-weight: 800; color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; display: flex; align-items: center; justify-content: center; height: 18px; }
.mv-seek { --seek-progress: 0%; flex: 1; -webkit-appearance: none; appearance: none; height: 18px; background: transparent; border-radius: 0; outline: none; cursor: pointer; display: flex; align-items: center; }
.mv-seek::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-full); background: linear-gradient(to right, var(--primary) 0, var(--primary) var(--seek-progress), var(--surface-muted) var(--seek-progress), var(--surface-muted) 100%); }
.mv-seek::-webkit-slider-thumb { -webkit-appearance: none; margin-top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.4); cursor: pointer; }
.mv-seek::-moz-range-track { height: 8px; border-radius: var(--radius-full); background: var(--surface-muted); }
.mv-seek::-moz-range-progress { height: 8px; border-radius: var(--radius-full); background: var(--primary); }
.mv-seek::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.4); cursor: pointer; }
.mv-seek:focus { outline: none; }

@container (max-width: 480px) {
  .mv-context-toolbar { bottom: 8px; width: calc(100% - 16px); max-width: none; flex-wrap: wrap; justify-content: center; row-gap: 5px; padding: 6px; }
  .mv-context-toolbar .mv-context-title { flex: 0 0 100%; padding: 0 4px 2px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .mv-context-toolbar button { flex: 0 0 auto; padding: 5px 7px; font-size: 10px; }
}

@container (max-width: 300px) {
  .mv-context-toolbar { width: calc(100% - 10px); padding: 5px; }
  .mv-context-toolbar button { padding: 4px 6px; }
}

/* ---------- Timeline (read-only scrubber) ---------- */
.mv-timeline { flex: 0 0 auto; background: var(--surface); display: flex; flex-direction: column; border-top: 1px solid var(--surface-muted); }
.mv-tl-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 5px 12px; background: var(--surface); border-bottom: 1px solid var(--surface-muted); }
.mv-tl-heading { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mv-tl-title { font-size: 12px; font-weight: 900; color: var(--text); text-transform: uppercase; letter-spacing: 0.6px; }
.mv-tl-hint { font-size: 12px; font-weight: 800; color: var(--text-secondary); }
.mv-tl-zoom { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mv-timeline-toggle { border: none; background: transparent; color: var(--primary-border); padding: 5px 7px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.mv-timeline-toggle:hover { color: var(--primary); }
.mv-timeline.is-collapsed .mv-tl-scroll,
.mv-timeline.is-collapsed .mv-tl-hint,
.mv-timeline.is-collapsed .mv-tl-zoom > :not(.mv-timeline-toggle) { display: none; }
.mv-tl-zoom .mv-icon-btn { width: 30px; height: 30px; font-size: 13px; }
.mv-tl-scroll { position: relative; flex: 0 0 auto; height: 112px; overflow-x: auto; overflow-y: hidden; }
.mv-tl-inner { position: relative; height: 100%; min-width: 100%; }
.mv-tl-ruler { position: relative; height: 24px; border-bottom: 2px solid var(--surface-muted); background: var(--surface-soft); }
.mv-tl-tick { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--surface-muted); font-size: 11px; font-weight: 800; color: var(--text-secondary); padding-left: 5px; line-height: 24px; pointer-events: none; }
.mv-tl-maintrack { position: relative; height: 76px; background: var(--surface-soft); }
#mv-wave { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mv-tl-clips { position: absolute; inset: 0; pointer-events: none; }

.mv-clip {
  position: absolute; top: 9px; bottom: 9px; min-width: 8px;
  background: rgba(88, 204, 2, 0.16); color: var(--text-primary);
  border: 2px solid rgba(88, 204, 2, 0.5);
  border-radius: var(--radius); overflow: hidden; user-select: none; pointer-events: none;
  font-size: 12px; font-weight: 800; padding: 0 8px; line-height: 58px; white-space: nowrap;
  box-sizing: border-box;
}
.mv-clip.is-active { background: var(--primary); color: #fff; border-color: var(--primary-border); box-shadow: var(--shadow-card); opacity: 0.55; }
.mv-clip .mv-clip-text { pointer-events: none; text-overflow: ellipsis; overflow: hidden; display: block; }

.mv-tl-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--risk-text); box-shadow: 0 0 8px var(--risk-text); pointer-events: none; z-index: 10; }
.mv-tl-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--risk-text); }

.mv-audio-hidden { display: none; }

/* ---------- Right: selection card ---------- */
.mv-selection { margin-bottom: 16px; }
.mv-selection-empty { font-size: 13px; font-weight: 700; color: var(--text-secondary); padding: 14px; background: var(--surface-muted); border: 3px dashed var(--surface-muted); border-radius: var(--radius-lg); text-align: center; }
.mv-selection-card { background: var(--surface-soft); border: 3px solid var(--surface-muted); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-card); }
.mv-sel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mv-sel-title { font-size: 15px; font-weight: 900; }
.mv-sel-badge { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--primary); color: #fff; }
.mv-sel-text { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 10px; word-break: break-word; }
.mv-sel-text.muted { color: var(--text-secondary); font-weight: 700; font-style: italic; }

/* ---------- Right: sections + controls ---------- */
.mv-section { background: var(--surface); border: 1px solid var(--surface-muted); border-radius: 14px; padding: 14px; margin-bottom: 14px; box-shadow: none; }
.mv-col-right .mv-section { margin-bottom: 0; padding: 15px; border-color: color-mix(in srgb, var(--surface-muted) 82%, var(--text-dim)); box-shadow: 0 7px 20px rgba(31,42,31,0.045); }
.mv-section h3 { font-size: 14px; font-weight: 900; margin: 0 0 12px; }
.mv-col-right .mv-section > h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; font-size: 14px; letter-spacing: 0.1px; }
.mv-col-right .mv-section > h3::before { content: ""; flex: 0 0 auto; width: 4px; height: 15px; border-radius: 99px; background: var(--primary); }
.mv-section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.mv-section-heading h3 { margin: 0; font-size: 14px; font-weight: 900; }
.mv-section-heading span { color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.mv-song-info-preview { position: relative; display: flex; align-items: center; min-height: 76px; margin: 0 0 14px; padding: 13px 15px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; color: #fff; background: linear-gradient(130deg, #101927, #29364a 55%, #172131); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.mv-song-info-preview::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 82% 16%, rgba(88,204,2,0.22), transparent 42%); }
.mv-song-info-preview-accent { position: relative; z-index: 1; flex: 0 0 auto; width: 4px; height: 44px; margin-right: 12px; border-radius: 0; background: var(--primary); box-shadow: 0 0 16px rgba(88,204,2,0.45); }
.mv-song-info-preview-copy { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.mv-song-info-preview-copy strong { overflow: hidden; font-size: 15px; font-weight: 1000; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.mv-song-info-preview-copy span { overflow: hidden; color: rgba(255,255,255,0.7); font-size: 11px; font-weight: 800; letter-spacing: 0.4px; text-overflow: ellipsis; white-space: nowrap; }
.mv-song-info-preview--minimal { align-items: flex-start; border-color: transparent; background: linear-gradient(130deg, #1b2331, #303b4d); box-shadow: none; }
.mv-song-info-preview--minimal::after { background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent 65%); }
.mv-song-info-preview--minimal .mv-song-info-preview-accent { position: absolute; top: 13px; left: 15px; width: 34px; height: 3px; margin: 0; box-shadow: none; }
.mv-song-info-preview--minimal .mv-song-info-preview-copy { padding-top: 16px; gap: 2px; }
.mv-song-info-preview--spotlight { justify-content: center; text-align: center; background: radial-gradient(circle at 50% 20%, #4a5b70, #151d2b 70%); }
.mv-song-info-preview--spotlight::after { background: radial-gradient(circle at 50% 0, rgba(255,255,255,0.17), transparent 48%); }
.mv-song-info-preview--spotlight .mv-song-info-preview-accent { position: absolute; top: 10px; width: 34px; height: 3px; margin: 0; box-shadow: 0 0 14px rgba(88,204,2,0.5); }
.mv-song-info-preview--spotlight .mv-song-info-preview-copy { align-items: center; padding-top: 8px; }
.mv-song-info-preview--spotlight .mv-song-info-preview-copy span { padding: 2px 9px; border-radius: 99px; background: rgba(5,9,16,0.56); }
.mv-song-info-preview--glass { justify-content: center; margin-inline: 0; border-color: rgba(255,255,255,0.22); background: linear-gradient(135deg, rgba(22,32,48,0.88), rgba(51,64,83,0.62)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 22px rgba(4,8,15,0.2); }
.mv-song-info-preview--glass::after { background: radial-gradient(circle at 14% 10%, rgba(88,204,2,0.28), transparent 38%); }
.mv-song-info-preview--glass .mv-song-info-preview-accent { width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; }
.mv-song-info-preview--poster { align-items: flex-end; border-color: transparent; background: linear-gradient(145deg, #0c1018, #293449); }
.mv-song-info-preview--poster::after { background: linear-gradient(115deg, transparent 42%, rgba(88,204,2,0.17) 42%, rgba(88,204,2,0.04) 74%, transparent 74%); }
.mv-song-info-preview--poster .mv-song-info-preview-accent { position: absolute; left: 15px; bottom: 12px; width: 48px; height: 3px; margin: 0; box-shadow: none; }
.mv-song-info-preview--poster .mv-song-info-preview-copy { gap: 1px; padding-bottom: 7px; text-transform: uppercase; }
.mv-song-info-preview--poster .mv-song-info-preview-copy strong { font-size: 18px; letter-spacing: 0.7px; }
.mv-song-info-preview--poster .mv-song-info-preview-copy span { order: -1; color: var(--primary); font-size: 9px; letter-spacing: 1.8px; }
.mv-song-info-preview--lowerthird { align-items: flex-end; border-color: transparent; background: linear-gradient(135deg, #1d2838, #111824); box-shadow: none; }
.mv-song-info-preview--lowerthird::after { top: auto; height: 54px; background: linear-gradient(90deg, rgba(4,8,14,0.88), rgba(4,8,14,0.2) 74%, transparent); }
.mv-song-info-preview--lowerthird .mv-song-info-preview-accent { align-self: flex-end; width: 4px; height: 38px; margin: 0 10px 0 0; box-shadow: none; }
.mv-song-info-preview--lowerthird .mv-song-info-preview-copy { padding-bottom: 2px; }
.mv-song-info-preview.is-hidden { opacity: 0.45; filter: grayscale(0.65); }
.mv-presets-section { margin-bottom: 12px; padding: 13px; border: 1px solid var(--surface-muted); border-radius: 14px; background: var(--surface); box-shadow: 0 7px 20px rgba(31,42,31,0.04); }
.mv-subhead { font-size: 13px; font-weight: 900; color: var(--text-secondary); margin: 16px 0 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.mv-style-controls { display: flex; flex-direction: column; gap: 10px; }
.mv-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; }
.mv-col-right .mv-control { min-height: 42px; padding: 7px 9px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-soft); }
.mv-col-right .mv-control:focus-within { border-color: color-mix(in srgb, var(--primary) 45%, var(--surface-muted)); background: var(--surface); }
.mv-control > span { color: var(--text-secondary); flex: 0 0 auto; }
.mv-col-right .mv-control > span { max-width: 44%; font-size: 12px; font-weight: 800; line-height: 1.25; }
.mv-control output { margin-left: 4px; color: var(--text); font-size: 12px; font-weight: 900; }
.mv-contrast-hint { display: block; margin: 2px 9px 6px; font-size: 11px; font-weight: 600; line-height: 1.35; color: #d97706; }
.mv-control select, .mv-control input[type="range"] { flex: 1; min-width: 0; }
.mv-control select {
  border: 1px solid var(--surface-muted); border-radius: 8px; background: var(--surface); color: var(--text);
  padding: 9px 11px; font-family: inherit; font-size: 14px; font-weight: 800; outline: none;
}
.mv-col-right .mv-control select { height: 34px; padding: 6px 9px; font-size: 12px; }
.mv-control select:focus { border-color: var(--primary); }
.mv-control input[type="range"] {
  --fill-pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
}
.mv-control input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--primary) 0, var(--primary) var(--fill-pct), var(--surface-muted) var(--fill-pct), var(--surface-muted) 100%);
}
.mv-control input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; margin-top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; cursor: pointer; box-shadow: var(--shadow-btn-pressed); }
.mv-col-right .mv-control input[type="range"] { height: 6px; }
.mv-col-right .mv-control input[type="range"]::-webkit-slider-runnable-track { height: 6px; }
.mv-col-right .mv-control input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6px; border-width: 3px; box-shadow: 0 1px 0 var(--primary-border), 0 2px 7px rgba(31,42,31,0.16); }
.mv-control input[type="range"]::-moz-range-track { height: 8px; border-radius: var(--radius-full); background: var(--surface-muted); }
.mv-control input[type="range"]::-moz-range-progress { height: 8px; border-radius: var(--radius-full); background: var(--primary); }
.mv-col-right .mv-control input[type="range"]::-moz-range-track { height: 6px; }
.mv-col-right .mv-control input[type="range"]::-moz-range-progress { height: 6px; }
.mv-control input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; cursor: pointer; }
.mv-control input[type="color"] { width: 50px; height: 34px; padding: 2px; border: 1px solid var(--surface-muted); border-radius: 8px; background: var(--surface); cursor: pointer; }
.mv-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.mv-control input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }

/* ---------- Google + local font picker ---------- */
.mv-font-picker { position: relative; display: flex; flex-direction: column; gap: 7px; width: 100%; }
.mv-control-label { color: var(--text-secondary); font-size: 13px; font-weight: 800; }
.mv-font-current { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--surface-muted); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-align: left; }
.mv-font-current:hover, .mv-font-current[aria-expanded="true"] { border-color: var(--primary); }
.mv-font-current > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-font-current svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-secondary); }
.mv-font-menu { position: fixed; top: 12px; left: 12px; z-index: 1201; display: flex; width: min(440px, calc(100vw - 24px)); height: min(520px, calc(100vh - 24px)); overflow: hidden; flex-direction: column; border: 1px solid var(--surface-muted); border-radius: 14px; background: var(--surface); box-shadow: 0 20px 55px rgba(0,0,0,0.3); }
.mv-font-menu-head { flex: 0 0 auto; padding: 14px; border-bottom: 1px solid var(--surface-muted); background: var(--surface-soft); }
.mv-font-menu-head input { width: 100%; height: 42px; padding: 9px 12px; border: 1px solid var(--surface-muted); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; outline: none; }
.mv-font-menu-head input:focus { border-color: var(--primary); }
.mv-font-tabs { display: flex; gap: 5px; margin-top: 10px; padding: 4px; border-radius: 9px; background: var(--surface-muted); }
.mv-font-tabs button { flex: 1; border: none; border-radius: 7px; background: transparent; color: var(--text-secondary); padding: 8px 10px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.mv-font-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.mv-font-local-actions { display: flex; flex: 0 0 auto; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--surface-muted); }
.mv-font-local-actions button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-width: 0; border: 1px solid var(--surface-muted); border-radius: 8px; background: var(--surface); color: var(--text-secondary); padding: 8px 7px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.mv-font-local-actions button:hover { border-color: var(--primary); color: var(--primary); }
.mv-font-local-actions button:disabled, .mv-font-local-actions button.is-unavailable { cursor: not-allowed; opacity: 0.55; }
.mv-font-local-actions svg { width: 14px; height: 14px; }
.mv-font-list { flex: 1 1 auto; min-height: 240px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); }
.mv-font-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) 22px; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 9px 14px; border: none; border-bottom: 1px solid var(--surface-muted); background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.mv-font-item:hover { background: var(--surface-soft); }
.mv-font-item.is-selected { background: var(--safe-bg); }
.mv-font-item-source { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 3px 5px; border-radius: 999px; background: var(--surface-muted); color: var(--text-secondary); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.mv-font-item-name { min-width: 0; overflow: hidden; color: var(--text); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.mv-font-item-check { color: var(--primary); font-size: 16px; font-weight: 900; opacity: 0; }
.mv-font-item.is-selected .mv-font-item-check { opacity: 1; }
.mv-font-message { display: block; padding: 24px 16px; color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.5; text-align: center; }
.mv-font-overlay { position: fixed; inset: 0; z-index: 1200; background: transparent; }
.mv-font-status { min-height: 15px; color: var(--text-secondary); font-size: 11px; font-weight: 700; line-height: 1.35; }
.mv-font-status.is-error { color: var(--risk-text); }

.mv-theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mv-preset-family-filters { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding: 1px 1px 3px; scrollbar-width: none; }
.mv-preset-family-filters::-webkit-scrollbar { display: none; }
.mv-preset-family-filter { flex: 0 0 auto; border: 1px solid var(--surface-muted); border-radius: 999px; background: var(--surface); color: var(--text-secondary); padding: 6px 10px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; transition: border-color 0.12s, background 0.12s, color 0.12s; }
.mv-preset-family-filter:hover { border-color: var(--text-secondary); color: var(--text); }
.mv-preset-family-filter.is-active { border-color: var(--primary); background: var(--safe-bg); color: var(--primary-border); }
.mv-style-presets { display: flex; gap: 8px; overflow-x: auto; padding: 0 1px 5px; scrollbar-width: thin; }
.mv-preset-card { display: flex; flex: 0 0 132px; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border: 1px solid var(--surface-muted); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font-weight: 800; transition: border-color 0.12s, box-shadow 0.12s, background 0.12s, transform 0.12s; box-sizing: border-box; }
.mv-preset-card[hidden] { display: none; }
.mv-preset-card:hover { transform: translateY(-1px); }
.mv-preset-card:hover { border-color: var(--text-secondary); }
.mv-preset-card.is-active { border-color: var(--primary); background: var(--safe-bg); box-shadow: inset 0 0 0 1px var(--primary); }
.mv-preset-preview { position: relative; display: block; height: 58px; overflow: hidden; background: #17213a; }
.mv-preset-preview::before,
.mv-preset-preview::after { content: ""; position: absolute; pointer-events: none; }
.mv-preset-art { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; border-radius: 5px; transform: translate(-50%, -58%); background: linear-gradient(145deg, #fdc467, #e95979 48%, #6c68c8); box-shadow: 0 7px 14px rgba(0, 0, 0, 0.28); }
.mv-preset-lyric { position: absolute; left: 18%; right: 18%; bottom: 8px; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.92); box-shadow: 0 -7px 0 rgba(255,255,255,0.54); }
.mv-preset-preview--karaoke { background: radial-gradient(ellipse at 50% 14%, #fff4a5 0 8%, #f5a93f 18%, #232448 53%, #11152b 100%); }
.mv-preset-preview--karaoke .mv-preset-art { background: linear-gradient(145deg, #fc6c7b, #5b347d); border-radius: 50%; }
.mv-preset-preview--karaoke .mv-preset-lyric { background: linear-gradient(90deg, #ffd24a 0 48%, #fff 48%); box-shadow: 0 -7px 0 rgba(255,255,255,0.58); }
.mv-preset-preview--cinematic { background: linear-gradient(125deg, #101b2b 3%, #395b78 52%, #d28b56 100%); }
.mv-preset-preview--cinematic::after { inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.45), transparent 45%, rgba(0,0,0,0.28)); }
.mv-preset-preview--cinematic .mv-preset-art { width: 38px; height: 26px; border-radius: 2px; background: linear-gradient(145deg, #f5c87b, #815f66); }
.mv-preset-preview--vinyl { background: radial-gradient(circle at 50% 38%, #2f3a55 0 11%, #111522 12% 31%, #435273 32% 33%, #10131d 34% 48%, #283247 49% 50%, #10131d 51%); }
.mv-preset-preview--vinyl .mv-preset-art { width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -97%); background: linear-gradient(145deg, #f3b65f, #de5d89); box-shadow: none; }
.mv-preset-preview--dreamy { background: linear-gradient(135deg, #30265d, #8268b4 46%, #e1a3ba); }
.mv-preset-preview--dreamy::before { inset: -35% 25% 5% -15%; background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.3) 45%, transparent 68%); transform: rotate(-9deg); }
.mv-preset-preview--dreamy .mv-preset-art { border: 1px solid rgba(255,255,255,0.42); background: linear-gradient(145deg, rgba(255,255,255,0.42), rgba(154,116,196,0.62)); box-shadow: 0 7px 16px rgba(38,23,73,0.42); }
.mv-preset-preview--minimal { background: linear-gradient(140deg, #151a27, #2d3345); }
.mv-preset-preview--minimal .mv-preset-art { display: none; }
.mv-preset-preview--minimal .mv-preset-lyric { left: 24%; right: 24%; bottom: 17px; height: 9px; background: rgba(255,255,255,0.94); box-shadow: 0 -11px 0 rgba(255,255,255,0.6); }
.mv-preset-preview--pop { background: linear-gradient(115deg, #7b62f6, #ea6cad 46%, #ffbf64); }
.mv-preset-preview--pop::before { width: 74px; height: 74px; top: -42px; right: -11px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.mv-preset-preview--pop .mv-preset-art { background: linear-gradient(145deg, #fbf68f, #ff719e 58%, #7a61ed); }
.mv-preset-preview--bold { background-color: #1c2b34; background-image: radial-gradient(#61dc90 1px, transparent 1px), radial-gradient(#f5f0be 1px, transparent 1px), linear-gradient(140deg, #263f47, #132127); background-size: 15px 15px, 23px 23px, 100% 100%; background-position: 0 0, 7px 10px, 0 0; }
.mv-preset-preview--bold .mv-preset-art { width: 37px; height: 37px; background: linear-gradient(145deg, #7de35c, #1e7b64); }
.mv-preset-preview--bold .mv-preset-lyric { left: 14%; right: 14%; background: #58cc02; box-shadow: 0 -7px 0 rgba(255,255,255,0.8); }
.mv-preset-preview--editorial { background: linear-gradient(120deg, #111a20, #415963 62%, #18262c); }
.mv-preset-preview--editorial::before { inset: 8px 58% 8px 9px; border: 1px solid rgba(143,227,106,0.55); }
.mv-preset-preview--editorial::after { inset: 8px 9px 8px 58%; border: 1px solid rgba(255,255,255,0.2); }
.mv-preset-preview--editorial .mv-preset-art { left: 34%; width: 31px; height: 38px; border-radius: 2px; background: linear-gradient(145deg, #8fe36a, #2f6e62); }
.mv-preset-preview--editorial .mv-preset-lyric { left: 51%; right: 9%; bottom: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.94); box-shadow: 0 -8px 0 rgba(255,255,255,0.62); }
.mv-preset-preview--lyrical-warm { background: radial-gradient(circle at 74% 18%, #f6d39b, transparent 24%), linear-gradient(135deg, #3c2731, #805b56 52%, #d19a68); }
.mv-preset-preview--lyrical-warm::after { inset: 0; background: linear-gradient(90deg, rgba(36,20,24,0.44), transparent 55%); }
.mv-preset-preview--lyrical-warm .mv-preset-art { width: 36px; height: 36px; border-radius: 7px; background: linear-gradient(145deg, #f5d6ad, #9b6571); }
.mv-preset-preview--lyrical-warm .mv-preset-lyric { background: #fff3dd; box-shadow: 0 -7px 0 rgba(245,213,172,0.58); }
.mv-preset-preview--lyrical-moonlight { background: linear-gradient(128deg, #101733, #3c3970 52%, #9682bb); }
.mv-preset-preview--lyrical-moonlight::before { inset: -22px 34px 10px -20px; transform: rotate(-16deg); background: linear-gradient(100deg, transparent 24%, rgba(207,198,255,0.4), transparent 70%); }
.mv-preset-preview--lyrical-moonlight .mv-preset-art { border-radius: 10px; background: linear-gradient(145deg, #c9c3ed, #66629a); }
.mv-preset-preview--lyrical-moonlight .mv-preset-lyric { background: #f2efff; box-shadow: 0 -7px 0 rgba(207,198,255,0.62); }
.mv-preset-preview--youth-spark { background-color: #36bfd5; background-image: radial-gradient(circle at 18% 23%, #fff7a4 0 4px, transparent 5px), radial-gradient(circle at 81% 31%, #ff719e 0 6px, transparent 7px), linear-gradient(140deg, #36c8d8, #7a66ec 58%, #ff7cac); }
.mv-preset-preview--youth-spark .mv-preset-art { border-radius: 13px; background: linear-gradient(145deg, #fff67e, #ff708e 53%, #7b67ef); transform: translate(-50%, -60%) rotate(-5deg); }
.mv-preset-preview--youth-spark .mv-preset-lyric { background: #fff47b; box-shadow: 0 -7px 0 rgba(255,255,255,0.78); }
.mv-preset-preview--youth-candy { background: linear-gradient(120deg, #ff85bb, #ffbe69 46%, #69ded0); }
.mv-preset-preview--youth-candy::before { width: 62px; height: 62px; top: -34px; left: -8px; border-radius: 50%; border: 9px solid rgba(255,255,255,0.2); }
.mv-preset-preview--youth-candy .mv-preset-art { width: 30px; height: 40px; border-radius: 4px; background: linear-gradient(160deg, #6fe0cd, #fc77b0); transform: translate(-66%, -58%) rotate(5deg); }
.mv-preset-preview--youth-candy .mv-preset-lyric { background: #77ffe0; box-shadow: 0 -7px 0 rgba(255,255,255,0.72); }
.mv-preset-preview--rap-neon { background-color: #07110d; background-image: linear-gradient(rgba(200,255,61,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(200,255,61,0.1) 1px, transparent 1px), linear-gradient(145deg, #101713, #17223c); background-size: 13px 13px, 13px 13px, 100% 100%; }
.mv-preset-preview--rap-neon::after { left: 9px; top: 8px; width: 30px; height: 4px; background: #c8ff3d; box-shadow: 48px 31px 0 #3986ff; }
.mv-preset-preview--rap-neon .mv-preset-art { left: 56%; border-radius: 1px; background: linear-gradient(145deg, #c8ff3d, #215e55); transform: translate(-50%, -58%) rotate(4deg); }
.mv-preset-preview--rap-neon .mv-preset-lyric { left: 10%; right: 10%; height: 6px; background: #c8ff3d; box-shadow: 0 -8px 0 rgba(255,255,255,0.8); }
.mv-preset-preview--rap-monochrome { background: linear-gradient(120deg, #050505 0 42%, #2e2e2e 42% 61%, #0b0b0b 61%); }
.mv-preset-preview--rap-monochrome::before { inset: 7px 9px auto auto; width: 28px; height: 18px; border: 2px solid rgba(255,255,255,0.28); transform: skew(-12deg); }
.mv-preset-preview--rap-monochrome .mv-preset-art { width: 42px; height: 25px; border-radius: 0; background: linear-gradient(145deg, #f2f2f2, #5e5e5e); transform: translate(-50%, -68%) rotate(-3deg); }
.mv-preset-preview--rap-monochrome .mv-preset-lyric { left: 12%; right: 12%; height: 7px; border-radius: 0; background: #ffffff; box-shadow: 0 -9px 0 rgba(255,255,255,0.42); }
.mv-preset-copy { display: flex; flex-direction: column; gap: 2px; padding: 8px 9px 9px; }
.mv-preset-family { color: var(--primary-border); font-size: 9px; font-weight: 900; letter-spacing: 0.06em; line-height: 1.2; text-transform: uppercase; }
.mv-preset-name { font-size: 13px; }
.mv-preset-sub { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.mv-preset-feedback { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: var(--safe-bg); color: var(--text-secondary); font-size: 11px; font-weight: 800; line-height: 1.3; }
.mv-preset-feedback button { flex: 0 0 auto; border: none; background: transparent; color: var(--primary-border); padding: 2px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.mv-component-mixer { margin-top: 10px; padding: 11px; border: 1px solid var(--surface-muted); border-radius: 11px; background: var(--surface-soft); }
.mv-component-mixer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mv-component-mixer-head > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mv-component-mixer-head strong { color: var(--text); font-size: 12px; }
.mv-component-mixer-head small { border-radius: 999px; background: var(--surface-muted); color: var(--text-secondary); padding: 2px 6px; font-size: 8px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.mv-component-mixer-reset { flex: 0 0 auto; border: none; background: transparent; color: var(--primary-border); padding: 3px; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.mv-component-mixer-reset:disabled { color: var(--text-secondary); cursor: default; opacity: 0.45; }
.mv-component-mixer-hint { margin: 6px 0 9px; color: var(--text-secondary); font-size: 10px; font-weight: 700; line-height: 1.4; }
.mv-component-mixer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.mv-component-select { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.mv-component-select > span { color: var(--text-secondary); font-size: 9px; font-weight: 900; }
.mv-component-select select { width: 100%; min-width: 0; height: 31px; border: 1px solid var(--surface-muted); border-radius: 7px; background: var(--surface); color: var(--text); padding: 4px 22px 4px 7px; font: inherit; font-size: 10px; font-weight: 800; text-overflow: ellipsis; }
.mv-component-mixer.is-incompatible { border-color: color-mix(in srgb, var(--risk-text) 30%, var(--surface-muted)); }
.mv-component-mixer.is-incompatible .mv-component-mixer-hint { color: var(--risk-text); }
.mv-component-mixer fieldset:disabled { opacity: 0.48; }
.mv-atomic-tuning { margin-top: 12px; padding: 12px; border: 1px solid var(--surface-muted); border-radius: 12px; background: var(--surface-soft); }
.mv-atomic-tuning-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mv-atomic-tuning-heading strong { font-size: 13px; }
.mv-atomic-tuning-heading button { border: none; background: transparent; color: var(--primary-border); padding: 3px; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.mv-atomic-tuning-hint { margin: 6px 0 10px; color: var(--text-secondary); font-size: 10px; font-weight: 700; line-height: 1.4; }
.mv-atomic-tuning-grid { display: flex; flex-direction: column; gap: 7px; }
.mv-atomic-tuning-row { display: flex; flex-direction: column; gap: 5px; padding: 8px 9px; border-radius: 9px; background: var(--surface); }
.mv-atomic-tuning-row > span { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.mv-atomic-tuning-row b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mv-atomic-tuning-row small { border-radius: 99px; background: var(--surface-muted); color: var(--text-secondary); padding: 2px 5px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.mv-atomic-tuning-row output { min-width: 34px; color: var(--text-secondary); font-size: 9px; font-weight: 900; text-align: right; }
.mv-atomic-tuning-row input[type="range"] {
  --fill-pct: 0%;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
}
.mv-atomic-tuning-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--primary) 0, var(--primary) var(--fill-pct), var(--surface-muted) var(--fill-pct), var(--surface-muted) 100%);
}
.mv-atomic-tuning-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--primary-border), 0 2px 7px rgba(31,42,31,0.16);
}
.mv-atomic-tuning-row input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
}
.mv-atomic-tuning-row input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
}
.mv-atomic-tuning-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  cursor: pointer;
}
.mv-audio-response { border-color: rgba(95, 202, 255, .22); }
.mv-audio-response .mv-atomic-tuning-heading small { color: var(--primary-border); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.mv-audio-response select { width: 100%; min-height: 34px; border: 1px solid var(--surface-muted); border-radius: 9px; background: var(--surface-soft); color: inherit; padding: 0 9px; }
.mv-bg-videoview { display: grid; gap: 9px; margin-top: 10px; }
.mv-bg-video-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--surface-muted); border-radius: 11px; background: var(--surface-soft); }
.mv-bg-video-card > svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--primary-border); }
.mv-bg-video-card > div { display: grid; min-width: 0; gap: 2px; }
.mv-bg-video-card strong, .mv-bg-video-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-bg-video-card strong { font-size: 11px; }
.mv-bg-video-card span, .mv-bg-video-loop { color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.mv-bg-video-actions { display: flex; gap: 7px; }
.mv-bg-video-actions .mv-mini-btn { flex: 1; }
.mv-bg-video-loop { display: flex; align-items: center; gap: 7px; }
.mv-bg-video-loop select { margin-left: auto; border: 1px solid var(--surface-muted); border-radius: 7px; background: var(--surface-soft); color: inherit; padding: 4px 7px; font: inherit; font-size: 9px; font-weight: 800; }
.mv-col-right .mv-col-body.is-organized .mv-presets-section { margin-bottom: 0; }
.mv-theme-card { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--surface-muted); border-radius: 10px; padding: 11px 10px; background: var(--surface); cursor: pointer; text-align: left; transition: transform 0.08s, box-shadow 0.08s, border-color 0.12s; box-shadow: none; }
.mv-theme-card:hover { transform: translateY(-2px); }
.mv-theme-card:active { transform: translateY(1px); }
.mv-theme-card.active { border-color: var(--primary); background: var(--safe-bg); box-shadow: inset 0 0 0 1px var(--primary); }
.mv-theme-grid.mv-theme-grid-grouped { display: grid; grid-template-columns: 1fr; gap: 14px; }
.mv-theme-group { display: grid; gap: 8px; min-width: 0; }
.mv-theme-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; }
.mv-theme-group-heading strong { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.mv-theme-group-heading small { font-size: 10px; line-height: 1.2; color: var(--text-muted); text-align: right; }
.mv-theme-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mv-theme-name { font-size: 14px; font-weight: 900; color: var(--text); }
.mv-theme-desc { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.mv-visual-profile { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--surface-muted); }
.mv-visual-profile.dl-hidden { display: none; }
.mv-visual-profile-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.mv-visual-profile-heading strong { color: var(--text); font-size: 13px; font-weight: 900; }
.mv-visual-profile-heading span { color: var(--text-secondary); font-size: 10px; font-weight: 800; }
.mv-profile-grid { display: grid; grid-template-columns: 1fr; gap: 7px; }
.mv-profile-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 9px; align-items: center; width: 100%; padding: 7px; border: 1px solid var(--surface-muted); border-radius: 10px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: border-color .12s, background .12s, transform .08s; }
.mv-profile-card:hover { transform: translateY(-1px); }
.mv-profile-card.active { border-color: var(--primary); background: var(--safe-bg); box-shadow: inset 0 0 0 1px var(--primary); }
.mv-profile-swatch { display: flex; width: 58px; height: 34px; overflow: hidden; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.mv-profile-swatch i { flex: 1; background: var(--profile-color); }
.mv-profile-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.mv-profile-copy strong { font-size: 12px; font-weight: 900; line-height: 1.25; }
.mv-profile-copy small { overflow: hidden; color: var(--text-secondary); font-size: 10px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.mv-profile-font-mode { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.mv-profile-font-mode select { min-width: 0; height: 32px; border: 1px solid var(--surface-muted); border-radius: 8px; padding: 5px 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; }

.mv-export-controls { display: flex; gap: 16px; flex-wrap: wrap; }
.mv-export-controls .mv-control { flex: 1; min-width: 100px; }
.mv-export-btn { min-width: 132px; font-size: 15px; padding: 12px 22px; }
.mv-export-btn:disabled { background: var(--surface-muted); color: var(--text-secondary); box-shadow: none; opacity: 1; }
.mv-export-progress { margin-top: 14px; }
.mv-progress-bar { width: 100%; height: 14px; background: var(--surface-muted); border-radius: var(--radius-full); overflow: hidden; border: 2px solid var(--surface-muted); }
.mv-progress-fill { height: 100%; width: 0; background: var(--primary); border-radius: var(--radius-full); transition: width 0.2s; }
.mv-progress-text { display: block; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--text-secondary); }

.mv-num-input { width: 72px; border: 3px solid var(--surface-muted); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 6px 8px; font-family: inherit; font-size: 13px; font-weight: 800; text-align: center; }
.mv-sel-actions { display: flex; gap: 8px; margin-top: 12px; }

.mv-advanced-panel,
.mv-control-details { margin: 0 0 14px; border: 1px solid var(--surface-muted); border-radius: 12px; background: var(--surface); }
.mv-col-right > .mv-advanced-panel,
.mv-col-right .mv-rtab-panel > .mv-advanced-panel { margin-bottom: 0; }
.mv-col-right .mv-advanced-panel,
.mv-col-right .mv-control-details { border-color: color-mix(in srgb, var(--surface-muted) 82%, var(--text-dim)); box-shadow: 0 5px 16px rgba(31,42,31,0.035); }
.mv-advanced-panel > summary,
.mv-control-details > summary { cursor: pointer; padding: 11px 13px; color: var(--text-secondary); font-size: 13px; font-weight: 900; list-style: none; }
.mv-col-right .mv-advanced-panel > summary,
.mv-col-right .mv-control-details > summary { padding: 12px 14px; border-radius: 11px; transition: background 0.12s, color 0.12s; }
.mv-col-right .mv-advanced-panel > summary:hover,
.mv-col-right .mv-control-details > summary:hover { background: var(--surface-soft); color: var(--text); }
.mv-advanced-panel > summary::-webkit-details-marker,
.mv-control-details > summary::-webkit-details-marker { display: none; }
.mv-advanced-panel > summary::after,
.mv-control-details > summary::after { content: "+"; float: right; color: var(--primary-border); font-size: 17px; line-height: 14px; }
.mv-advanced-panel[open] > summary::after,
.mv-control-details[open] > summary::after { content: "−"; }
.mv-advanced-content { padding: 0 13px 13px; }
.mv-subsection + .mv-subsection { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--surface-muted); }
.mv-subsection h3 { margin: 0 0 10px; font-size: 13px; }
.mv-control-details { margin: 12px 0 0; }
.mv-control-details .mv-style-controls { padding: 0 13px 13px; }

/* ---------- Export modal ---------- */
.mv-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  padding: 24px;
  background: rgba(8,12,10,0.62);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.mv-modal-overlay.dl-hidden { display: none; }
.mv-modal {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--surface-muted) 82%, var(--text-dim));
  border-radius: 20px;
  width: 520px; max-width: 100%; max-height: calc(100vh - 48px);
  overflow: auto;
  box-shadow: 0 28px 80px rgba(0,0,0,0.32), 0 2px 8px rgba(0,0,0,0.12);
}
.mv-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 20px 22px;
  border-bottom: 1px solid var(--surface-muted);
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border-radius: 20px 20px 0 0;
}
.mv-modal-title-wrap { display: flex; align-items: center; min-width: 0; gap: 12px; }
.mv-modal-title-wrap > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.mv-modal-title-wrap > div > span { color: var(--text); font-size: 17px; font-weight: 900; line-height: 1.25; }
.mv-modal-title-wrap small { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.35; }
.mv-modal-title-icon,
.mv-export-overview-icon {
  display: grid; flex: 0 0 auto; place-items: center;
  background: var(--safe-bg); color: var(--safe-text);
}
.mv-modal-title-icon { width: 38px; height: 38px; border-radius: 12px; }
.mv-modal-title-icon svg { width: 19px; height: 19px; }
.mv-modal-close {
  display: grid; flex: 0 0 auto; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.mv-modal-close:hover { border-color: var(--surface-muted); background: var(--surface-soft); color: var(--text); }
.mv-modal-close svg { width: 18px; height: 18px; }
.mv-modal-body { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.mv-modal-body .mv-control { min-width: 0; margin: 0; }
.mv-modal-body .mv-control > span { margin-bottom: 7px; font-size: 12px; }
.mv-modal-body .mv-control select { width: 100%; min-height: 42px; }
.mv-export-overview { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: start; padding: 16px; border: 1px solid var(--surface-muted); border-radius: 14px; background: var(--surface-soft); }
.mv-export-overview-icon { width: 42px; height: 42px; border-radius: 12px; }
.mv-export-overview-icon svg { width: 20px; height: 20px; }
.mv-export-overview-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.mv-export-overview-title { color: var(--text-secondary); font-size: 11px; font-weight: 900; letter-spacing: 0.6px; text-transform: uppercase; }
.mv-export-overview strong { overflow-wrap: anywhere; color: var(--text); font-size: 14px; font-weight: 900; line-height: 1.4; }
.mv-export-overview-copy > span:not(.mv-export-overview-title) { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.45; }
.mv-export-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mv-export-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; margin: 0; padding: 15px 16px; border: 1px solid var(--surface-muted); border-radius: 14px; background: var(--surface-soft); }
.mv-export-progress .mv-progress-bar { grid-column: 1 / -1; height: 10px; border: 0; background: var(--surface-muted); }
.mv-export-progress-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.mv-export-progress .mv-progress-text { margin: 0; color: var(--text); font-size: 13px; line-height: 1.35; }
.mv-export-keep-open { display: block; color: var(--text-secondary); font-size: 11px; font-weight: 700; line-height: 1.4; }
.mv-export-cancel { margin: 0; border: 1px solid var(--risk-text); border-radius: 9px; background: transparent; color: var(--risk-text); padding: 8px 11px; font: inherit; font-size: 12px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.mv-export-cancel:hover { background: var(--risk-bg); }
.mv-export-result { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 15px 16px; border: 1px solid rgba(88, 204, 2,0.4); border-radius: 14px; background: var(--safe-bg); }
.mv-export-result i, .mv-export-result svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--safe-text); }
.mv-export-result div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.mv-export-result strong { color: var(--text); font-size: 14px; font-weight: 900; }
.mv-export-result span { color: var(--text-secondary); font-size: 12px; font-weight: 700; line-height: 1.4; }
.mv-export-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.mv-export-actions .mv-hint { min-height: 0; margin: 0; font-size: 12px; line-height: 1.45; }
.mv-modal .mv-export-btn { position: relative; width: 100%; min-height: 48px; margin: 0; border-radius: 12px; }
.mv-modal .mv-export-btn.is-loading,
.mv-modal .mv-export-btn.is-loading:disabled { background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-dark, #46a302); cursor: wait; }
.mv-modal .mv-export-btn.is-loading::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 9px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -3px; animation: mv-export-spin 0.75s linear infinite;
}
.mv-modal.is-exporting .mv-export-settings { opacity: 0.58; }
.mv-modal.is-exporting .mv-modal-close { cursor: pointer; }
@keyframes mv-export-spin { to { transform: rotate(360deg); } }

/* ---------- Search introduction below the studio ---------- */
.mv-seo-intro { width: min(1080px, calc(100% - 48px)); margin: 56px auto 48px; padding: 34px 36px; border: 1px solid var(--surface-muted); border-radius: 18px; background: var(--surface); box-shadow: 0 14px 38px rgba(31,42,31,0.06); text-align: center; }
.mv-seo-eyebrow { display: inline-block; margin-bottom: 9px; color: var(--primary-border); font-size: 12px; font-weight: 900; letter-spacing: 0.8px; text-transform: uppercase; }
.mv-seo-intro h1 { max-width: 780px; margin: 0 auto 14px; color: var(--text); font-size: clamp(30px, 4vw, 46px); font-weight: 900; line-height: 1.12; letter-spacing: -1.2px; }
.mv-seo-intro > p { max-width: 790px; margin: 0 auto 20px; }
.mv-seo-points { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin: 22px 0; }
.mv-seo-points span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; background: var(--safe-bg); color: var(--text); font-size: 13px; font-weight: 800; }
.mv-seo-points i, .mv-seo-points svg { width: 16px; height: 16px; color: var(--primary-border); }
.mv-seo-intro .mv-seo-privacy { max-width: 820px; margin-bottom: 0; padding-top: 18px; border-top: 1px solid var(--surface-muted); font-size: 14px; line-height: 1.55; }

/* ---------- Long-form product content ---------- */
.mv-content-section { box-sizing: border-box; width: min(1080px, calc(100% - 48px)); margin: 72px auto; }
.mv-content-heading { max-width: 760px; margin-bottom: 28px; }
.mv-content-heading .mv-section-label { display: block; margin-bottom: 8px; color: var(--primary-border); font-size: 12px; font-weight: 900; letter-spacing: 0.75px; text-transform: uppercase; }
.mv-content-heading h2 { margin: 0 0 12px; font-size: clamp(27px, 3vw, 36px); line-height: 1.18; letter-spacing: -0.55px; }
.mv-content-heading p { margin: 0; font-size: 16px; line-height: 1.7; }

.mv-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0 !important; list-style: none; counter-reset: none; }
.mv-step-list > li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; min-width: 0; margin: 0 !important; padding: 20px; border: 1px solid var(--surface-muted); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px rgba(31,42,31,0.045); }
.mv-step-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--safe-bg); color: var(--safe-text); font-size: 15px; font-weight: 900; }
.mv-step-list h3, .mv-feature-grid h3, .mv-format-grid h3 { margin: 1px 0 7px; font-size: 17px; line-height: 1.3; }
.mv-step-list p, .mv-feature-grid p, .mv-format-grid p { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.62; }

.mv-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mv-feature-grid article { min-width: 0; padding: 22px; border: 1px solid var(--surface-muted); border-radius: 16px; background: var(--surface); }
.mv-feature-grid article > i, .mv-feature-grid article > svg { width: 22px; height: 22px; margin-bottom: 14px; color: var(--primary-border); }

.mv-format-section { padding: 30px; border: 1px solid var(--surface-muted); border-radius: 20px; background: var(--surface-soft); }
.mv-format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.mv-format-grid article { min-width: 0; }
.mv-format-grid code { white-space: nowrap; }

.mv-faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mv-faq-list .faq-item { min-width: 0; margin: 0; border-width: 1px; border-radius: 16px; box-shadow: 0 8px 24px rgba(31,42,31,0.04); }
.mv-faq-list .faq-item h3 { cursor: default; line-height: 1.35; }
.mv-faq-list .faq-item p { font-size: 15px; line-height: 1.65; }

/* ---------- Start mode ---------- */
.mv-app.mv-start-mode .mv-topbar,
.mv-app.mv-start-mode .mv-col-left,
.mv-app.mv-start-mode .mv-col-right,
.mv-app.mv-start-mode .mv-canvas-toolbar,
.mv-app.mv-start-mode .mv-transport,
.mv-app.mv-start-mode .mv-timeline,
.mv-app.mv-start-mode .mv-preview-section { display: none !important; }
.mv-app.mv-start-mode .mv-col-center { width: 100%; border: none; align-items: center; justify-content: center; }
.mv-app.mv-start-mode .mv-stage { width: 100%; padding-inline: 24px; }
.mv-app.mv-start-mode .mv-stage-empty { display: flex !important; }
.mv-app.mv-start-mode .mv-resizer { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mv-col-left { width: 280px; }
  .mv-col-right { width: 320px; }
}
@media (max-width: 860px) {
  .mv-export-status { display: none; }
  .mv-app { height: auto; }
  .mv-workspace { flex-direction: column; overflow: visible; }
  .mv-col-left, .mv-col-right { width: 100% !important; border: none; border-bottom: 1px solid var(--surface-muted); }
  .mv-resizer { display: none; }
  .mv-col-center { min-height: 70vh; }
  .mv-preview-wrap { width: 100%; height: auto; }
  .mv-feature-grid, .mv-format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-format-grid article:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .mv-modal-overlay { padding: 12px; align-items: flex-start; }
  .mv-modal { max-height: calc(100vh - 24px); border-radius: 16px; }
  .mv-modal-head { padding: 16px; border-radius: 16px 16px 0 0; }
  .mv-modal-title-wrap small { display: none; }
  .mv-modal-body { gap: 15px; padding: 16px; }
  .mv-export-settings { gap: 8px; }
  .mv-export-progress { grid-template-columns: 1fr; padding: 14px; }
  .mv-export-progress .mv-progress-bar { grid-column: 1; }
  .mv-export-cancel { width: 100%; }
  .mv-topbar { gap: 10px; padding-inline: 12px; }
  .mv-topbar-center { display: none; }
  .mv-save-status { display: none; }
  .mv-topbar-right { margin-left: auto; }
  .mv-topbar .mv-export-btn { max-width: 42vw; min-width: 108px; padding-inline: 12px; }
  .mv-seo-intro { width: calc(100% - 28px); margin: 36px auto; padding: 26px 18px; }
  .mv-seo-intro h1 { font-size: 30px; letter-spacing: -0.6px; }
  .mv-content-section { width: calc(100% - 28px); margin: 52px auto; }
  .mv-content-heading { margin-bottom: 22px; }
  .mv-step-list, .mv-feature-grid, .mv-format-grid, .mv-faq-list { grid-template-columns: 1fr; }
  .mv-step-list > li { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 17px; }
  .mv-step-number { width: 34px; height: 34px; border-radius: 10px; }
  .mv-feature-grid article { padding: 19px; }
  .mv-format-section { padding: 22px 18px; }
  .mv-format-grid { gap: 22px; }
  .mv-format-grid article:last-child { grid-column: auto; }
  .mv-stage, .mv-app.mv-start-mode .mv-stage { padding: 14px; }
  .mv-stage-empty { padding: 24px 18px; }
  .mv-start-methods { flex-direction: column; }
  .mv-start-divider { justify-content: center; height: 14px; }
  .mv-start-divider::before, .mv-start-divider::after { display: block; flex: 1; height: 1px; margin: 0 8px; background: var(--surface-muted); }
  .mv-start-upload { min-height: 88px; }
  .mv-tl-hint { display: none; }
  .mv-context-toolbar { flex-wrap: wrap; justify-content: center; width: calc(100% - 20px); }
}


/* ===== Basic (2D) / Advanced (3D) mode switch ===== */
.mv-mode-switch {
  position: sticky;
  top: -12px;
  z-index: 6;
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: var(--surface-muted);
  border-radius: 11px;
}
.mv-mode-switch button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 9px 4px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.mv-mode-switch button.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-btn-pressed);
}

/* Show only the relevant theme group per mode */
body.mv-mode-basic .mv-theme-group--3d { display: none; }
body.mv-mode-advanced .mv-theme-group--2d { display: none; }

/* Advanced (3D) hides the 2D component tabs (Templates / Design) */
body.mv-mode-advanced .mv-rtab[data-rtab="presets"],
body.mv-mode-advanced .mv-rtab[data-rtab="design"] { display: none; }
body.mv-mode-advanced .mv-rtab-panel[data-rtab="presets"],
body.mv-mode-advanced .mv-rtab-panel[data-rtab="design"] { display: none; }

.mv-color-row { display: flex; align-items: center; gap: 6px; }
.mv-atomic-tuning-row input[type="color"] {
  width: 46px;
  height: 32px;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--surface-muted);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.mv-atomic-tuning-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.mv-atomic-tuning-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.mv-atomic-clear {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--surface-muted);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.mv-atomic-clear:hover { border-color: var(--risk-text); color: var(--risk-text); }
