/* ════════════════════════════════════════════════════════════
   Director Mode v2 — mockup stylesheet
   Dark, minimal, "less is more" — inspired by Runway/LTX/Linear-
   style creative-AI workspaces. Copper/gold accent bridges back to
   PresentTool's existing brand identity; violet is reserved
   exclusively for "AI-suggestie" affordances so they read as one
   consistent, recognizable pattern across the whole app.
   ──────────────────────────────────────────────────────────── */

:root {
  /* Tells the browser this UI is dark-themed so *native* form-control
     rendering (buttons/selects without an explicit background/color of
     their own) uses dark system colors instead of the light-theme default.
     Without this, plain <button> rows that only set border/padding/gap
     (e.g. .tech-row below) silently fall back to a light "ButtonFace"
     background with black text — a real bug found live in production
     while verifying this mockup in an actual browser (not just jsdom). */
  color-scheme: dark;

  --bg:            #0B0B0D;
  --bg-raised:     #131316;
  --surface:       #17171B;
  --surface-2:     #1D1D22;
  --surface-3:     #26262C;
  --border:        #2A2A31;
  --border-soft:   #202026;

  --text:          #F2F1EE;
  --text-muted:    #A6A4AE;
  --text-subtle:   #6F6D78;

  --accent:        #D9A066;
  --accent-strong: #E8B27E;
  --accent-soft:   rgba(217, 160, 102, 0.14);
  --accent-border: rgba(217, 160, 102, 0.35);

  --ai:            #A78BFA;
  --ai-strong:     #C4B5FD;
  --ai-soft:       rgba(167, 139, 250, 0.14);
  --ai-border:     rgba(167, 139, 250, 0.38);

  --success:       #4ADE80;
  --warning:       #FBBF24;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.35);
  --shadow-pop:  0 12px 32px rgba(0,0,0,0.5), 0 40px 90px rgba(0,0,0,0.55);

  --chat-w: 380px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
textarea { font-family: inherit; }
::selection { background: var(--ai-soft); color: var(--text); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #34343c; background-clip: padding-box; }

.sparkle { display: inline-block; filter: drop-shadow(0 0 6px rgba(167,139,250,0.55)); }

/* ── App shell ─────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── Chat panel ────────────────────────────────────────────── */
.chat-panel {
  width: var(--chat-w); flex: 0 0 var(--chat-w);
  background: var(--bg-raised);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.ad-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8B5E3C);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: #1a1208;
  flex: 0 0 auto;
}
.ad-avatar.sm { width: 26px; height: 26px; font-size: 9.5px; }
.ad-who { flex: 1; min-width: 0; }
.ad-name { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.ad-status { font-size: 11.5px; color: var(--text-subtle); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(74,222,128,0.15); flex: 0 0 auto; }

.icon-btn {
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: grid; place-items: center; transition: background .15s, color .15s, border-color .15s;
}
.icon-btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 16px 6px;
  display: flex; flex-direction: column; gap: 14px;
}
.msg { display: flex; gap: 10px; max-width: 100%; animation: msgIn .25s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .ad-avatar { margin-top: 2px; }
.msg-bubble {
  padding: 10px 13px; border-radius: var(--radius-md);
  font-size: 13.2px; line-height: 1.55;
  max-width: 268px;
}
.msg.ai .msg-bubble { background: var(--surface-2); border: 1px solid var(--border-soft); border-top-left-radius: 4px; color: var(--text); }
.msg.user { flex-direction: row-reverse; margin-left: 34px; }
.msg.user .msg-bubble { background: var(--accent-soft); border: 1px solid var(--accent-border); border-top-right-radius: 4px; color: var(--text); }

.chat-typing { display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; }
.typing-bubble { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-md); border-top-left-radius: 4px; padding: 10px 13px; display: flex; gap: 4px; }
.typing-bubble span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-subtle); animation: typingDot 1.1s infinite ease-in-out; }
.typing-bubble span:nth-child(2) { animation-delay: .15s; }
.typing-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

.chat-composer { padding: 12px 16px 16px; border-top: 1px solid var(--border-soft); }
.suggest-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ai-soft); border: 1px solid var(--ai-border); color: var(--ai-strong);
  font-size: 12px; font-weight: 500; padding: 6px 11px; border-radius: 99px;
  margin-bottom: 10px; transition: background .15s, transform .1s;
}
.suggest-chip:hover { background: rgba(167,139,250,0.22); }
.suggest-chip:active { transform: scale(0.97); }

.composer-row {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 8px 8px 12px;
  transition: border-color .15s;
}
.composer-row:focus-within { border-color: var(--accent-border); }
.composer-row textarea {
  flex: 1; background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-size: 13.3px; line-height: 1.4; max-height: 120px; padding: 4px 0;
}
.composer-row textarea::placeholder { color: var(--text-subtle); }
.send-btn {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--accent); color: #1a1208; border: none; display: grid; place-items: center;
  transition: filter .15s, transform .1s;
}
.send-btn:hover { filter: brightness(1.08); }
.send-btn:active { transform: scale(0.94); }
.composer-hint { font-size: 10.5px; color: var(--text-subtle); margin: 8px 2px 0; line-height: 1.4; }

/* ── Main column / topbar ─────────────────────────────────── */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 28px; border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-name { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.project-sub { font-size: 12px; color: var(--text-subtle); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.only-narrow { display: none; }

.progress-pill {
  font-size: 12px; color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); padding: 6px 12px; border-radius: 99px;
}
.progress-pill span { color: var(--text); font-weight: 600; font-family: var(--mono); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, transform .1s, filter .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-soft); }
.btn:active { transform: scale(0.97); }
.btn.sm { padding: 7px 11px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn.primary {
  background: linear-gradient(135deg, var(--ai), #8B6CE8);
  border: 1px solid rgba(167,139,250,0.5); color: #14101F;
}
.btn.primary:hover { filter: brightness(1.08); }

/* ── Storyboard grid ───────────────────────────────────────── */
.storyboard {
  flex: 1; overflow-y: auto; padding: 24px 28px 60px;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  align-content: start;
  /* align-items MUST stay "start" (never the grid default "stretch"/"normal").
     Root cause of a real visual bug: .shot-card is a flex column whose
     .shot-thumb has a fixed aspect-ratio and flex-shrink:0. When a grid item
     is stretched, the CSS Grid spec sizes the *auto* row track using that
     item's MIN-CONTENT contribution (to avoid a circular size dependency),
     not its natural/preferred height — and the min-content block size of an
     aspect-ratio box inside a flex column resolves far smaller than its real
     rendered height. That produced ~82px-tall grid rows (regardless of
     viewport width or SVG-vs-photo thumb) while .shot-card's actual content
     (thumb + title/technique-tags/model-badge) needed ~350px+, and since
     .shot-card has overflow:hidden, everything below the (still full-height)
     thumb got silently clipped. With align-items:start, cards are never
     grid-stretched, so each row's auto height is sized off cards' real
     (max-content) heights instead — verified via real headless-Chromium
     screenshots at 800/1200px, not just a jsdom smoke test. Do not "fix"
     this again by adding a min-height to .shot-card — that only hides the
     same underlying stretch/min-content mismatch for today's content. */
  align-items: start;
}

.shot-card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  position: relative;
}
.shot-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow-card); }

.shot-order {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
  padding: 3px 7px; border-radius: 99px; letter-spacing: .02em;
}

.shot-thumb {
  aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  display: grid; place-items: center; flex-shrink: 0;
}
.shot-thumb svg { width: 62%; height: 62%; opacity: 0.85; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-actions {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; gap: 6px;
  opacity: 0; transition: opacity .15s;
}
.shot-card:hover .card-actions { opacity: 1; }
@media (hover: none) {
  .card-actions { opacity: 1; }
}

.regen-btn, .vfx-btn, .kebab-btn, .ambient-btn {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(10,10,12,0.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.14); color: #fff;
  display: grid; place-items: center; transition: transform .4s ease, background .15s;
}
.regen-btn:hover, .vfx-btn:hover, .kebab-btn:hover, .ambient-btn:hover { background: rgba(10,10,12,0.8); }
.regen-btn.spinning svg { animation: spin .6s linear infinite; }
.vfx-btn.active { border-color: var(--ai-border); background: rgba(167,139,250,0.35); }
.ambient-btn.active { border-color: var(--accent-border); background: rgba(217,160,102,0.35); }
@keyframes spin { to { transform: rotate(360deg); } }

.shot-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.shot-title { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }

.technique-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.3px; color: var(--text-muted);
}
.technique-row .tech-tag {
  background: var(--surface-3); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 99px; color: var(--text);
  font-weight: 500;
}
.technique-row .dot-sep { color: var(--text-subtle); }
.swap-tech-btn {
  margin-left: auto; background: transparent; border: none; color: var(--text-subtle);
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.swap-tech-btn:hover { background: var(--surface-3); color: var(--text); }

.model-badge-wrap { position: relative; }
.model-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px dashed var(--border);
  color: var(--text-muted); font-size: 11px; font-weight: 500;
  padding: 5px 9px; border-radius: 99px; width: 100%; text-align: left;
  transition: border-color .15s, color .15s, background .15s;
}
.model-badge:hover { border-color: var(--accent-border); color: var(--text); background: var(--accent-soft); }
.model-badge .model-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.model-badge .chev { margin-left: auto; opacity: .6; transition: transform .15s; flex: 0 0 auto; }
.model-badge.open .chev { transform: rotate(180deg); }

.model-popover {
  display: none; margin-top: 6px; padding: 10px 11px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 11.6px; color: var(--text-muted); line-height: 1.5;
}
.model-popover.open { display: block; animation: popIn .15s ease both; }
@keyframes popIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.model-popover .rationale-label { color: var(--text-subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; font-family: var(--mono); }
.ai-pick-model {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: var(--ai-soft); border: 1px solid var(--ai-border); color: var(--ai-strong);
  font-size: 10.8px; font-weight: 500; padding: 5px 9px; border-radius: 99px;
}
.ai-pick-model:hover { background: rgba(167,139,250,0.22); }

/* ── Shot states: generating (shimmer) / empty ──────────────── */
.shot-card.state-generating .shot-thumb { position: relative; }
.shot-card.state-generating .shot-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.shot-card.state-generating .shot-thumb svg,
.shot-card.state-generating .shot-thumb img { opacity: 0.35; filter: blur(1px); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.status-pill {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(10,10,12,0.55); backdrop-filter: blur(4px); color: #fff;
}
.status-pill .pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--warning); animation: pulseDot 1s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.shot-card.state-empty { border-style: dashed; border-color: var(--border); background: var(--bg-raised); }
.shot-card.state-empty .shot-thumb { background: var(--surface); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 10px; }
.empty-state .empty-icon { font-size: 22px; opacity: .5; }
.empty-state .empty-copy { font-size: 11.5px; color: var(--text-subtle); max-width: 180px; }
.ai-suggest-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ai-soft); border: 1px solid var(--ai-border); color: var(--ai-strong);
  font-size: 12px; font-weight: 600; padding: 7px 13px; border-radius: 99px;
  transition: background .15s, transform .1s;
}
.ai-suggest-card-btn:hover { background: rgba(167,139,250,0.22); }
.ai-suggest-card-btn:active { transform: scale(0.96); }
.ai-suggest-card-btn:disabled { opacity: .55; pointer-events: none; }

/* ── Technique drawer ──────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(5,5,7,0.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 400px; max-width: 92vw;
  background: var(--bg-raised); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 41;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--shadow-pop);
}
.drawer.open { transform: translateX(0); }

.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--border-soft); }
.drawer-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.drawer-sub { font-size: 11.5px; color: var(--text-subtle); margin-top: 2px; }

.ai-suggest-row {
  margin: 14px 16px 6px; display: flex; align-items: center; gap: 8px;
  background: var(--ai-soft); border: 1px solid var(--ai-border); color: var(--ai-strong);
  font-size: 12.5px; font-weight: 600; padding: 10px 13px; border-radius: var(--radius-md);
  transition: background .15s;
}
.ai-suggest-row:hover { background: rgba(167,139,250,0.22); }

.drawer-tabs { display: flex; gap: 4px; padding: 12px 16px 4px; border-bottom: 1px solid var(--border-soft); }
.drawer-tab {
  flex: 1; background: transparent; border: none; color: var(--text-subtle);
  font-size: 11.8px; font-weight: 600; padding: 9px 4px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.drawer-tab:hover { color: var(--text-muted); }
.drawer-tab.active { color: var(--accent-strong); border-color: var(--accent); }

.drawer-list { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }
.tech-row {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid transparent;
  /* Explicit background + color (not just relying on color-scheme above) so
     this always matches the app's own tokens instead of a generic dark
     system-button fallback. See color-scheme comment in :root. */
  background: transparent; color: var(--text);
  transition: background .15s, border-color .15s;
}
.tech-row:hover { background: var(--surface-2); border-color: var(--border-soft); }
.tech-row.selected { background: var(--accent-soft); border-color: var(--accent-border); }
.tech-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tech-row-name { font-size: 13px; font-weight: 600; }
.tech-row-check { color: var(--accent); font-size: 13px; opacity: 0; }
.tech-row.selected .tech-row-check { opacity: 1; }
.tech-row-desc { font-size: 11.5px; color: var(--text-subtle); line-height: 1.45; }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 99px; font-size: 12.8px; font-weight: 500;
  box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 60; display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Add-shot card ─────────────────────────────────────────── */
.shot-card.add-shot-card {
  border-style: dashed; border-color: var(--border); background: transparent;
  align-items: center; justify-content: center; min-height: 220px;
  color: var(--text-subtle); transition: border-color .15s, color .15s, background .15s;
}
.shot-card.add-shot-card:hover { border-color: var(--accent-border); color: var(--text); background: var(--accent-soft); transform: none; box-shadow: none; }
.add-shot-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 10px; }
.add-shot-inner .plus-icon { font-size: 26px; line-height: 1; }
.add-shot-inner span.label { font-size: 12.5px; font-weight: 600; }

/* ── Icon popovers (ambient sound / VFX) anchored on shot-card ── */
.icon-popover {
  position: absolute; top: 40px; right: 8px; z-index: 5; width: 210px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 12px; font-size: 11.8px; color: var(--text-muted);
  display: none; box-shadow: var(--shadow-pop);
}
.icon-popover.open { display: block; animation: popIn .15s ease both; }
.icon-popover .popover-title { color: var(--text-subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; font-family: var(--mono); }
.icon-popover-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.icon-popover-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 12px; flex: 1; }
.mini-toggle { position: relative; width: 30px; height: 17px; flex: 0 0 auto; }
.mini-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mini-toggle .track { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border); border-radius: 99px; transition: background .15s, border-color .15s; }
.mini-toggle .thumb { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--text-subtle); transition: transform .15s, background .15s; }
.mini-toggle input:checked + .track { background: var(--ai-soft); border-color: var(--ai-border); }
.mini-toggle input:checked + .track .thumb { transform: translateX(13px); background: var(--ai-strong); }
.icon-popover-row.thinking label { opacity: .6; }
.icon-popover-hint { font-size: 10.5px; color: var(--text-subtle); margin-top: 6px; line-height: 1.4; }

/* ── Cross-device resume banner ────────────────────────────── */
.resume-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 70; display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--accent-border);
  color: var(--text); padding: 10px 14px 10px 16px; border-radius: 99px;
  font-size: 12.5px; box-shadow: var(--shadow-pop); max-width: 92vw;
}
.resume-icon { color: var(--accent-strong); font-size: 14px; }

/* ── Project menu ──────────────────────────────────────────── */
.project-menu-wrap { position: relative; }
.project-id {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 4px 8px; margin: -4px -8px; transition: background .15s, border-color .15s; text-align: left;
}
.project-id:hover { background: var(--surface); border-color: var(--border-soft); }
.project-id .chev { color: var(--text-subtle); transition: transform .15s; flex: 0 0 auto; }
.project-id.open .chev { transform: rotate(180deg); }
.project-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 45; width: 240px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 8px; box-shadow: var(--shadow-pop);
}
.project-menu.open { display: block; animation: popIn .15s ease both; }
.project-menu-item {
  width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
  background: transparent; border: none; color: var(--text); font-size: 12.8px; font-weight: 500;
  padding: 9px 9px; border-radius: var(--radius-sm); transition: background .15s;
}
.project-menu-item:hover { background: var(--surface-3); }
.project-menu-item.danger { color: #f87171; }
.project-menu-item.danger:hover { background: rgba(248,113,113,0.12); }
.pmi-icon { font-size: 13px; }
.project-menu-sep { height: 1px; background: var(--border-soft); margin: 6px 2px; }
.project-menu-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); font-family: var(--mono); padding: 4px 9px 2px; }
.version-row {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  background: transparent; border: none; padding: 7px 9px; border-radius: var(--radius-sm); transition: background .15s;
}
.version-row:hover { background: var(--surface-3); }
.version-row .v-label { font-size: 12.2px; color: var(--text); font-weight: 500; }
.version-row.current .v-label { color: var(--accent-strong); }
.version-row .v-at { font-size: 10.5px; color: var(--text-subtle); }

/* ── Cinematographer consistency badge ────────────────────── */
.consistency-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--success); background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3); padding: 6px 11px; border-radius: 99px;
  cursor: default; white-space: nowrap;
}
.consistency-badge.warn { color: var(--warning); background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.3); }

/* ── Producer: credits popover ────────────────────────────── */
.credits-wrap { position: relative; }
.credits-pill { border: none; }
.credits-popover {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 45; width: 260px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 13px; font-size: 11.8px; color: var(--text-muted); box-shadow: var(--shadow-pop);
}
.credits-popover.open { display: block; animation: popIn .15s ease both; }
.credits-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.credits-row .cr-name { color: var(--text); }
.credits-row .cr-val { font-family: var(--mono); color: var(--text-muted); }
.credits-total-row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border-soft); font-weight: 700; color: var(--text); font-family: var(--mono); font-size: 12.5px;
}

/* ── View tabs (Storyboard / Muziek & geluid) ─────────────── */
.view-tabs { display: flex; gap: 6px; padding: 4px 28px 0; flex: 0 0 auto; }
.view-tab {
  background: transparent; border: none; color: var(--text-subtle);
  font-size: 12.5px; font-weight: 600; padding: 10px 4px; margin-right: 14px;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.view-tab:hover { color: var(--text-muted); }
.view-tab.active { color: var(--accent-strong); border-color: var(--accent); }

/* ── Sound & Music panel ───────────────────────────────────── */
.sound-panel { flex: 1; overflow-y: auto; padding: 22px 28px 60px; }
.sound-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.sound-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 16px 17px; display: flex; flex-direction: column; gap: 10px; }
.sound-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sound-card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.sound-field-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); font-family: var(--mono); margin-top: 4px; }
.sound-label-hint { text-transform: none; letter-spacing: normal; font-family: var(--sans); color: var(--text-subtle); font-weight: 400; }
.sound-card .technique-row { margin: -2px 0 2px; }
.sound-card .model-badge { margin-top: 2px; }

.direction-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.direction-tag {
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
  font-size: 11px; font-weight: 500; padding: 5px 10px; border-radius: 99px;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  font-family: var(--mono);
}
.direction-tag:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-strong); }
.direction-tag:active { transform: scale(0.95); }
.sound-mood { font-size: 12.8px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 9px 11px; line-height: 1.5; }
.sound-textarea, .sound-select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 12.6px; font-family: inherit; padding: 9px 10px; resize: vertical;
}
.sound-textarea:focus, .sound-select:focus { outline: none; border-color: var(--accent-border); }
.sound-hint { font-size: 12px; color: var(--text-subtle); line-height: 1.55; margin: 0; }
.ai-suggest-card-btn.sm { font-size: 11px; padding: 5px 10px; }

.audio-mock { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; animation: popIn .2s ease both; }
.waveform { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.waveform .bar { flex: 1; background: linear-gradient(180deg, var(--accent-strong), var(--accent)); border-radius: 2px; opacity: .85; }
.audio-mock-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-subtle); font-family: var(--mono); margin-top: 6px; }

.sound-summary { display: flex; flex-direction: column; gap: 6px; }
.sound-summary-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.sound-summary-row:last-child { border-bottom: none; }
.sound-summary-row .ss-title { color: var(--text); }
.sound-summary-row .ss-sounds { color: var(--text-subtle); text-align: right; }

/* ── Modal dialogs (confirm / new project) ────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,5,7,0.65); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; z-index: 80; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn .15s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: 360px; max-width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 20px 16px; box-shadow: var(--shadow-pop);
  animation: popIn .18s ease both;
}
.modal-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.modal-body { font-size: 12.6px; color: var(--text-muted); line-height: 1.55; margin-bottom: 4px; }
.modal-input {
  width: 100%; margin-top: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 13px; padding: 9px 11px; font-family: inherit;
}
.modal-input:focus { outline: none; border-color: var(--accent-border); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn.danger { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.4); color: #f87171; }
.btn.danger:hover { background: rgba(248,113,113,0.2); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .chat-panel { position: fixed; left: 0; top: 0; z-index: 30; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform .25s; }
  .chat-panel.open { transform: translateX(0); }
  .only-narrow { display: grid; }
  .topbar { padding: 16px; }
  .storyboard { padding: 18px 16px 50px; }
  .view-tabs { padding: 4px 16px 0; }
  .sound-panel { padding: 18px 16px 50px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .topbar-right { width: 100%; justify-content: flex-start; }
  .storyboard { grid-template-columns: 1fr; }
  .sound-grid { grid-template-columns: 1fr; }
  .project-menu { width: min(240px, 80vw); }
}
