/* Wizard-specific styles. Extends design.css. */

.wizard-step {
  display: none;
  animation: wizard-step-in 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.wizard-step.is-active { display: block; }
@keyframes wizard-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wizard-step h2 {
  margin-bottom: var(--space-2);
}
.wizard-step > .muted {
  margin-bottom: var(--space-5);
  font-size: 15px;
}

/* Mode selection grid */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
@media (max-width: 1024px) {
  .mode-grid { grid-template-columns: 1fr; }
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}
.mode-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.mode-card.is-selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus), var(--shadow-md);
}
.mode-card .mode-check {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-on);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.mode-card.is-selected .mode-check { display: inline-flex; }

.mode-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  transition: transform var(--transition);
}
.mode-card:hover .mode-icon {
  transform: rotate(-4deg) scale(1.05);
}
.mode-icon svg { width: 26px; height: 26px; }

/* Different hue per card for friendly variety */
.mode-card[data-mode="simple"] .mode-icon   { background: var(--hue-sky);   color: var(--hue-sky-ink); }
.mode-card[data-mode="ai_clips"] .mode-icon { background: var(--hue-lilac); color: var(--hue-lilac-ink); }
.mode-card[data-mode="multicam"] .mode-icon { background: var(--hue-peach); color: var(--hue-peach-ink); }

.mode-card .badge { align-self: flex-start; }

.mode-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  color: var(--text-0);
}
.mode-desc {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
}

/* Help accordion */
.help-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: var(--space-2) 0;
  font-size: 14px;
  font-weight: 550;
}
.help-toggle:hover { color: var(--accent-hover); }
.help-toggle .caret { transition: transform var(--transition); }
.help-toggle.is-open .caret { transform: rotate(90deg); }
.help-body {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: none;
}
.help-body.is-open { display: block; }
.help-body p { margin: 0 0 var(--space-2) 0; }
.help-body p:last-child { margin-bottom: 0; }

/* Drop zone */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 260px;
  padding: var(--space-5);
  background: var(--bg-1);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-1);
  cursor: pointer;
  text-align: center;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}
.drop-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-0);
}
.drop-zone.is-dragover {
  background: var(--accent-soft);
  border-color: var(--accent);
  border-style: solid;
  color: var(--text-0);
  transform: scale(1.01);
}
.drop-zone.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.drop-zone svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  padding: 8px;
  box-sizing: content-box;
}
.drop-zone-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-0);
}
.drop-zone-sub {
  font-size: 13px;
  color: var(--text-2);
}

.drop-zone-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 768px) {
  .drop-zone-split { grid-template-columns: 1fr; }
}

/* ---- Multi-cam: grouped track sections ---- */
.track-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.track-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
  animation: mode-intro-in 220ms ease-out;
}
.track-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hue-peach);
}
.track-section[data-track="audio"]::before { background: var(--hue-lemon); }
.track-section-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.track-section-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-on, var(--accent-ink, #fff));
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.track-section-text { flex: 1; min-width: 0; }
.track-section-title {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--text-0);
}
.track-section-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.track-section-status {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.track-section-status.is-ok {
  background: var(--success-soft, rgba(5, 150, 105, 0.12));
  color: var(--success, #059669);
  border-color: transparent;
}
.track-section-status.is-warn {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.track-section .drop-zone {
  height: 160px;
}
.track-section .drop-zone svg {
  width: 32px;
  height: 32px;
  padding: 6px;
}
.track-section .drop-zone-title { font-size: 15px; }
.track-list {
  margin: var(--space-3) 0 0 0;
}
.track-list:empty {
  display: none;
}

/* File list */
.file-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0 0 0;
}
.file-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: file-row-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
}
@keyframes file-row-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.file-thumb {
  width: 96px;
  height: 54px;
  background: var(--bg-2);
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.file-thumb.is-skeleton {
  background: var(--bg-3);
  animation: clipit-skeleton-pulse 1400ms ease-in-out infinite;
}
.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-name {
  font-size: 14px;
  font-weight: 550;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-info {
  font-size: 12px;
  color: var(--text-2);
}
.file-status-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.file-progress {
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: var(--space-2);
}
.file-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  border-radius: inherit;
  transition: width 200ms ease;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Counter under file list */
.file-counter {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.file-counter strong {
  color: var(--text-0);
  font-weight: 650;
}

/* Mobile editor banner */
.mobile-banner {
  display: none;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--text-0);
  font-size: 14px;
  margin-bottom: var(--space-4);
  align-items: flex-start;
  gap: var(--space-2);
}
.mobile-banner svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 1px;
}
@media (max-width: 640px) {
  .mobile-banner.is-shown { display: flex; }
}

/* Wizard "tip" callout for instructional copy */
.wizard-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  font-size: 14px;
  color: var(--text-1);
}
.wizard-tip .tip-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hue-lemon);
  color: var(--hue-lemon-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}

/* Smart options panel (AI clips mode only) */
.ai-options {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}
.ai-options-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.ai-options-sub {
  margin: var(--space-1) 0 var(--space-4) 0;
  font-size: 13px;
}
.ai-field {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-3) 0;
  min-width: 0;
}
.ai-field legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  padding: 0;
  margin-bottom: var(--space-2);
}
.ai-field-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.ai-field-grow { flex: 1 1 240px; }
.ai-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.ai-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), border-color var(--transition);
}
.ai-pill:hover { border-color: var(--accent); }
.ai-pill input { display: none; }
.ai-pill.is-selected {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  border-color: var(--accent);
}
.ai-genre-blurb {
  margin: var(--space-2) 0 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2, var(--text-1));
  line-height: 1.45;
}
.ai-genre-blurb-label {
  display: inline-block;
  margin-right: 6px;
  font-weight: 600;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.ai-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-2);
}
.ai-search-suggestions-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  margin-right: 2px;
}
.ai-search-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-search-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.ai-search-chip:hover,
.ai-search-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.ai-search-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ai-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
}
.ai-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Visually-hidden helper for accessible-only headings */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---- Mode-specific intro panel ---- */
.mode-intro {
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  position: relative;
  overflow: hidden;
  animation: mode-intro-in 220ms ease-out;
}
.mode-intro::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hue-sky);
}
.mode-intro[data-mode="ai_clips"]::before { background: var(--hue-lilac); }
.mode-intro[data-mode="multicam"]::before { background: var(--hue-peach); }

@keyframes mode-intro-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.mode-intro-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.mode-intro-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--hue-sky);
  color: var(--hue-sky-ink);
}
.mode-intro[data-mode="ai_clips"] .mode-intro-icon {
  background: var(--hue-lilac); color: var(--hue-lilac-ink);
}
.mode-intro[data-mode="multicam"] .mode-intro-icon {
  background: var(--hue-peach); color: var(--hue-peach-ink);
}
.mode-intro-icon svg { width: 22px; height: 22px; }
.mode-intro-text { min-width: 0; }
.mode-intro-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.mode-intro-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-2, var(--muted, currentColor));
  line-height: 1.5;
}

/* Numbered steps row */
.mode-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: mode-step;
}
.mode-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-1);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.mode-step:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.mode-step-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.mode-step-label {
  font-weight: 500;
  line-height: 1.3;
}

/* ---- Mode-specific tip ---- */
.mode-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  animation: mode-intro-in 220ms ease-out;
}
.mode-tip .tip-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hue-lemon);
  color: var(--hue-lemon-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mode-tip strong { color: var(--text-1); }

/* Multicam drop zone step badges */
.drop-zone {
  position: relative;
}
.drop-zone-step-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Responsive: stack everything on narrow screens */
@media (max-width: 640px) {
  .mode-steps {
    grid-template-columns: 1fr;
  }
  .mode-intro-icon {
    width: 36px; height: 36px;
  }
  .mode-intro-title { font-size: 18px; }
  .ai-field-row { flex-direction: column; }
}

/* Quota / usage line below the file counter */
.upload-quota {
  margin: var(--space-1) 0 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.upload-quota strong { color: var(--text-1); }
.upload-quota.is-warning { color: #b85c00; }
.upload-quota.is-warning strong { color: #b85c00; }

/* Simple-mode optional soundtrack: collapsed-by-default toggle */
#simpleAudioPanel {
  margin-top: var(--space-3);
}
.audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.audio-toggle:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.audio-toggle-icon { transition: transform var(--transition); }
.audio-toggle.is-open .audio-toggle-icon { transform: rotate(45deg); }
.audio-toggle-hint {
  margin: var(--space-3) 0 var(--space-2) 0;
  font-size: 12px;
  line-height: 1.5;
}
.drop-zone-audio {
  margin-top: var(--space-2);
}

/* AI clips source picker — segmented tabs above the drop zone */
.ai-source-picker {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  margin: 0 auto var(--space-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  align-self: center;
}
#step2 .ai-source-picker { display: inline-flex; }
.ai-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.ai-source-tab:hover { color: var(--text-1); }
.ai-source-tab.is-active {
  background: var(--accent);
  color: var(--accent-on, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ai-source-tab svg { flex-shrink: 0; }

/* URL input panel — shown when "Paste a link" tab is active */
.url-input-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  animation: mode-intro-in 220ms ease-out;
}
.url-input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.url-input-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.url-input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.url-input-field:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.18);
}
.url-input-field.is-valid {
  border-color: var(--success, #059669);
}
.url-input-field.is-invalid {
  border-color: var(--danger, #dc2626);
}
.url-input-status {
  font-size: 12px;
  min-height: 16px;
  color: var(--text-2);
}
.url-input-status.is-valid { color: var(--success, #059669); }
.url-input-status.is-invalid { color: var(--danger, #dc2626); }
.url-input-hint {
  margin: var(--space-1) 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
}
.url-input-help {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-2);
}
.url-input-help summary {
  cursor: pointer;
  color: var(--text-1);
  font-weight: 500;
  user-select: none;
}
.url-input-help ul {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  line-height: 1.7;
}
.url-input-help code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 4px;
}

/* ---- File thumb extras: duration overlay, audio waveform, interrupted state ---- */
.file-thumb {
  position: relative;
}
.file-thumb-duration {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.file-thumb-audio {
  background: linear-gradient(135deg, var(--hue-lemon), var(--hue-peach));
}
.audio-waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  height: 60%;
  gap: 2px;
}
.audio-waveform-bar {
  flex: 1;
  background: var(--hue-lemon-ink, rgba(0, 0, 0, 0.55));
  border-radius: 1px;
  min-height: 6%;
}

/* ---- File row: inline-editable camera label, interrupted state ---- */
.file-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.file-label-input {
  margin-top: 4px;
  width: 100%;
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-0);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color var(--transition);
}
.file-label-input:hover { border-color: var(--border-strong); }
.file-label-input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.file-row.is-interrupted {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.file-row.is-interrupted .file-thumb {
  color: var(--accent);
}

/* Accent variant of icon button — used for the "+" re-add button. */
.btn-icon-accent {
  background: var(--accent);
  color: var(--accent-on, var(--accent-ink, #fff));
  border-color: var(--accent);
}
.btn-icon-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Hide the audio drop zone once a master track is uploaded — the slot is already filled. */
.track-section .drop-zone[hidden] { display: none; }

/* ============================================================================
   Wizard hero — matches the home page's eyebrow + accent treatment so /Upload
   feels like a continuation of the landing page, not a different app.
   ============================================================================ */

.wizard-hero {
  padding: var(--space-6) 0 var(--space-5);
  text-align: left;
}
@media (max-width: 640px) {
  .wizard-hero { padding: var(--space-4) 0 var(--space-3); }
}

.wizard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px 6px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-3);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  position: relative;
  flex-shrink: 0;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  opacity: 0;
  animation: wiz-live-pulse 1600ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes wiz-live-pulse {
  0%   { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.wizard-title {
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.034em;
  font-weight: 700;
  margin: 0 0 var(--space-2) 0;
  color: var(--text-0);
}
@media (max-width: 880px) { .wizard-title { font-size: 44px; } }
@media (max-width: 480px) { .wizard-title { font-size: 34px; } }

.hero-accent {
  position: relative;
  display: inline-block;
  color: var(--accent);
  white-space: nowrap;
}
.hero-accent-underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.04em;
  height: 0.14em;
  background: var(--accent-soft);
  border-radius: 999px;
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0);
  animation: wiz-underline-sweep 900ms 250ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes wiz-underline-sweep { to { transform: scaleX(1); } }

.wizard-sub {
  margin: 0;
  font-size: 17px;
  color: var(--text-1);
  font-weight: 500;
  max-width: 520px;
}

/* Stepper — give the active step a slow pulse so it reads as "you are here" */
.wizard-stepper {
  margin-top: 0;
  margin-bottom: var(--space-6);
}
.stepper-item.is-active .stepper-num {
  animation: wiz-step-pulse 2.4s ease-in-out infinite;
}
@keyframes wiz-step-pulse {
  0%, 100% { box-shadow: var(--shadow-focus); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); }
}

/* ============================================================================
   Step 1 — bolder headings + animated mode stage with floating clip-type stickers
   ============================================================================ */

.wizard-step-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 var(--space-2) 0;
}
@media (max-width: 640px) { .wizard-step-title { font-size: 26px; } }
.wizard-step-sub {
  font-size: 15px;
  color: var(--text-1);
  margin-bottom: var(--space-5) !important;
}

.mode-stage {
  position: relative;
  margin-bottom: var(--space-5);
  /* Padding on the sides so absolutely-positioned stickers don't trigger horizontal
     scrolling on narrow viewports. */
  padding: 24px 0;
  isolation: isolate;
}

/* Bolder mode cards: bigger padding, pop on hover, shimmer the border on selected */
.mode-card {
  padding: var(--space-5) var(--space-5) var(--space-4);
  min-height: 240px;
  overflow: hidden;
}
.mode-card .mode-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
}
.mode-card .mode-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.012em;
}
.mode-card .mode-desc {
  font-size: 14px;
  color: var(--text-1);
}
.mode-card.is-selected {
  transform: translateY(-3px);
}
.mode-card.is-selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--accent);
  animation: wiz-card-bar 600ms cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: left center;
}
@keyframes wiz-card-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Mini-art at the bottom of each mode card — gives each option a recognizable preview
   and ties back to the home page's hero card vocabulary (filmstrip, waveform, grid). */
.mode-art {
  margin-top: auto;
  display: flex;
  align-items: center;
  height: 36px;
  width: 100%;
  gap: 4px;
}
.mode-art--filmstrip > span {
  flex: 1;
  height: 28px;
  border-radius: 5px;
  animation: wiz-strip 2.4s ease-in-out infinite;
}
.mode-art--filmstrip > span:nth-child(1) { background: var(--hue-sky);   animation-delay: 0s;   }
.mode-art--filmstrip > span:nth-child(2) { background: var(--hue-lilac); animation-delay: 0.2s; }
.mode-art--filmstrip > span:nth-child(3) { background: var(--hue-peach); animation-delay: 0.4s; }
.mode-art--filmstrip > span:nth-child(4) { background: var(--hue-mint);  animation-delay: 0.6s; }
@keyframes wiz-strip {
  0%, 80%, 100% { transform: scaleY(1); opacity: 0.85; }
  10%           { transform: scaleY(1.1); opacity: 1; }
}
.mode-art--wave {
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}
.mode-art--wave > span {
  display: inline-block;
  width: 4px;
  background: var(--hue-lilac-ink);
  border-radius: 2px;
  animation: wiz-wave 1.4s ease-in-out infinite;
}
.mode-art--wave > span:nth-child(1) { height: 30%; animation-delay: 0s; }
.mode-art--wave > span:nth-child(2) { height: 70%; animation-delay: -0.2s; }
.mode-art--wave > span:nth-child(3) { height: 45%; animation-delay: -0.4s; }
.mode-art--wave > span:nth-child(4) { height: 90%; animation-delay: -0.6s; }
.mode-art--wave > span:nth-child(5) { height: 55%; animation-delay: -0.8s; }
.mode-art--wave > span:nth-child(6) { height: 75%; animation-delay: -1s; }
.mode-art--wave > span:nth-child(7) { height: 35%; animation-delay: -1.2s; }
.mode-art--wave > span:nth-child(8) { height: 65%; animation-delay: -1.4s; }
@keyframes wiz-wave {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}
.mode-art--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 56px;
  width: 60px;
  margin-left: auto;
}
.mode-art--grid > span {
  border-radius: 4px;
  animation: wiz-cam-blink 3s ease-in-out infinite;
}
.mode-art--grid > span:nth-child(1) { background: var(--hue-peach);  animation-delay: 0s;  }
.mode-art--grid > span:nth-child(2) { background: var(--hue-rose);   animation-delay: 0.4s; }
.mode-art--grid > span:nth-child(3) { background: var(--hue-mint);   animation-delay: 0.8s; }
.mode-art--grid > span:nth-child(4) { background: var(--hue-sky);    animation-delay: 1.2s; }
@keyframes wiz-cam-blink {
  0%, 70%, 100% { opacity: 0.85; }
  35%           { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
}

/* Pop the on-card icon when the card is selected so the choice reads loudly */
.mode-card.is-selected .mode-icon {
  transform: rotate(-4deg) scale(1.06);
}

/* Floating clip-type stickers around the mode grid — same vocabulary as the home hero */
.mode-sticker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  z-index: 0;
  white-space: nowrap;
  pointer-events: none;
  border: 1.5px solid transparent;
}
.mode-sticker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
  flex-shrink: 0;
}
.mode-sticker--podcast {
  top: -10px; left: 8%;
  background: var(--hue-rose);
  color: var(--hue-rose-ink);
  transform: rotate(-7deg);
  animation: wiz-sticker-a 4s ease-in-out infinite;
}
.mode-sticker--djset {
  top: -4px; right: 6%;
  background: var(--accent);
  color: var(--accent-on);
  transform: rotate(8deg);
  animation: wiz-sticker-b 3.4s ease-in-out infinite;
}
.mode-sticker--djset::before { background: var(--accent-on); }
.mode-sticker--vlog {
  bottom: -12px; left: 18%;
  background: var(--bg-1);
  color: var(--text-0);
  border-color: var(--text-0);
  transform: rotate(-4deg);
  animation: wiz-sticker-a 5s ease-in-out infinite;
  animation-delay: -1.5s;
}
.mode-sticker--gameplay {
  bottom: -8px; right: 14%;
  background: var(--hue-lemon);
  color: var(--hue-lemon-ink);
  transform: rotate(5deg);
  animation: wiz-sticker-b 4.6s ease-in-out infinite;
  animation-delay: -2s;
}
@keyframes wiz-sticker-a {
  0%, 100% { transform: rotate(var(--rot, -7deg)) translateY(0); }
  50%      { transform: rotate(var(--rot, -7deg)) translateY(-7px); }
}
.mode-sticker--vlog { --rot: -4deg; }
@keyframes wiz-sticker-b {
  0%, 100% { transform: rotate(var(--rot, 8deg)) translate(0, 0); }
  50%      { transform: rotate(var(--rot, 8deg)) translate(-4px, -6px); }
}
.mode-sticker--gameplay { --rot: 5deg; }

/* Hide the noisier stickers on tight viewports so the form doesn't get crowded */
@media (max-width: 880px) {
  .mode-sticker--vlog,
  .mode-sticker--gameplay { display: none; }
}
@media (max-width: 480px) {
  .mode-sticker { display: none; }
}

/* Sparkles for life */
.mode-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  animation: wiz-spark 2.6s ease-in-out infinite;
}
.mode-spark--1 { top: 10%;  left: 35%; background: var(--hue-peach-ink); animation-delay: 0s; }
.mode-spark--2 { top: 55%;  right: 4%; background: var(--accent);        animation-delay: -0.8s; }
.mode-spark--3 { bottom: 12%; left: 4%; background: var(--hue-mint-ink); animation-delay: -1.6s; }
@keyframes wiz-spark {
  0%, 100% { opacity: 0.2; transform: scale(0.6); }
  50%      { opacity: 1;   transform: scale(1.4); }
}
@media (max-width: 480px) {
  .mode-spark { display: none; }
}

/* ============================================================================
   Drop zone — pulse the dashed border in idle state so it reads as "drop here"
   even before the user reaches for a file.
   ============================================================================ */

.drop-zone {
  position: relative;
  isolation: isolate;
}
.drop-zone:not(.is-dragover):not(.is-disabled)::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px dashed var(--accent-soft-hover);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  animation: wiz-drop-pulse 2.6s ease-in-out infinite;
}
@keyframes wiz-drop-pulse {
  0%, 100% { opacity: 0;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.012); }
}
.drop-zone:hover svg,
.drop-zone.is-dragover svg {
  animation: wiz-drop-bounce 700ms cubic-bezier(0.32, 0.72, 0, 1) infinite alternate;
}
@keyframes wiz-drop-bounce {
  from { transform: translateY(0)    scale(1); }
  to   { transform: translateY(-4px) scale(1.05); }
}

/* ============================================================================
   Step 2 — bolder mode intros, animated step list, livelier track sections,
   pulsing "Needed" badges, friendlier tip icon. No new IDs/classes — just
   styling on what's already there.
   ============================================================================ */

/* Mode-intro panel: stronger header, animated reveal already in place via
   `mode-intro-in`. Bump the title size, soften the bg, lift the icon on hover. */
.mode-intro {
  padding: var(--space-5);
  background: var(--bg-1);
  box-shadow: var(--shadow-sm);
}
.mode-intro::before { height: 4px; }

.mode-intro-top { gap: var(--space-4); }

.mode-intro-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-bounce);
}
.mode-intro-icon svg { width: 26px; height: 26px; }
.mode-intro:hover .mode-intro-icon {
  transform: rotate(-6deg) scale(1.06);
}

.mode-intro-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text-0);
  margin-bottom: 6px;
}
@media (max-width: 640px) { .mode-intro-title { font-size: 20px; } }

.mode-intro-sub {
  font-size: 15px;
  color: var(--text-1);
  margin: 0;
}

/* Mode steps: bigger interactive chips with arrow connectors that flicker. */
.mode-steps {
  margin-top: var(--space-4);
  gap: var(--space-3);
}
@media (min-width: 641px) {
  .mode-steps {
    /* Arrow gap on desktop only — on mobile the steps stack and arrows would point wrong */
    gap: var(--space-4);
  }
}

.mode-step {
  position: relative;
  padding: var(--space-3);
  background: var(--bg-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  overflow: visible;
}
.mode-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
/* Arrow between steps on desktop. Pure CSS — chevron via two rotated squares. */
@media (min-width: 641px) {
  .mode-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(var(--space-4) * -1 + 4px);
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--border-strong);
    border-right: 2px solid var(--border-strong);
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.6;
    animation: wiz-arrow-flick 2.6s ease-in-out infinite;
  }
  .mode-step:nth-child(1)::after { animation-delay: 0s; }
  .mode-step:nth-child(2)::after { animation-delay: 0.4s; }
  .mode-step:nth-child(3)::after { animation-delay: 0.8s; }
}
@keyframes wiz-arrow-flick {
  0%, 70%, 100% { opacity: 0.4;  border-color: var(--border-strong); }
  35%           { opacity: 1;    border-color: var(--accent); }
}

.mode-step-num {
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-bounce), box-shadow var(--transition);
}
.mode-step:hover .mode-step-num {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: var(--shadow-focus);
}
.mode-step-label { font-size: 13px; }

/* Track sections (multicam): bigger ringed step numbers, livelier status badges */
.track-section {
  background: var(--bg-1);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.track-section:hover {
  box-shadow: var(--shadow-md);
}
.track-section::before { height: 4px; }

.track-section-num {
  width: 36px;
  height: 36px;
  font-size: 16px;
  box-shadow: var(--shadow-focus);
}
.track-section-title { font-size: 18px; }
.track-section-status {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 5px 12px;
}
.track-section-status:not(.is-ok) {
  /* Soft attention pulse — turns the ring around the badge to accent and back. */
  animation: wiz-status-attn 2s ease-in-out infinite;
}
@keyframes wiz-status-attn {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
}
.track-section-status.is-ok {
  /* When satisfied, settle without pulse and add a subtle check vibe. */
  animation: none;
}

/* AI options panel — feels like a small control deck */
.ai-options {
  background: var(--bg-1);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.ai-options::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hue-lilac);
}
.ai-options-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
}

.ai-pill {
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.ai-pill:hover:not(.is-selected) {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--text-0);
}
.ai-pill.is-selected {
  /* Bake a subtle ring so the chosen pill stands out even at a glance. */
  box-shadow: var(--shadow-focus);
}

/* Mode tip: friendlier tip mark with a small nudge on hover */
.mode-tip {
  background: var(--bg-1);
  box-shadow: var(--shadow-sm);
}
.mode-tip .tip-mark {
  transition: transform var(--transition-bounce);
}
.mode-tip:hover .tip-mark {
  animation: wiz-tip-nudge 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wiz-tip-nudge {
  0%   { transform: rotate(0deg)   scale(1); }
  30%  { transform: rotate(-12deg) scale(1.18); }
  60%  { transform: rotate(8deg)   scale(1.08); }
  100% { transform: rotate(0deg)   scale(1); }
}

/* AI source picker: lift the active tab a bit so the segmented control feels tactile */
.ai-source-tab {
  font-weight: 600;
}
.ai-source-tab.is-active {
  transform: translateY(-1px);
}

/* Drop zone (when used inside a track section) — slightly tighter so the multicam
   page doesn't feel as tall as simple/AI mode. */
.track-section .drop-zone-title { font-weight: 700; }

/* Reduced motion: turn off everything decorative so the page reads quiet */
@media (prefers-reduced-motion: reduce) {
  .live-dot::after,
  .stepper-item.is-active .stepper-num,
  .mode-art > span,
  .mode-sticker,
  .mode-spark,
  .drop-zone::before,
  .drop-zone svg,
  .mode-step:not(:last-child)::after,
  .track-section-status,
  .mode-tip:hover .tip-mark,
  .url-host-chip,
  .file-row.is-importing::after,
  .file-row.is-importing .import-bar > span {
    animation: none !important;
  }
}

/* ==========================================================================
   URL link import — host chips, leader icon, multicam track-source tabs.
   Used by Option 2 (AI clips) and Option 3 (multicam) for paste-a-link flows.
   ========================================================================== */

/* Visual chip strip above the URL input — telegraphs which hosts are accepted. */
.url-host-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
}
.url-host-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
  cursor: default;
}
.url-host-chip svg { flex-shrink: 0; opacity: 0.8; }
.url-host-chip:hover {
  transform: translateY(-1px);
  color: var(--text-1);
  border-color: var(--accent);
}
.url-host-chip.is-detected {
  background: var(--accent);
  color: var(--accent-on, #fff);
  border-color: var(--accent);
  animation: chip-pop 320ms ease-out;
}
.url-host-chip.is-detected svg { opacity: 1; }

@keyframes chip-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* URL input with a leading icon (link glyph that morphs to provider on detect). */
.url-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.url-input-leader {
  position: absolute;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  pointer-events: none;
  transition: color 160ms ease-out, transform 200ms ease-out;
}
.url-input-with-icon .url-input-field.has-leader {
  padding-left: 40px;
}
.url-input-field.is-valid + .url-input-status,
.url-input-with-icon:has(.is-valid) .url-input-leader {
  color: var(--success, #059669);
}
.url-input-with-icon:has(.is-valid) .url-input-leader {
  transform: scale(1.05);
}

/* Help list under the URL panel — numbered, left-aligned, denser than the help body default. */
.url-help-list {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  line-height: 1.7;
}
.url-help-list li { margin-bottom: 4px; }

/* ----- Multicam track-source tab strip (Upload | Paste link) ----- */
.track-source-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  margin: 0 0 var(--space-2);
}
.track-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}
.track-source-tab:hover { color: var(--text-1); }
.track-source-tab.is-active {
  background: var(--accent);
  color: var(--accent-on, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.track-source-tab svg { flex-shrink: 0; }

/* Pane swap animation — fade+slide so switching feels smooth instead of jumping. */
.track-source-pane[hidden] { display: none; }
.track-source-pane:not([hidden]) {
  animation: pane-in 200ms ease-out;
}
@keyframes pane-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Per-track link input row (multicam). */
.track-link-hint {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  line-height: 1.5;
}
.track-link-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}
.track-link-row .track-link-input {
  flex: 1;
  min-width: 0;
}
.track-link-row .track-link-add {
  flex-shrink: 0;
  padding: 0 var(--space-3);
  font-weight: 600;
}
.track-link-row .track-link-add:hover {
  background: var(--accent);
  color: var(--accent-on, #fff);
  border-color: var(--accent);
}
.track-link-row .track-link-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.track-link-tip {
  margin: var(--space-2) 0 0;
  font-size: 12px;
  line-height: 1.5;
}

/* ----- Importing-state styling on file-row (link inputs in flight) -----
   Reuses the existing .file-row component but adds an animated bar to make
   it obvious the file is being downloaded by the server, not the browser. */
.file-row.is-importing {
  position: relative;
  overflow: hidden;
}
.file-row.is-importing .file-row-status {
  color: var(--accent);
  font-weight: 600;
}
.file-row.is-importing::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 30%,
    var(--accent) 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: import-shimmer 1400ms linear infinite;
}
@keyframes import-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.file-row.is-import-failed {
  border-color: var(--danger, #dc2626);
}
.file-row.is-import-failed .file-row-status {
  color: var(--danger, #dc2626);
}

.file-row.is-import-ready,
.file-row.is-just-uploaded {
  animation: row-flash-success 1200ms ease-out 1;
}
@keyframes row-flash-success {
  0%   { background-color: color-mix(in srgb, var(--success, #10b981) 18%, transparent); transform: scale(1); }
  20%  { background-color: color-mix(in srgb, var(--success, #10b981) 22%, transparent); transform: scale(1.01); }
  100% { background-color: transparent; transform: scale(1); }
}

/* ============================================================================
   Phase-3 wizard polish — toasts, host-recognition badge, mobile stepper,
   bigger touch targets, audio file emoji, host chips as buttons.
   ============================================================================ */

/* Toast stack — same pattern as the editor's. Bottom-right on desktop, top on
   mobile (so users see feedback without scrolling, especially during uploads
   that auto-scroll the file list). */
.toast-stack {
  position: fixed;
  bottom: 88px;
  right: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 2 * var(--space-4)));
}
@media (max-width: 640px) {
  .toast-stack {
    top: 12px;
    bottom: auto;
    right: 12px;
    left: 12px;
    max-width: none;
    align-items: stretch;
  }
}
.toast-stack .toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  color: var(--text-0);
  cursor: pointer;
  animation: wiz-toast-in 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
.toast-stack .toast.is-leaving { animation: wiz-toast-out 200ms ease-in forwards; }
@keyframes wiz-toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wiz-toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.toast-stack .toast .toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}
.toast-stack .toast.is-success .toast-icon { color: var(--success, #10b981); }
.toast-stack .toast.is-warn   .toast-icon  { color: #d4a83b; }
.toast-stack .toast.is-error  .toast-icon  { color: var(--danger, #dc2626); }
.toast-stack .toast .toast-text { flex: 1; min-width: 0; line-height: 1.35; }

/* ===== File-row touch targets — 44px minimum for action buttons ===== */
.file-actions .btn-icon,
.file-actions .btn-icon-accent {
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  border-radius: 999px;
  position: relative;
  transition: background-color 160ms, transform 120ms, color 160ms;
}
.file-actions .btn-icon:hover,
.file-actions .btn-icon-accent:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}
.file-actions .btn-icon:active,
.file-actions .btn-icon-accent:active { transform: scale(0.92); }
.file-actions .btn-icon[aria-label*="Remove"]:hover {
  background: color-mix(in srgb, var(--danger, #dc2626) 14%, transparent);
  color: var(--danger, #dc2626);
}

/* Audio-row badge: distinct icon overlay on the thumbnail so users can spot the
   audio file in a list of videos at a glance. */
.file-thumb-audio { position: relative; }
.file-thumb-audio::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18V5l12-2v13'/><circle cx='6' cy='18' r='3'/><circle cx='18' cy='16' r='3'/></svg>");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* Smoother file progress bar — overshoot easing makes uploading feel less robotic. */
.file-progress-bar {
  transition: width 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.file-row [class~="badge-accent"] .spinner {
  vertical-align: -1px;
}

/* ============================================================================
   "We recognize this!" host badge — animates in next to the URL input the
   moment a known host is detected. Reinforces the chip highlight with a green
   check + host name pill that pops in below the input.
   ============================================================================ */
.url-host-recognized {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-top: 8px;
  background: color-mix(in srgb, var(--success, #10b981) 18%, var(--bg-1));
  border: 1px solid color-mix(in srgb, var(--success, #10b981) 50%, var(--border));
  color: var(--text-0);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  animation: host-rec-in 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.url-host-recognized .host-rec-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success, #10b981);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.url-host-recognized .host-rec-check svg { width: 12px; height: 12px; }
.url-host-recognized .host-rec-label { color: var(--text-0); }
.url-host-recognized .host-rec-tag {
  color: color-mix(in srgb, var(--success, #10b981) 70%, var(--text-0));
  font-weight: 700;
}
.url-host-recognized.is-leaving { animation: host-rec-out 180ms ease-in forwards; }
@keyframes host-rec-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes host-rec-out {
  to { opacity: 0; transform: translateY(-4px) scale(0.94); }
}

/* ============================================================================
   URL host chips upgraded to real tappable buttons. Adds an active/tap state,
   bigger hit target on mobile, and a "click for help" hint via the cursor.
   ============================================================================ */
.url-host-chip {
  cursor: pointer;
  user-select: none;
  min-height: 32px;
  padding: 6px 12px;
  -webkit-tap-highlight-color: transparent;
}
.url-host-chip:active {
  transform: scale(0.94);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-2));
}
.url-host-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================================
   Mobile stepper — collapse 4 pill buttons into a compact "Step X of 4" row
   with a thin progress bar. Wide stepper crowds phones; this reads at a glance.
   ============================================================================ */
@media (max-width: 640px) {
  .wizard-stepper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
  }
  .wizard-stepper .stepper-divider { display: none; }
  .wizard-stepper .stepper-item {
    display: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text-0);
    font-weight: 600;
    font-size: 13px;
  }
  /* Show only the active step, collapsed inline. The progress dots show the
     position; the active step's label is the visible text. */
  .wizard-stepper .stepper-item.is-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .wizard-stepper .stepper-item.is-active .stepper-num {
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: var(--accent-on, #fff);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
  }
  /* Three dots after the active step show how many remain. Each dot represents
     one step; when the active step advances, dots fill up to its number. */
  .wizard-stepper::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 4px;
    background: var(--bg-3);
    border-radius: 999px;
    background-image: linear-gradient(to right, var(--accent) var(--wiz-step-pct, 25%), transparent var(--wiz-step-pct, 25%));
    transition: background-image 320ms ease;
  }
}

/* Inline mode-card hints — surfaces what each mode is best for so users don't
   have to expand the help accordion. Small captions below the description that
   show on the selected card and on hover. */
.mode-card .mode-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 200ms, transform 200ms, color 200ms;
}
.mode-card:hover .mode-hint,
.mode-card.is-selected .mode-hint {
  opacity: 1;
  transform: translateY(0);
}
.mode-card.is-selected .mode-hint { color: var(--accent); }

/* Mode-card selected state — a soft accent ring + slight lift to make the
   "you are here" feel obvious without screaming. */
.mode-card.is-selected {
  box-shadow: 0 0 0 2px var(--accent),
              0 12px 28px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-2px);
}

/* AI options — surface a short helper line under the legend so the smart
   options don't feel like a sterile form. */
.ai-options .ai-field legend {
  margin-bottom: 4px;
}
.ai-options .ai-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}

/* Brief accent ring + soft background when a help-list item is targeted from a chip. */
.url-help-list li.is-highlight {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
  transition: background-color 320ms, outline-color 320ms;
}

@media (prefers-reduced-motion: reduce) {
  .toast-stack .toast,
  .url-host-recognized,
  .file-row.is-just-uploaded,
  .file-row.is-import-ready {
    animation: none;
  }
}

/* ============================================================================
   Mode examples — concrete "Try it with…" cards under each mode-intro.
   Built so users see WHAT each mode is for at a glance, with hue-tinted
   cards keyed off the parent .mode-intro[data-mode="…"] for visual identity.
   ============================================================================ */
.mode-examples {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border);
}
.mode-examples-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2, var(--muted, currentColor));
  margin-bottom: var(--space-3);
}
.mode-example-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.mode-example-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.4;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.mode-example-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.mode-example-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.mode-example-card:hover::before { opacity: 1; }
.mode-example-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.01em;
}
.mode-example-card span { color: var(--text-1); }
.mode-example-card em {
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-2, var(--muted, currentColor));
}
.mode-example-card kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.4;
}
.mode-example-emoji {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
  display: inline-block;
  transform-origin: center;
  transition: transform var(--transition-bounce);
}
.mode-example-card:hover .mode-example-emoji {
  transform: scale(1.18) rotate(-6deg);
}

/* Hue-key the examples to the mode they belong to. */
.mode-intro[data-mode="simple"]   .mode-example-card:hover { border-color: var(--hue-sky); }
.mode-intro[data-mode="ai_clips"] .mode-example-card:hover { border-color: var(--hue-lilac); }
.mode-intro[data-mode="multicam"] .mode-example-card:hover { border-color: var(--hue-peach); }

/* Multicam FAQ: "What counts as best audio?" disclosure — keeps deeper detail one click away. */
.mode-faq {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background var(--transition), border-color var(--transition);
}
.mode-faq:hover { border-color: var(--accent); }
.mode-faq[open] { background: var(--bg-1); }
.mode-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-0);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.mode-faq summary::-webkit-details-marker { display: none; }
.mode-faq summary > span:last-child {
  font-size: 18px;
  color: var(--text-2, var(--muted, currentColor));
  transition: transform var(--transition);
}
.mode-faq[open] summary > span:last-child {
  transform: rotate(90deg);
  color: var(--accent);
}
.mode-faq p,
.mode-faq ol {
  margin: var(--space-2) 0 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-1);
}
.mode-faq ol {
  padding-left: 22px;
}
.mode-faq li { margin-bottom: 4px; }

/* ============================================================================
   AI Advanced — asymmetric padding controls.
   Hidden behind a <details> disclosure so it doesn't crowd the default flow.
   When open, presents two number-steppers around a "moment" pivot graphic so
   the before/after metaphor reads at a glance.
   ============================================================================ */
.ai-advanced {
  margin-top: var(--space-4);
  border-top: 1px dashed var(--border);
  padding-top: var(--space-4);
}
.ai-advanced > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  transition: background var(--transition), color var(--transition);
  user-select: none;
}
.ai-advanced > summary::-webkit-details-marker { display: none; }
.ai-advanced > summary:hover { background: var(--surface-2); color: var(--text-0); }
.ai-advanced-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hue-lilac) 30%, transparent);
  color: var(--hue-lilac-ink);
  flex-shrink: 0;
}
.ai-advanced > summary > span:nth-child(2) { flex: 1; }
.ai-advanced-caret {
  display: inline-flex;
  transition: transform var(--transition);
  color: var(--text-2, var(--muted, currentColor));
}
.ai-advanced[open] .ai-advanced-caret {
  transform: rotate(180deg);
  color: var(--accent);
}
.ai-advanced-body {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: ai-advanced-in 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes ai-advanced-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.ai-advanced-explainer {
  margin: 0 0 var(--space-3) 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-1);
}

/* The padding row: BEFORE input | pivot graphic | AFTER input.
   On narrow screens the pivot disappears and the inputs stack. */
.ai-padding-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-3);
}
@media (max-width: 560px) {
  .ai-padding-row {
    grid-template-columns: 1fr;
  }
}

.ai-padding-input { min-width: 0; }
.ai-padding-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.ai-padding-arrow {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}
.ai-padding-arrow-right { margin-left: auto; }

/* The +/- stepper input. The number lives in the middle, units sit beside it,
   tactile -/+ buttons on either end. */
.ai-stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ai-stepper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.ai-stepper-btn {
  flex-shrink: 0;
  width: 36px;
  background: transparent;
  border: 0;
  color: var(--text-1);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: background var(--transition), color var(--transition), transform 80ms ease;
}
.ai-stepper-btn:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.ai-stepper-btn:active { transform: scale(0.94); }
.ai-stepper-input {
  flex: 1;
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 4px;
  color: var(--text-0);
}
.ai-stepper-input:focus {
  outline: none;
  box-shadow: none;
}
/* Hide the native number-input arrows — we render our own +/- buttons. */
.ai-stepper-input::-webkit-outer-spin-button,
.ai-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ai-stepper-input[type=number] { -moz-appearance: textfield; }
.ai-stepper-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, var(--muted, currentColor));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* The pivot dot between the two inputs — visually anchors "the moment" the
   before/after refer to. Animates a soft pulse so the eye keeps the metaphor. */
.ai-padding-pivot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  min-width: 60px;
}
@media (max-width: 560px) {
  .ai-padding-pivot { display: none; }
}
.ai-padding-pivot-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: ai-padding-pulse 2.4s ease-in-out infinite;
}
.ai-padding-pivot-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
@keyframes ai-padding-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent); }
}

/* Live summary line under the inputs. Three states: inactive (muted hint),
   warning (orange), valid (green). */
.ai-padding-summary {
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2, var(--muted, currentColor));
  border: 1px solid var(--border);
  margin-bottom: var(--space-3);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ai-padding-summary.is-valid {
  background: color-mix(in srgb, var(--hue-mint, #10b981) 16%, transparent);
  border-color: color-mix(in srgb, var(--hue-mint, #10b981) 50%, transparent);
  color: var(--text-0);
  font-weight: 600;
}
.ai-padding-summary.is-warning {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  border-color: color-mix(in srgb, #f59e0b 50%, transparent);
  color: #92400e;
}

/* Preset chips — quick fills for common before/after combinations. */
.ai-padding-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: var(--space-2);
}
.ai-padding-presets-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, var(--muted, currentColor));
  margin-right: 4px;
}
.ai-padding-preset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), color var(--transition);
}
.ai-padding-preset:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.ai-padding-preset .muted {
  font-weight: 400;
  font-size: 11px;
}
.ai-padding-preset-clear {
  margin-left: auto;
  border-style: dashed;
}
.ai-padding-hint {
  font-size: 12px;
  margin: 0;
}

/* When custom padding is active, the "Clip length" select is overridden by it.
   Mute the field visually so the user understands it's no longer in play. */
.ai-field.is-overridden {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}
.ai-field.is-overridden::after {
  content: "Overridden by custom padding";
  position: absolute;
  top: 0;
  right: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .ai-padding-pivot-dot { animation: none; }
  .mode-example-card,
  .mode-example-card .mode-example-emoji,
  .ai-advanced-body { animation: none; transition: none; }
}
