/* =====================================================================
   MKP WebHub · AI Director Page · Premium CSS v2
   2026-05-21 · CTO Magic Stage + Dual-Drive Input Architecture
   3 states (Loading · Harvest · Pool) + Idle state polish + Dual-Drive UX
   ===================================================================== */

/* ═══════════════════════════════════════════════════════════════════════
   PAGE FOUNDATION · Idle state premium polish
   ═══════════════════════════════════════════════════════════════════════ */
.dir-page-bg::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(234,134,35,0.06), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(76,175,80,0.03), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.dir-page-bg::after {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: -1;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

.dir-card { transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s; }
.dir-card:hover { box-shadow: 0 4px 24px rgba(234,134,35,0.08); }

/* ─── Animated hero icon + status pill ──────────────────────────── */
.dir-hero-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(234,134,35,0.18), rgba(234,134,35,0.06));
  border: 1px solid rgba(234,134,35,0.35);
  border-radius: 14px;
  font-size: 24px;
  position: relative;
  margin-right: 12px;
  animation: dirHeroPulse 3.2s infinite ease-in-out;
}
.dir-hero-icon::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(234,134,35,0.4), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  animation: dirHeroGlow 3.2s infinite ease-in-out;
}
@keyframes dirHeroPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes dirHeroGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.85; }
}

.dir-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px;
  background: rgba(76,175,80,0.08);
  border: 1px solid rgba(76,175,80,0.3);
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.dir-status-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  position: relative;
  animation: dirStatusBlink 2s infinite;
}
.dir-status-dot::after {
  content: '';
  position: absolute; inset: -3px;
  background: var(--success);
  border-radius: 50%;
  opacity: 0.3;
  animation: dirStatusBlink 2s infinite;
}
@keyframes dirStatusBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(1.4); }
}

/* ─── Hero row layout ─────────────────────────────────────────── */
.dir-hero-flex {
  display: flex; align-items: center; gap: 14px;
}

/* ─── Journey flow arrow band (idle hint) ─────────────────────── */
.dir-journey {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(234,134,35,0.04), transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
}
.dir-journey-step {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s;
}
.dir-journey-step.current {
  background: rgba(234,134,35,0.15);
  color: var(--accent);
  font-weight: 700;
}
.dir-journey-arrow {
  color: var(--text-muted);
  animation: dirArrowSlide 2.4s infinite ease-in-out;
}
@keyframes dirArrowSlide {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50%      { transform: translateX(3px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   DUAL-DRIVE INPUT · Toggle + Wizard + Pro Canvas
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Mode toggle (sliding pill) ─────────────────────────────── */
.dir-mode-toggle {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  position: relative;
  margin-bottom: var(--space-md);
}
.dir-mode-opt {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color 0.2s;
  z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  position: relative;
}
.dir-mode-opt.active { color: #fff; }
.dir-mode-slider {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: var(--radius-pill);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(234,134,35,0.4);
  z-index: 0;
}
.dir-mode-toggle[data-mode="pro"] .dir-mode-slider {
  transform: translateX(100%);
}

/* ─── Wizard step navigator ─────────────────────────────────── */
.dir-wiz-nav {
  display: flex; align-items: center;
  margin-bottom: var(--space-lg);
  gap: 6px;
}
.dir-wiz-step {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.dir-wiz-step.active {
  background: rgba(234,134,35,0.1);
  border-color: var(--accent);
  color: var(--text-primary);
}
.dir-wiz-step.done {
  background: rgba(76,175,80,0.08);
  border-color: rgba(76,175,80,0.4);
  color: var(--text-secondary);
}
.dir-wiz-step-num {
  width: 22px; height: 22px;
  background: var(--bg-card);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
  border: 1px solid var(--border);
}
.dir-wiz-step.active .dir-wiz-step-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dir-wiz-step.done .dir-wiz-step-num {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.dir-wiz-step.done .dir-wiz-step-num::before { content: '✓'; }
.dir-wiz-step.done .dir-wiz-step-num-text { display: none; }

/* ─── Wizard step content panels ─────────────────────────────── */
.dir-wiz-panel {
  display: none;
  animation: dirWizFade 0.35s ease-out;
}
.dir-wiz-panel.active { display: block; }
@keyframes dirWizFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dir-wiz-question {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}
.dir-wiz-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.dir-wiz-actions {
  display: flex; gap: 8px; margin-top: var(--space-md);
}
.dir-wiz-actions .btn { flex: 1; }

/* ─── Dropzone (reference file) ──────────────────────────────── */
.dir-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  background: rgba(255,255,255,0.015);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.dir-dropzone:hover {
  border-color: var(--accent);
  background: rgba(234,134,35,0.05);
}
.dir-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(234,134,35,0.12);
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(234,134,35,0.2);
}
.dir-dropzone-icon {
  font-size: 28px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(234,134,35,0.3));
}
.dir-dropzone-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-primary);
}
.dir-dropzone-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.dir-dropzone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.dir-dropzone.filled {
  border-style: solid;
  border-color: rgba(76,175,80,0.5);
  background: rgba(76,175,80,0.05);
}

/* ─── Tag chip suggestions (AI-suggested) ─────────────────────── */
.dir-chip-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-sm);
}
.dir-chip {
  padding: 5px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.dir-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.dir-chip.selected {
  background: rgba(234,134,35,0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ─── Master Brief preview card ──────────────────────────────── */
.dir-brief-card {
  background: linear-gradient(135deg, rgba(234,134,35,0.06), rgba(76,175,80,0.04));
  border: 1px solid rgba(234,134,35,0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: var(--space-sm);
}
.dir-brief-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.dir-brief-key {
  min-width: 90px;
  color: var(--text-muted);
  font-weight: 600;
}
.dir-brief-val {
  color: var(--text-primary);
  flex: 1;
}

/* ─── Editable Master Brief (Frictionless Feedback Loop · CTO 4 Weapons) ─── */
.dir-brief-editable {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
  border: 1px dashed rgba(234,134,35,0.35);
  border-radius: var(--radius);
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dir-brief-editable:hover {
  border-color: rgba(234,134,35,0.6);
  border-style: solid;
}
.dir-brief-editable:focus {
  outline: none;
  border-color: var(--accent);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(234,134,35,0.15);
  background: var(--bg-primary);
}

.dir-magic-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-md);
}
.dir-magic-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.dir-magic-chip:hover {
  background: rgba(234,134,35,0.12);
  border-color: rgba(234,134,35,0.5);
  color: var(--accent);
  transform: translateY(-1px);
}
.dir-magic-chip.reroll {
  background: rgba(76,175,80,0.08);
  border-color: rgba(76,175,80,0.35);
  color: var(--success);
}
.dir-magic-chip.reroll:hover {
  background: rgba(76,175,80,0.18);
}

.dir-megaphone {
  display: flex; gap: 6px;
  margin-top: var(--space-md);
  padding: 10px;
  background: rgba(100,181,246,0.04);
  border: 1px solid rgba(100,181,246,0.2);
  border-radius: var(--radius);
}
.dir-megaphone-icon {
  font-size: 18px;
  align-self: center;
}
.dir-megaphone input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
}
.dir-megaphone input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(100,181,246,0.15);
}
.dir-megaphone button {
  padding: 8px 14px;
  background: var(--info);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.dir-megaphone button:hover { background: #1976D2; }
.dir-megaphone button:disabled { opacity: 0.5; cursor: not-allowed; }

.dir-brief-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: var(--space-sm);
  font-size: 10px; color: var(--text-muted);
}
.dir-brief-edited {
  color: var(--accent);
  font-weight: 700;
}
.dir-brief-edited::before {
  content: '●';
  margin-right: 4px;
  animation: dirStatusBlink 2s infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   STATE 1 · LOADING OVERLAY (Labor Illusion · unchanged)
   ═══════════════════════════════════════════════════════════════════════ */
.dir-load-overlay {
  position: fixed; inset: 0;
  background: rgba(12,12,12,0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  animation: dirFadeIn 0.3s ease-out;
}
.dir-load-aura {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234,134,35,0.25), transparent 65%);
  filter: blur(40px);
  animation: dirAuraPulse 2.4s infinite ease-in-out;
}
@keyframes dirAuraPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.18); }
}
.dir-load-card {
  position: relative; z-index: 1;
  min-width: 340px; max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
.dir-load-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.dir-load-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.dir-load-step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-secondary);
  opacity: 0.3; transform: translateY(6px);
  transition: all 0.35s ease-out;
}
.dir-load-step.active {
  opacity: 1; transform: translateY(0);
  background: rgba(234,134,35,0.08);
  border-color: rgba(234,134,35,0.35);
  color: var(--text-primary);
}
.dir-load-step.done {
  opacity: 0.75;
  background: rgba(76,175,80,0.06);
  border-color: rgba(76,175,80,0.25);
}
.dir-load-step.done .dir-step-ico { color: var(--success); }
.dir-step-ico { font-size: 16px; min-width: 22px; text-align: center; }
.dir-step-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(234,134,35,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dirSpin 0.8s linear infinite;
}
@keyframes dirSpin { to { transform: rotate(360deg); } }

/* ─── Progress bar + timer + minimize ─── */
.dir-load-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.dir-load-actions {
  display: flex; gap: 6px;
}
.dir-load-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px; font-weight: 700;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.15s;
}
.dir-load-btn:hover {
  background: rgba(234,134,35,0.15);
  color: var(--accent);
  border-color: var(--accent);
}
.dir-load-btn.stop:hover {
  background: rgba(244,67,54,0.15);
  color: var(--error);
  border-color: var(--error);
}
.dir-load-minimize {
  width: 28px; padding: 0;
}

/* Re-run config button (idle state · below Generate) */
.dir-rerun-row {
  display: flex; gap: 8px; align-items: center;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(76,175,80,0.05);
  border: 1px solid rgba(76,175,80,0.2);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}
.dir-rerun-btn {
  background: rgba(76,175,80,0.15);
  border: 1px solid rgba(76,175,80,0.4);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.dir-rerun-btn:hover {
  background: var(--success);
  color: #fff;
}
.dir-load-progress {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  margin: 14px 0 6px;
  overflow: hidden;
  position: relative;
}
.dir-load-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  width: 0%;
  transition: width 0.6s cubic-bezier(.2,.9,.3,1);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.dir-load-progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  animation: dirProgressShine 1.8s infinite;
}
@keyframes dirProgressShine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.dir-load-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 12px;
}
.dir-load-progress-percent {
  font-weight: 800; color: var(--text-primary); font-size: 13px;
}
.dir-load-progress-timer {
  font-family: 'JetBrains Mono', monospace;
}
.dir-load-eta-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.dir-load-eta-hint code {
  background: rgba(234,134,35,0.1);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
}

/* ─── Minimized floating status indicator ─── */
.dir-load-mini {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid rgba(234,134,35,0.4);
  box-shadow: 0 8px 28px rgba(234,134,35,0.4), 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  z-index: 9998;
  display: none;
  align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.2s;
  animation: dirMiniIn 0.4s cubic-bezier(.2,.9,.3,1.2);
}
.dir-load-mini.show { display: flex; }
.dir-load-mini:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 36px rgba(234,134,35,0.55), 0 4px 12px rgba(0,0,0,0.5);
}
@keyframes dirMiniIn {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
.dir-load-mini-ring {
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--dir-progress, 0) * 1%), rgba(255,255,255,0.08) 0);
  -webkit-mask: radial-gradient(circle, transparent 32px, #000 34px);
          mask: radial-gradient(circle, transparent 32px, #000 34px);
  pointer-events: none;
  transition: --dir-progress 0.5s ease-out;
}
.dir-load-mini-content {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  position: relative; z-index: 1;
}
.dir-load-mini-emoji {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(234,134,35,0.4));
}
.dir-load-mini-pct {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.dir-load-mini-tooltip {
  position: absolute;
  bottom: calc(100% + 8px); right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px; color: var(--text-primary);
  white-space: nowrap;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.dir-load-mini:hover .dir-load-mini-tooltip {
  opacity: 1; transform: translateY(0);
}
.dir-load-mini-tooltip-step { color: var(--accent); font-weight: 700; }
.dir-load-mini-tooltip-time {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 10px;
  margin-top: 2px;
}
.dir-load-mini-tooltip-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

/* Allow background scroll/click when minimized (overlay hidden) */
.dir-load-overlay.minimized { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   STATE 2 · ARTIFACTS HARVEST (unchanged · still works with new layout)
   ═══════════════════════════════════════════════════════════════════════ */
.dir-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}
.dir-art-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  overflow: hidden;
  cursor: default;
  transform-origin: center bottom;
  animation: dirCardIn 0.55s cubic-bezier(.2,.9,.3,1.2) both;
  transition: transform 0.18s ease-out, box-shadow 0.2s, border-color 0.2s;
}
.dir-art-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(234,134,35,0.18);
  border-color: rgba(234,134,35,0.35);
}
@keyframes dirCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.dir-art-grid > .dir-art-card:nth-child(1) { animation-delay: 0.04s; }
.dir-art-grid > .dir-art-card:nth-child(2) { animation-delay: 0.08s; }
.dir-art-grid > .dir-art-card:nth-child(3) { animation-delay: 0.12s; }
.dir-art-grid > .dir-art-card:nth-child(4) { animation-delay: 0.16s; }
.dir-art-grid > .dir-art-card:nth-child(5) { animation-delay: 0.20s; }
.dir-art-grid > .dir-art-card:nth-child(6) { animation-delay: 0.24s; }
.dir-art-grid > .dir-art-card:nth-child(7) { animation-delay: 0.28s; }
.dir-art-grid > .dir-art-card:nth-child(8) { animation-delay: 0.32s; }
.dir-art-grid > .dir-art-card:nth-child(9) { animation-delay: 0.36s; }
.dir-art-grid > .dir-art-card:nth-child(10) { animation-delay: 0.40s; }
.dir-art-grid > .dir-art-card:nth-child(n+11) { animation-delay: 0.44s; }

.dir-art-card.dir-discarding {
  transform: scale(0.4) translateY(40px) rotate(8deg);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(.5,-0.2,.7,.4), opacity 0.32s;
  pointer-events: none;
}

.dir-art-thumb {
  position: relative;
  width: 100%; aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  background-color: rgba(255,255,255,0.02);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.dir-art-thumb img {
  max-width: 88%; max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.45));
  transition: transform 0.25s ease-out;
}
.dir-art-card:hover .dir-art-thumb img { transform: scale(1.04); }

.dir-art-thumb .dir-art-skel {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.dir-art-score {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 9px;
  font-size: 11px; font-weight: 800;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  z-index: 2;
  white-space: nowrap;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.dir-art-score.kept {
  background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
  color: #1a1a1a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.dir-art-score.staged { background: rgba(234,134,35,0.92); color: #fff; }
.dir-art-score.pending { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

.dir-art-kind {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 6px;
  text-align: center;
}

.dir-art-actions {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; gap: 4px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 3;
}
.dir-art-card:hover .dir-art-actions { opacity: 1; transform: translateY(0); }
.dir-art-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease-out, background 0.15s;
  padding: 0;
}
.dir-art-btn:hover { transform: scale(1.12); }
.dir-art-btn.keep:hover { background: var(--success); border-color: var(--success); }
.dir-art-btn.discard:hover { background: var(--error); border-color: var(--error); }

/* ═══════════════════════════════════════════════════════════════════════
   STATE 3 · ONE-CLICK POOL (FAB · Toast · Confetti · unchanged)
   ═══════════════════════════════════════════════════════════════════════ */
.dir-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  display: none; align-items: center; gap: 8px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(234,134,35,0.42);
  z-index: 998;
  animation: dirFabIn 0.45s cubic-bezier(.2,.9,.3,1.2);
  transition: transform 0.15s, box-shadow 0.2s;
}
.dir-fab.show { display: inline-flex; }
.dir-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(234,134,35,0.55);
}
.dir-fab:active { transform: translateY(0); }
@keyframes dirFabIn {
  from { opacity: 0; transform: translateY(28px) scale(0.86); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.dir-fab-count {
  background: rgba(255,255,255,0.22);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800;
}

.dir-toast {
  position: fixed;
  bottom: 24px; left: 24px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px; color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 1000;
  max-width: 320px;
  animation: dirToastIn 0.3s, dirToastOut 0.3s 4.7s forwards;
}
.dir-toast-msg { flex: 1; }
.dir-toast-undo {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700; font-size: 12px;
  transition: background 0.15s;
}
.dir-toast-undo:hover { background: var(--accent-hover); }
@keyframes dirToastIn  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dirToastOut { from { opacity: 1; transform: translateY(0); }    to { opacity: 0; transform: translateY(20px); } }

.dir-confetti-host { position: absolute; pointer-events: none; z-index: 5; }
.dir-confetti-dot {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  animation: dirConfetti 1.3s ease-out forwards;
}
@keyframes dirConfetti {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--cx,30px), var(--cy,-60px)) scale(0.3); }
}

@keyframes dirFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dir-fade-in { animation: dirFadeIn 0.35s ease-out; }

/* ═══════════════════════════════════════════════════════════════════════
   VIDEO CARDS · hover-to-play (unchanged)
   ═══════════════════════════════════════════════════════════════════════ */
.dir-vid-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s;
}
.dir-vid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(234,134,35,0.16);
  border-color: rgba(234,134,35,0.3);
}
.dir-vid-card video {
  width: 100%; border-radius: var(--radius-md);
  background: #000; display: block;
}
.dir-vid-progress {
  height: 2px; background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  margin-top: 6px; overflow: hidden;
}
.dir-vid-progress-fill {
  height: 100%; background: var(--accent);
  width: 0; transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════════════
   LAYOUT · 30/70 split + responsive collapse
   ═══════════════════════════════════════════════════════════════════════ */
.dir-layout {
  display: grid;
  grid-template-columns: minmax(320px, 32%) 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  align-items: start;
}
@media (max-width: 960px) {
  .dir-layout {
    grid-template-columns: 1fr;
  }
}

/* Right panel stage · sticky so it stays in view while user scrolls long form */
.dir-stage {
  display: flex; flex-direction: column;
  gap: var(--space-md);
  position: sticky;
  top: var(--space-lg);
  max-height: calc(100vh - var(--space-xl));
  overflow-y: auto;
  /* When stage content is shorter than left form, sticky keeps it visible */
}
.dir-stage::-webkit-scrollbar { width: 6px; }
.dir-stage::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.dir-stage::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 960px) {
  .dir-stage {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ─── Match Create Content styling (Boss directive · use form-input consistently) ── */
/* form-input is defined globally in components.css with proper dark bg + padding.
   These overrides only add: (a) custom select arrow for native dark theme
   (b) wider padding for AI Director's left-panel readability               */
.dir-card .form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.4;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dir-card select.form-input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%23888' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.dir-card .form-input:hover {
  border-color: rgba(234,134,35,0.4);
}
.dir-card .form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,134,35,0.15);
}
.dir-card textarea.form-input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.6;
}

/* ─── Vertical form field stack · breathing room ─── */
.dir-form-field {
  margin-bottom: 14px;
}
.dir-form-field label,
.dir-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.dir-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* Section headers · premium */
.dir-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--space-md);
}
.dir-section-title {
  font-size: 18px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.3px;
}
.dir-section-sub { font-size: 11px; color: var(--text-muted); }
