:root {
  --bg-canvas: #05060a;
  --bg-sidebar: rgba(8, 10, 16, 0.84);
  --bg-card: rgba(11, 13, 21, 0.78);
  --bg-card-elevated: rgba(16, 19, 30, 0.88);
  --bg-input: rgba(6, 8, 13, 0.84);
  --bg-subtle: rgba(255, 255, 255, 0.025);

  --border-hairline: rgba(255, 255, 255, 0.075);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(129, 140, 248, 0.55);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #526077;

  --accent-primary: #818cf8;
  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition-calm: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}

/* Subtle custom scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hidden {
  display: none !important;
}

/* Ambient Atmospheric Backdrop */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -180px;
  left: 160px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  bottom: -200px;
  right: 80px;
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 272px 1fr;
  height: 100vh;
}

/* Sidebar Navigation Rail */
.sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  overflow: hidden;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--border-hairline);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.logo-mark svg {
  width: 32px;
  height: 32px;
}

.brand-logo h1 {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 4px 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.count-mono {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
  margin-left: 4px;
}

.client-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.client-search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px !important;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  transition: border-color var(--transition-calm);
}

.client-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-calm);
  text-align: left;
  color: var(--text-secondary);
}

.client-nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.client-nav-item.active {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.24);
  color: #fff;
}

.client-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11.5px;
  color: #fff;
  flex-shrink: 0;
  opacity: 0.92;
}

.client-nav-info {
  flex: 1;
  min-width: 0;
}

.client-nav-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-nav-handle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.engine-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
}

.status-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.65);
}

.provider-badges {
  display: flex;
  gap: 6px;
}

.key-badge {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
}

.key-badge.live {
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
}

/* Main Studio Canvas */
.main-workspace {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.client-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(7, 8, 12, 0.65);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
}

.client-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.client-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-name-row h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.handle-pill {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
}

.industry-tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.platform-badges-row {
  display: flex;
  gap: 5px;
  margin-left: 4px;
}

.plat-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.plat-badge.plat-x {
  color: #e2e8f0;
}
.plat-badge.plat-tiktok {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.06);
}
.plat-badge.plat-instagram {
  color: #f9a8d4;
  border-color: rgba(244, 114, 182, 0.2);
  background: rgba(244, 114, 182, 0.06);
}

.client-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.telemetry-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  padding: 7px 16px;
  border-radius: var(--radius-md);
}

.stat-divider {
  width: 1px;
  height: 22px;
  background: var(--border-hairline);
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-chip strong {
  font-size: 13.5px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.client-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Minimalist Navigation Tabs (Create · Agents · Library · Memory) */
.workspace-nav-bar {
  padding: 12px 32px 0;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(7, 8, 12, 0.4);
}

.workspace-tabs {
  display: inline-flex;
  gap: 28px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #b6c2d6;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 6px 14px;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all var(--transition-calm);
}

.tab-btn svg {
  width: 17px;
  height: 17px;
  opacity: 0.78;
  transition: opacity var(--transition-calm);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn:hover svg {
  opacity: 1;
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent-primary);
}

.tab-btn.active svg {
  opacity: 1;
  color: var(--accent-primary);
}

.tab-pill {
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

/* Tab Panels */
.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 56px;
}

.tab-panel.active {
  display: block;
}

/* Studio Two-Column Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 24px;
  align-items: start;
  max-width: 1520px;
}

.studio-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 12px 32px rgba(0, 0, 0, 0.34);
  transition: border-color var(--transition-calm), box-shadow var(--transition-calm);
}

.panel-card:hover {
  border-color: rgba(255, 255, 255, 0.115);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.header-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-glyph {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.feature-glyph.glyph-accent {
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.22);
}

.card-header h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.muted-inline {
  color: var(--text-muted);
  font-weight: 400;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.label-row label {
  margin-bottom: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition-calm);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.toggle-col {
  display: flex;
  align-items: center;
  padding-top: 20px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-primary);
}

.switch-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* Prompt Blueprints List */
.prompt-templates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.prompt-item {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.prompt-item:hover {
  border-color: rgba(129, 140, 248, 0.35);
  background: rgba(129, 140, 248, 0.05);
  transform: translateY(-1px);
}

.prompt-item-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-item-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tactile Segmented Controls */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
}

.segmented-control.modality-grid {
  grid-template-columns: repeat(5, 1fr);
}

.seg-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-calm);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Media Upload Dropzone */
.media-upload-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 13px 15px;
}

.upload-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.upload-dropzone {
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--transition-calm), background var(--transition-calm);
}

.upload-dropzone:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(129, 140, 248, 0.03);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-orb-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(129, 140, 248, 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-placeholder p {
  font-size: 12.5px;
  color: var(--text-primary);
}

.upload-placeholder small {
  font-size: 11px;
  color: var(--text-muted);
}

.upload-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-preview-wrap img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-hover);
}

.badge-ready {
  display: inline-block;
  font-size: 10.5px;
  color: var(--accent-emerald);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 3px;
}

/* Neural Conditioning Banner */
.learning-banner-toggle {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  margin-bottom: 18px;
}

.learning-toggle-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-emerald);
  font-size: 12.5px;
}

.learning-banner-toggle p {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* Provider Synthesis Triggers */
.provider-launch-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.btn-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition-calm);
}

.btn-launch:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-launch:disabled {
  opacity: 0.5;
  cursor: wait;
}

.launch-glyph {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-launch strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.btn-launch small {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-gemini {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
  border-color: rgba(56, 189, 248, 0.25);
}
.btn-gemini .launch-glyph {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}
.btn-gemini:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, 0.2);
}

.btn-grok {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-grok .launch-glyph {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}
.btn-grok:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-both {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.12), rgba(232, 121, 249, 0.1));
  border-color: rgba(167, 139, 250, 0.26);
}
.btn-both .launch-glyph {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
}

/* Gallery Toolbar & Content Archive */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-group select {
  width: auto;
  padding: 7px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.filter-search {
  flex: 1;
  min-width: 220px;
}

.filter-search input {
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.content-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  align-items: start;
}

/* Calm, Architectural Content Card */
.content-card {
  min-width: 0;
  max-width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all var(--transition-calm);
}

.content-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.45);
}

.content-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.provider-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}

.provider-pill.prov-gemini {
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.provider-pill.prov-grok {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modality-pill {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.08);
  color: #a5b4fc;
}

.learning-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.prompt-caption-box {
  font-size: 11.5px;
  color: var(--text-secondary);
  padding-left: 10px;
  border-left: 2px solid rgba(129, 140, 248, 0.4);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-media-frame {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #050609;
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-media-frame img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(65vh, 440px);
  object-fit: contain;
  display: block;
}

.source-media-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.source-media-chip img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.source-media-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.content-output-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.018);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  max-height: 240px;
  overflow-y: auto;
}

.hashtags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-chip {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Calm, Tactile 0..10 Affinity Slider */
.rating-slider-box {
  background: rgba(9, 11, 16, 0.55);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.rating-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.rating-title-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.rating-score-badge {
  font-size: 11px;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 9px;
  border-radius: 99px;
}

.score-unrated {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.score-low {
  background: rgba(251, 113, 133, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(251, 113, 133, 0.24);
}

.score-mid {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.24);
}

.score-high {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.26);
}

.rating-range-input {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(
    90deg,
    rgba(251, 113, 133, 0.45) 0%,
    rgba(148, 163, 184, 0.25) 50%,
    rgba(52, 211, 153, 0.55) 100%
  );
  outline: none;
  cursor: pointer;
}

.rating-range-input::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #090d16;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
  cursor: grab;
  transition: transform 0.12s ease;
}

.rating-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.rating-scale-captions {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
}

.content-card-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.content-card-actions .btn-mlt {
  margin-right: auto;
}

/* Neural Memory & Pipelines Tab */
.learning-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.95fr;
  gap: 24px;
  align-items: start;
  max-width: 1520px;
}

.learning-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.015);
}

.kpi-box strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  margin: 4px 0 2px;
}

.kpi-title {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.kpi-box small {
  font-size: 11px;
  color: var(--text-muted);
}

.kpi-emerald strong {
  color: var(--accent-emerald);
}
.kpi-amber strong {
  color: var(--accent-amber);
}
.kpi-crimson strong {
  color: var(--accent-rose);
}

.directive-pre {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-secondary);
  max-height: 240px;
  overflow-y: auto;
}

.exemplars-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.exemplar-col-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.mini-exemplar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-exemplar-item {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition-calm);
}

.task-card:hover {
  border-color: var(--border-hover);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

/* Refined Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost-danger,
.btn-ghost-xs,
.btn-mlt {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all var(--transition-calm);
}

.btn-primary {
  background: #f1f5f9;
  color: #090d16;
  font-weight: 600;
}

.btn-primary:hover {
  background: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.btn-ghost-danger {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost-danger:hover {
  color: var(--accent-rose);
  background: rgba(251, 113, 133, 0.08);
}

.btn-ghost-xs {
  padding: 4px 9px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
}

.btn-ghost-xs:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.btn-mlt {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.25);
  color: #c7d2fe;
  flex: 1;
}

.btn-mlt:hover {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}

.btn-link:hover {
  color: #a5b4fc;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-calm);
}

.icon-btn:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.text-emerald {
  color: var(--accent-emerald);
}

.text-crimson {
  color: var(--accent-rose);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: #10131c;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 92%;
  max-width: 540px;
  padding: 24px 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.mlt-reference-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent-primary);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.mlt-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  padding: 11px 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-calm);
}

.radio-card:hover {
  border-color: var(--border-hover);
}

.radio-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-primary);
}

.radio-card small {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: 16px 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: rgba(17, 20, 29, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #f1f5f9;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* --- "Build My Agents" & "Spawn an Agent" Styling --- */

.studio-quick-spawn-bar {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.06), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-spawn-info {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.quick-spawn-info svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.btn-spawn-inline {
  background: rgba(129, 140, 248, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.38);
  color: #e0e7ff;
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-calm);
}

.btn-spawn-inline:hover {
  background: rgba(129, 140, 248, 0.25);
  color: #fff;
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.25);
}

.spawner-hero-card {
  max-width: 1520px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.85), rgba(14, 17, 25, 0.75));
  border-color: rgba(129, 140, 248, 0.22);
}

.spawner-console-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spawner-overrides-row {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 0.9fr 0.9fr auto;
  gap: 12px;
  align-items: end;
}

.spawner-action-col {
  display: flex;
  align-items: flex-end;
}

.btn-spawn-hero {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #07080c;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(129, 140, 248, 0.25);
  transition: all var(--transition-calm);
}

.btn-spawn-hero:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 0 28px rgba(129, 140, 248, 0.45);
}

.btn-spawn-hero:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Spawn Telemetry Drawer */
.spawn-telemetry-drawer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.telemetry-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.telemetry-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.confidence-pill {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.spawn-combo-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.combo-node {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.combo-node-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: block;
}

.combo-node-val {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
  display: block;
}

.spawn-reasoning-list {
  list-style: none;
  background: rgba(9, 11, 16, 0.6);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.spawn-reasoning-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.spawn-reasoning-list li::before {
  content: "›";
  color: var(--accent-primary);
  font-weight: 700;
}

/* Build My Agents Two-Column Grid */
.agents-architect-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
  max-width: 1520px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.glyph-selector-row {
  display: flex;
  gap: 8px;
}

.glyph-pick-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.glyph-pick-btn:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.glyph-pick-btn.active {
  background: rgba(129, 140, 248, 0.16);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.25);
}

.skill-modules-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.skill-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.skill-pill.active {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.45);
  color: #e0e7ff;
}

/* Custom Agent Roster Cards */
.agents-roster-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-roster-card {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: all var(--transition-calm);
}

.agent-roster-card:hover {
  border-color: var(--border-hover);
}

.agent-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.agent-identity-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-emblem-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: #fff;
  flex-shrink: 0;
}

.agent-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.agent-card-role {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.agent-metrics-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-stat-pill {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.agent-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.agent-skill-tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.07);
  color: #a5b4fc;
}

.agent-directive-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.agent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}

.agent-lineage-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

/* --- Intuitive Step-by-Step Guide & Helper Styles --- */

.btn-sidebar-settings {
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 8px;
  padding: 6px 10px;
  color: #e0e7ff;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.btn-sidebar-settings:hover {
  background: rgba(129, 140, 248, 0.2);
  color: #fff;
  border-color: rgba(129, 140, 248, 0.5);
}

.sidebar-helper-text {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0 4px 10px;
  line-height: 1.4;
}

.guide-banner {
  max-width: 1520px;
  margin-bottom: 20px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(129, 140, 248, 0.055);
  border: 1px solid rgba(129, 140, 248, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 240px;
}

.guide-step strong {
  color: #f8fafc;
}

.guide-num {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.16);
  color: #c7d2fe;
  white-space: nowrap;
}

.guide-arrow {
  color: var(--text-muted);
  font-weight: 600;
}

.step-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(129, 140, 248, 0.16);
  color: #c7d2fe;
  margin-right: 5px;
}

.prompt-use-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.25);
  white-space: nowrap;
}

.visual-caption-option-bar {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.22);
}

.btn-danger-solid {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.btn-danger-solid:hover {
  background: rgba(244, 63, 94, 0.32);
  border-color: rgba(251, 113, 133, 0.75);
  color: #fff;
}

.btn-download-media {
  text-decoration: none;
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
  white-space: nowrap;
}

.btn-download-media:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}

/* ===================================================================== */
/* ULTRA-MINIMALIST SPATIAL LAYOUT & FLOATING HOVER TOOLTIPS             */
/* ===================================================================== */

.app-shell {
  grid-template-columns: 244px 1fr;
}

.client-header {
  padding: 14px 28px;
}

.workspace-nav-bar {
  padding: 8px 28px 0;
}

.tab-panel {
  padding: 22px 28px 48px;
}

.panel-card {
  padding: 18px 20px;
}

.card-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-header-compact h3 {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f8fafc;
}

.title-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.info-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  font-family: Georgia, serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: all var(--transition-calm);
}

.info-dot:hover {
  color: #fff;
  border-color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.16);
}

.form-row-split-compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-row-split-compact input[type="text"] {
  flex: 1;
  padding: 8px 11px;
  font-size: 12.5px;
}

.switch-label-compact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
}

.switch-label-compact input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.control-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.inline-option-row {
  margin-bottom: 10px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  background: rgba(129, 140, 248, 0.055);
  border: 1px solid rgba(129, 140, 248, 0.18);
}

.media-upload-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.upload-dropzone-slim {
  position: relative;
  flex: 1;
  border: 1px dashed rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.upload-dropzone-slim:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(129, 140, 248, 0.04);
}

.upload-dropzone-slim input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder-slim {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.provider-launch-bar-clean {
  display: grid;
  grid-template-columns: 1fr 1fr 0.78fr 1.1fr;
  gap: 8px;
}

.btn-launch-slim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.btn-launch-slim:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-launch-slim:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-spawn-accent {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #07080c;
  border-color: transparent;
}

.btn-spawn-accent:hover:not(:disabled) {
  background: #ffffff;
  box-shadow: 0 0 18px rgba(129, 140, 248, 0.35);
}

.provider-badges-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color var(--transition-calm);
}

.provider-badges-btn:hover {
  border-color: var(--border-hover);
}

.icon-btn-danger:hover {
  color: var(--accent-rose);
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.08);
}

/* Compact Spawner Console */
.spawner-input-row {
  display: flex;
  gap: 10px;
}

.spawner-input-row input {
  flex: 1;
}

.spawner-overrides-slim {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.spawner-overrides-slim select {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Compact Gallery Toolbar */
.gallery-toolbar {
  padding: 10px 14px;
  gap: 8px;
}

.gallery-toolbar select {
  width: auto;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Floating Tooltip Display for [data-tip] */
#mechagensTooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 270px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(12, 15, 24, 0.96);
  border: 1px solid rgba(129, 140, 248, 0.32);
  color: #e2e8f0;
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

#mechagensTooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive safeguards so no panel clips on narrower desktop windows */
.studio-col,
.panel-card {
  min-width: 0;
}

.segmented-control.modality-grid {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
}

@media (max-width: 1180px) {
  .studio-grid,
  .agents-architect-grid,
  .learning-grid {
    grid-template-columns: 1fr;
  }
  .provider-launch-bar-clean {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Fixed Read-Only System Prompt View */
.sys-prompt-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sys-prompt-read-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sys-prompt-fixed-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  max-height: 170px;
  overflow-y: auto;
}

.sys-prompt-fixed-text.is-empty {
  color: var(--text-muted);
  font-style: italic;
}

.sys-prompt-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sys-voice-chip {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-hairline);
  padding: 3px 9px;
  border-radius: 99px;
  max-width: 72%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sys-status-chip {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.sys-status-chip.off {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border-hairline);
}

/* LLM System Prompt Generator Drawer */
.btn-ghost-accent-xs {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(129, 140, 248, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.btn-ghost-accent-xs:hover {
  background: rgba(129, 140, 248, 0.22);
  border-color: rgba(129, 140, 248, 0.55);
  color: #fff;
}

.sys-prompt-gen-drawer {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(129, 140, 248, 0.055);
  border: 1px solid rgba(129, 140, 248, 0.24);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sys-prompt-gen-drawer textarea {
  font-size: 12.5px;
  padding: 9px 11px;
}

.sys-prompt-gen-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-xs {
  width: auto !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

/* Uploaded Media Vault Grid */
.media-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.media-vault-empty {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 12px 4px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.media-vault-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #07090f;
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: all var(--transition-calm);
}

.media-vault-tile:hover {
  border-color: rgba(129, 140, 248, 0.55);
  transform: translateY(-1px);
}

.media-vault-tile.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35);
}

.media-vault-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-vault-selected-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.92);
  color: #fff;
}

.media-vault-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(7, 8, 12, 0.78);
  color: #cbd5e1;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.media-vault-tile:hover .media-vault-del-btn {
  opacity: 1;
}

.media-vault-del-btn:hover {
  background: rgba(244, 63, 94, 0.88);
  color: #fff;
}

/* Client Logo Avatar Support */
.client-avatar-sm,
.client-avatar-lg {
  overflow: hidden;
}

.client-avatar-sm img,
.client-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.client-avatar-lg {
  cursor: pointer;
  transition: transform var(--transition-calm), box-shadow var(--transition-calm);
}

.client-avatar-lg:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.55);
}

.client-logo-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-logo-preview-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(129, 140, 248, 0.16);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.client-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Synth Futuristic Geometric Generation Type Tiles */
.agent-modality-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}

.modality-synth-tile {
  position: relative;
  background: rgba(9, 11, 18, 0.72);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 11px 8px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-calm);
  overflow: hidden;
}

.modality-synth-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--tile-glow, rgba(129, 140, 248, 0.16)), transparent 72%);
  opacity: 0;
  transition: opacity var(--transition-calm);
  pointer-events: none;
}

.modality-synth-tile:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  transform: translateY(-1px);
}

.modality-synth-tile:hover::before {
  opacity: 0.7;
}

.modality-synth-tile.active {
  border-color: var(--tile-accent, var(--accent-primary));
  background: rgba(18, 22, 36, 0.9);
  color: #fff;
  box-shadow: 0 0 18px -4px var(--tile-glow, rgba(129, 140, 248, 0.45));
}

.modality-synth-tile.active::before {
  opacity: 1;
}

.modality-synth-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tile-accent, var(--accent-primary));
}

.modality-synth-icon svg {
  width: 38px;
  height: 38px;
}

.modality-synth-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
}

/* Spawner Reference Media Bar */
.spawner-media-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(9, 11, 18, 0.55);
  border: 1px solid var(--border-hairline);
}

.spawner-media-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.spawner-media-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.spawn-media-vault-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
}

.spawn-media-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #050609;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: all var(--transition-calm);
}

.spawn-media-thumb:hover {
  border-color: rgba(129, 140, 248, 0.6);
  transform: scale(1.06);
}

.spawn-media-thumb.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.45);
}

.spawn-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spawn-media-empty {
  font-size: 11.5px;
  color: var(--text-muted);
}

.spawner-media-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.agent-media-picker-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(9, 11, 18, 0.58);
  border: 1px solid rgba(129, 140, 248, 0.22);
}

/* Custom Agent Avatar Upload */
.agent-name-avatar-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
}

.agent-avatar-upload-ctrl {
  display: flex;
  align-items: center;
  gap: 7px;
}

.agent-avatar-preview-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.agent-avatar-preview-box svg {
  width: 28px;
  height: 28px;
}

.agent-avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-emblem-box {
  overflow: hidden;
}

.agent-emblem-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spawner Live Tone & Randomness Modulator Dials */
.spawner-tone-dials-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 1020px) {
  .spawner-tone-dials-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tone-dial-chip {
  background: rgba(9, 11, 18, 0.62);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition-calm);
}

.tone-dial-chip:hover {
  border-color: var(--border-hover);
}

.tone-dial-chip.tone-dial-chaos {
  border-color: rgba(232, 121, 249, 0.24);
  background: rgba(232, 121, 249, 0.045);
}

.tone-dial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.tone-dial-top strong {
  color: #e2e8f0;
  font-size: 11.5px;
}

.tone-dial-slider {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.28), rgba(129, 140, 248, 0.7));
  outline: none;
  cursor: pointer;
}

.tone-dial-chaos .tone-dial-slider {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.28), rgba(232, 121, 249, 0.85));
}

.tone-dial-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #090d16;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.55);
  cursor: grab;
}

.spawn-new-prompt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.24);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.spawn-new-prompt-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.spawn-synth-prompt-box {
  background: rgba(129, 140, 248, 0.06);
  border-left: 2px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.5;
}

.spawn-synth-prompt-box strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a5b4fc;
  margin-bottom: 3px;
}

.sidebar-guide-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  transition: all var(--transition-calm);
}

.sidebar-guide-link:hover {
  color: #fff;
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(129, 140, 248, 0.08);
}

/* --- Multi-Tenant Account Bar, Empty Workspace, Masked Vault & Account Modal --- */

.sidebar-account-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-hairline);
}

.account-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-calm);
}

.account-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hairline);
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.35), rgba(56, 189, 248, 0.3));
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #e0e7ff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
  border-radius: 11px;
}

.account-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.account-meta strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-meta small {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-workspace-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.empty-workspace-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-workspace-emblem {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
}

.empty-workspace-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.empty-workspace-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.empty-workspace-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.empty-guide-link {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-cyan);
  text-decoration: none;
}

.empty-guide-link:hover {
  text-decoration: underline;
}

.vault-privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
  font-size: 12px;
  margin-bottom: 16px;
}

.vault-privacy-note svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.key-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.key-status-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-status-pill {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.key-status-pill.connected {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.account-profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-hairline);
  margin-bottom: 16px;
}

.account-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

.account-section h4 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.account-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-zone-box {
  background: rgba(251, 113, 133, 0.06);
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
}

.generate-submit-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

.gen-ref-picker-wrap {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(9, 11, 18, 0.58);
  border: 1px solid var(--border-hairline);
}

.gen-ref-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.gen-ref-picker-wrap .spawn-media-vault-strip {
  flex-wrap: wrap;
  gap: 9px;
  padding: 4px 2px;
}

.gen-ref-picker-wrap .spawn-media-thumb {
  width: 64px;
  height: 64px;
  border-radius: 9px;
}

.spawn-media-thumb {
  position: relative;
}

.thumb-ai-tag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(11, 15, 25, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
  line-height: 1.2;
  pointer-events: none;
}

.btn-generate-main {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 48%, #0ea5e9 100%);
  border: 1px solid rgba(165, 180, 252, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(15, 23, 42, 0.32),
    0 6px 20px -4px rgba(79, 70, 229, 0.48),
    0 2px 8px -2px rgba(14, 165, 233, 0.32);
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    filter 0.22s ease;
}

.btn-generate-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.24) 48%,
    transparent 76%
  );
  transform: translateX(-120%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.btn-generate-main > * {
  position: relative;
  z-index: 1;
}

.btn-generate-main svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
  transition: transform 0.22s ease;
}

.btn-generate-main:hover:not(:disabled) {
  color: #ffffff;
  background: linear-gradient(135deg, #5b52f0 0%, #6d6ff7 46%, #22b8f5 100%);
  border-color: rgba(199, 210, 254, 0.72);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(15, 23, 42, 0.28),
    0 10px 28px -4px rgba(99, 102, 241, 0.56),
    0 4px 14px -2px rgba(56, 189, 248, 0.42);
}

.btn-generate-main:hover:not(:disabled)::before {
  transform: translateX(120%);
}

.btn-generate-main:hover:not(:disabled) svg {
  transform: scale(1.08);
}

.btn-generate-main:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow:
    inset 0 2px 6px rgba(15, 23, 42, 0.35),
    0 3px 12px -2px rgba(79, 70, 229, 0.45);
}

.btn-generate-main:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #090d16,
    0 0 0 4px rgba(56, 189, 248, 0.75),
    0 8px 24px -4px rgba(99, 102, 241, 0.52);
}

.btn-generate-main:disabled {
  opacity: 0.76;
  cursor: wait;
  transform: none;
}

/* Signature Prismatic Cyan -> Indigo -> Violet Finish for Multi Media Pipeline CTA */
#btnRunMediaPipeline {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 52%, #9333ea 100%);
  border-color: rgba(125, 211, 252, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(15, 23, 42, 0.34),
    0 6px 22px -4px rgba(99, 102, 241, 0.48),
    0 2px 10px -2px rgba(147, 51, 234, 0.36);
}

#btnRunMediaPipeline:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9 0%, #7376f7 50%, #a855f7 100%);
  border-color: rgba(186, 230, 253, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(15, 23, 42, 0.28),
    0 10px 30px -4px rgba(99, 102, 241, 0.56),
    0 4px 16px -2px rgba(168, 85, 247, 0.45);
}

.btn-pipe-secondary {
  min-height: 46px;
}

.agent-run-spotlight {
  background: rgba(129, 140, 248, 0.05);
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

/* --- AI Generation Spinners & Live Activity Indicator --- */

@keyframes mechagensSpin {
  to {
    transform: rotate(360deg);
  }
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: mechagensSpin 0.65s linear infinite;
  flex-shrink: 0;
  vertical-align: middle;
}

.ai-activity-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  max-width: calc(100vw - 24px);
  border-radius: 999px;
  background: rgba(13, 17, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(129, 140, 248, 0.42);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(129, 140, 248, 0.18);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 500;
  pointer-events: none;
}

.ai-spinner-ring {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2.2px solid rgba(129, 140, 248, 0.22);
  border-top-color: #818cf8;
  border-right-color: #38bdf8;
  animation: mechagensSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.ai-activity-msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-activity-timer {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

/* --- Persistent LLM API Error / Warning Diagnostic Banner --- */

.api-error-banner {
  margin: 14px 24px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(127, 29, 29, 0.22);
  border: 1px solid rgba(251, 113, 133, 0.45);
  border-left: 3px solid #fb7185;
  color: #ffe4e6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-error-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.api-error-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fda4af;
  font-size: 13px;
}

.api-error-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.api-error-summary {
  font-size: 13px;
  line-height: 1.5;
  color: #fff1f2;
}

.api-error-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
}

.api-error-details {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #fecdd3;
  background: rgba(9, 11, 18, 0.72);
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow-y: auto;
}

.content-video-player {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(65vh, 460px);
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
  background: #05070c;
  outline: none;
}

.toast.toast-error {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(45, 14, 24, 0.94);
  color: #ffe4e6;
}

@media (max-width: 900px) {
  .api-error-banner {
    margin: 12px 14px 0;
    padding: 12px 14px;
  }
}

.danger-zone-box h4 {
  color: #fda4af;
}

/* --- Mobile Responsive Architecture & Slide-Over Drawer --- */

.brand-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mobile-topbar,
.mobile-only-btn,
.mobile-sidebar-overlay {
  display: none;
}

@media (hover: none) {
  #mechagensTooltip {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
  }

  .mobile-only-btn {
    display: inline-flex;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 14px;
    background: rgba(9, 11, 17, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-hairline);
  }

  .mobile-topbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    justify-content: center;
  }

  .mobile-topbar-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(3, 5, 10, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(304px, 86vw);
    height: 100dvh;
    z-index: 950;
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
    background: rgba(11, 13, 19, 0.97);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-workspace {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .client-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .client-header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }

  .workspace-nav-bar {
    padding: 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .workspace-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .workspace-tabs {
    display: inline-flex;
    min-width: max-content;
    gap: 8px;
  }

  .tab-btn {
    padding: 12px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .tab-panel {
    padding: 16px 14px 36px;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .workspace-nav-bar {
    padding: 0 8px;
  }

  .workspace-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    min-width: 0;
    gap: 2px;
  }

  .tab-btn {
    padding: 11px 4px;
    font-size: 12.5px;
    gap: 4px;
    justify-content: center;
  }

  .tab-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  .tab-pill {
    font-size: 10px;
    padding: 1px 5px;
  }

  .client-header {
    padding: 12px 14px;
  }

  .client-title-group {
    gap: 10px;
  }

  .client-avatar-lg {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .client-name-row h2 {
    font-size: 17px;
  }

  .telemetry-strip {
    padding: 5px 10px;
    gap: 10px;
    flex: 1;
    justify-content: space-around;
  }

  .stat-chip {
    font-size: 11px;
  }

  .panel-card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .card-header-compact {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Prevent iOS Safari zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px;
  }

  .form-row-split,
  .form-row-3,
  .form-row-split-compact,
  .exemplars-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .segmented-control.modality-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .seg-btn {
    padding: 9px 6px;
    font-size: 11.5px;
    min-height: 38px;
  }

  .provider-launch-bar-clean {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .btn-launch-slim {
    min-height: 42px;
    padding: 10px 10px;
    font-size: 12.5px;
  }

  .spawner-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .spawn-new-prompt-toggle {
    min-height: 40px;
    justify-content: center;
  }

  .btn-spawn-hero {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .spawner-overrides-slim {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .spawner-media-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .spawner-media-right {
    justify-content: flex-start;
  }

  .agent-name-avatar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .agent-modality-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .gallery-toolbar select {
    width: 100%;
    min-width: 0;
    font-size: 13px;
    padding: 8px 10px;
  }

  .gallery-toolbar .filter-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .gallery-toolbar .filter-search input {
    width: 100%;
    font-size: 16px;
  }

  .content-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .content-card {
    padding: 15px 14px;
    gap: 12px;
  }

  .content-card-top {
    align-items: flex-start;
  }

  .content-media-frame img,
  .content-video-player {
    max-height: min(62vh, 380px);
  }

  .content-output-text {
    font-size: 13px;
    padding: 12px 13px;
    max-height: 220px;
  }

  .rating-range-input::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .rating-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #090d16;
  }

  .content-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .content-card-actions .btn-mlt {
    grid-column: 1 / -1;
    margin-right: 0;
    width: 100%;
    justify-content: center;
    min-height: 38px;
  }

  .content-card-actions > button,
  .content-card-actions > a {
    width: 100%;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
  }

  .learning-kpi-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .kpi-box {
    padding: 10px 8px;
  }

  .kpi-box strong {
    font-size: 20px;
  }

  .empty-workspace-state {
    padding: 24px 14px;
  }

  .empty-workspace-card {
    padding: 26px 18px;
  }

  .empty-workspace-actions {
    width: 100%;
    flex-direction: column;
  }

  .empty-workspace-actions button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: center;
  }

  .modal-card {
    width: 100%;
    max-width: 100% !important;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }

  .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-footer button {
    flex: 1;
    min-width: 110px;
  }

  .account-action-row {
    flex-direction: column;
  }

  .account-action-row button {
    width: 100%;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 14px;
    max-width: none;
  }

  .toast {
    width: 100%;
  }
}

/* ========================================================================= */
/* GENERATOR MODE SWITCHER & BUILD MULTI MEDIA PIPELINE                      */
/* ========================================================================= */

.gen-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 14px;
  background: rgba(8, 12, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
}

.gen-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.gen-mode-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.gen-mode-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(56, 189, 248, 0.2));
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.22);
}

.gen-mode-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pipeline-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline-flow-tracker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}

.pipe-track-node {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.pipe-track-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.pipe-track-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.pipe-track-copy strong {
  font-size: 11.5px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipe-track-copy small {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipe-track-node[data-status="running"] {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.45);
}

.pipe-track-node[data-status="running"] .pipe-track-dot {
  background: #6366f1;
  color: #fff;
  border-color: #a5b4fc;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.7);
}

.pipe-track-node[data-status="done"] {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}

.pipe-track-node[data-status="done"] .pipe-track-dot {
  background: #10b981;
  color: #042f2e;
  border-color: #6ee7b7;
}

.pipe-track-node[data-status="error"] {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(251, 113, 133, 0.45);
}

.pipe-track-node[data-status="error"] .pipe-track-dot {
  background: #f43f5e;
  color: #fff;
  border-color: #fda4af;
}

.pipe-track-link {
  color: rgba(148, 163, 184, 0.45);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.pipe-stage-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(15, 22, 38, 0.56);
  border: 1px solid rgba(129, 140, 248, 0.18);
  transition: border-color 0.2s ease;
}

.pipe-stage-card-2 {
  border-color: rgba(56, 189, 248, 0.22);
}

.pipe-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.pipe-stage-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #f1f5f9;
}

.pipe-step-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.pipe-step-pill-2 {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
}

.pipe-mini-seg {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
}

.pipe-mini-btn {
  padding: 4px 9px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pipe-mini-btn:hover {
  color: #f8fafc;
}

.pipe-mini-btn.active {
  background: rgba(129, 140, 248, 0.28);
  color: #ffffff;
}

.pipe-target-grid {
  grid-template-columns: 1fr 1fr !important;
}

.pipe-connector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
}

.pipe-connector-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.1), rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.1));
}

.pipe-connector-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #93c5fd;
  background: rgba(14, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
}

.pipe-ref-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pipe-step2-ref-section {
  margin-top: 2px;
}

.pipe-ref-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pipe-upload-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pipe-step1-vision-row {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.22);
}

.pipe-ref-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.35);
  font-size: 11px;
  color: #e0e7ff;
  max-width: 240px;
}

.pipe-ref-selected-chip img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.pipe-ref-selected-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipe-ref-selected-chip button {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
}

.pipe-handoff-card {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipe-handoff-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pipe-handoff-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6ee7b7;
}

.pipe-handoff-meta {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pipe-handoff-actions {
  display: inline-flex;
  gap: 6px;
}

.pipe-handoff-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pipe-handoff-footer small {
  font-size: 11px;
  color: var(--text-muted);
}

.pipe-output-summary {
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.24);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
}

.pipe-output-summary-row strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  margin-bottom: 2px;
}

.btn-pipe-secondary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(129, 140, 248, 0.34);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.btn-pipe-secondary:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.55);
  color: #ffffff;
}

/* --- Collapsible Pro Camera & Lighting Settings Accordion --- */

.camera-craft-accordion {
  border-radius: 11px;
  background: rgba(11, 17, 30, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.pipeline-pane .camera-craft-accordion {
  margin-bottom: 0;
}

.camera-craft-accordion:hover {
  border-color: rgba(129, 140, 248, 0.3);
}

.camera-craft-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.camera-craft-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.camera-craft-toggle-left svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.camera-craft-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.26);
  white-space: nowrap;
}

.camera-craft-badge.has-custom {
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.45);
}

.camera-craft-chevron {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.camera-craft-toggle[aria-expanded="true"] .camera-craft-chevron {
  transform: rotate(180deg);
}

.camera-craft-body {
  padding: 2px 13px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.camera-craft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.camera-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.camera-field span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.camera-field select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.camera-field select:focus {
  border-color: rgba(129, 140, 248, 0.55);
}

.camera-craft-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.camera-craft-foot small {
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 540px) {
  .camera-craft-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Agents Tab: On-Demand Spawner Reveal Bar --- */

.agents-spawner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(13, 18, 32, 0.72);
  border: 1px solid rgba(129, 140, 248, 0.2);
  flex-wrap: wrap;
}

.agents-spawner-bar-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.agents-spawner-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.16);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.32);
}

.agents-spawner-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.btn-spawner-reveal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(14, 165, 233, 0.82));
  border: 1px solid rgba(165, 180, 252, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 14px -3px rgba(79, 70, 229, 0.45);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-spawner-reveal:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 210, 254, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px -4px rgba(56, 189, 248, 0.45);
}

.btn-spawner-reveal[aria-expanded="true"] {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  box-shadow: none;
}

/* --- Agent Builder Active Edit State Highlight --- */

@keyframes agentEditPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.65), 0 0 28px rgba(99, 102, 241, 0.4);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 24px rgba(56, 189, 248, 0.14);
  }
}

.agent-builder-card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.agent-builder-card.is-editing-agent {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 0 24px rgba(56, 189, 248, 0.14);
}

.agent-builder-card.edit-focus-flash {
  animation: agentEditPulse 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.agent-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(56, 189, 248, 0.38);
  font-size: 12px;
  color: #e0f2fe;
}

.agent-editing-banner-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.agent-editing-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  flex-shrink: 0;
}

.agent-card.is-being-edited {
  border-color: rgba(56, 189, 248, 0.62);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.agent-card.is-being-edited [data-edit-agent] {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.14);
}

/* --- Simplified & Reorganized "Spawn an Agent" Studio --- */

.spawner-clean-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.spawner-clean-header #btnHideSpawnerCard {
  white-space: nowrap;
  flex-shrink: 0;
}

.spawner-primary-zone .muted-inline {
  font-size: 11px;
  font-weight: 400;
}

.spawner-subtitle {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 780px;
}

.spawner-micro-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(9, 13, 24, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  flex-wrap: wrap;
}

.spawner-micro-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.micro-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.35);
  flex-shrink: 0;
}

.micro-step-arrow {
  color: rgba(148, 163, 184, 0.45);
  font-size: 12px;
}

.spawner-primary-zone {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 14px;
}

.spawn-vibe-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spawn-vibe-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.spawn-vibe-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spawn-vibe-pill {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(15, 22, 38, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  cursor: pointer;
  transition: all 0.18s ease;
}

.spawn-vibe-pill:hover {
  color: #f8fafc;
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.12);
}

.spawn-vibe-pill.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(56, 189, 248, 0.22));
  border-color: rgba(129, 140, 248, 0.58);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.22);
}

.spawner-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.spawner-primary-cta {
  min-width: 210px;
  flex: 0 1 280px;
}

.spawn-fresh-angle-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 46px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.spawn-fresh-angle-toggle:hover {
  border-color: rgba(129, 140, 248, 0.42);
  color: #ffffff;
}

.spawn-fresh-angle-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.spawn-advanced-accordion {
  margin-bottom: 0;
}

.spawn-adv-section {
  margin-top: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.spawn-adv-section:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.spawn-adv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.spawn-adv-section-head strong {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
}

.spawn-pin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.spawn-recipe-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.spawn-recipe-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 22, 38, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 11.5px;
  color: #e2e8f0;
}

.spawn-recipe-pill span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.spawn-why-details {
  margin-top: 12px;
  border-radius: 10px;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.spawn-why-details summary {
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  cursor: pointer;
  user-select: none;
}

.spawn-why-details summary:hover {
  color: #e0e7ff;
}

.spawn-why-details-body {
  padding: 0 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 900px) {
  .spawn-pin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .spawn-pin-grid {
    grid-template-columns: 1fr;
  }

  .spawner-primary-cta {
    width: 100%;
    flex: 1 1 100%;
  }

  .spawn-fresh-angle-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* --- Multi Media Pipeline Agent Config Box inside Build My Agents --- */

.agent-pipeline-config-box {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.09));
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.agent-pipeline-config-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.agent-pipeline-config-head strong {
  font-size: 12px;
  color: #e0f2fe;
}

.settings-section-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.settings-section-label .muted-inline {
  font-size: 11px;
  font-weight: 400;
}

@media (max-width: 640px) {
  .gen-mode-switcher {
    grid-template-columns: 1fr;
  }

  .pipeline-flow-tracker {
    flex-direction: column;
    align-items: stretch;
  }

  .pipe-track-link {
    justify-content: center;
    transform: rotate(90deg);
  }
}

/* ============================================================
   Dark Crystal Refraction Icons & Medallion Frames
   ============================================================ */

.segmented-control.crystal-modality-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: rgba(5, 7, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.crystal-seg-btn {
  position: relative;
  flex-direction: row;
  justify-content: flex-start;
  gap: 9px;
  padding: 6px 10px 6px 7px;
  border-radius: 11px;
  background: rgba(10, 12, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.055);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
}

.crystal-seg-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, var(--mod-glow, rgba(56, 189, 248, 0.32)), transparent 74%);
  opacity: 0;
  transition: opacity var(--transition-calm);
  pointer-events: none;
}

.crystal-seg-btn:hover {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(14, 17, 28, 0.82);
}

.crystal-seg-btn:hover::before {
  opacity: 0.55;
}

.crystal-seg-btn.active {
  background: linear-gradient(180deg, rgba(18, 22, 35, 0.96) 0%, rgba(9, 11, 18, 0.96) 100%);
  border-color: var(--mod-accent, #38bdf8);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 18px -4px var(--mod-glow, rgba(56, 189, 248, 0.42));
}

.crystal-seg-btn.active::before {
  opacity: 0.95;
}

.crystal-medallion {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #05060b;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  transition: transform var(--transition-calm), border-color var(--transition-calm), box-shadow var(--transition-calm);
}

.crystal-medallion img,
.crystal-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.crystal-seg-btn:hover .crystal-medallion img,
.modality-synth-tile:hover .crystal-emblem-img {
  transform: scale(1.07);
}

.crystal-seg-btn.active .crystal-medallion {
  border-color: var(--mod-accent, #38bdf8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 14px -2px var(--mod-glow, rgba(56, 189, 248, 0.45));
}

.crystal-pipe-grid {
  padding: 5px;
  background: rgba(5, 7, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.085);
}

.crystal-pipe-grid .crystal-seg-btn {
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
}

.crystal-medallion-sm {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

/* Upgraded Build My Agents Crystal Tiles */
.modality-synth-tile {
  background: rgba(8, 10, 17, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.modality-synth-icon.has-crystal-icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  overflow: hidden;
  background: #05060b;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 14px rgba(0, 0, 0, 0.5);
  transition: border-color var(--transition-calm), box-shadow var(--transition-calm);
}

.modality-synth-tile.active .modality-synth-icon.has-crystal-icon {
  border-color: var(--tile-accent, #38bdf8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 16px -2px var(--tile-glow, rgba(56, 189, 248, 0.45));
}

.agent-emblem-box.has-crystal-icon {
  padding: 0;
  border-width: 1px;
}

@media (max-width: 780px) {
  .segmented-control.crystal-modality-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .segmented-control.crystal-modality-grid .crystal-seg-btn {
    flex-direction: column;
    justify-content: center;
    padding: 8px 4px 7px;
    gap: 5px;
    font-size: 11px;
  }
}

/* ============================================================
   Gemini Lyria Music Controls, Audio Player & Video Thumbs
   ============================================================ */

.pipe-target-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.music-lyria-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(14, 16, 26, 0.88));
  border: 1px solid rgba(168, 85, 247, 0.34);
  font-size: 11.5px;
  color: #e9d5ff;
}

.music-lyria-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 10px #a855f7;
  flex-shrink: 0;
}

.is-provider-disabled {
  opacity: 0.36 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.music-craft-accordion {
  border-color: rgba(168, 85, 247, 0.28);
}

.music-craft-accordion .camera-craft-toggle-left svg {
  color: #c084fc;
}

.camera-craft-badge.music-badge {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.38);
  color: #e9d5ff;
}

.crystal-audio-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.13) 0%, rgba(8, 10, 18, 0.94) 65%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(168, 85, 247, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 22px rgba(0, 0, 0, 0.38);
}

.crystal-audio-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crystal-audio-thumb {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 16px -2px rgba(168, 85, 247, 0.4);
  flex-shrink: 0;
  background: #05060b;
}

.crystal-audio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crystal-audio-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.crystal-audio-meta strong {
  font-size: 13px;
  color: #f8fafc;
  font-weight: 600;
}

.crystal-audio-meta span {
  font-size: 11px;
  color: #d8b4fe;
  font-family: "JetBrains Mono", monospace;
}

.content-audio-player {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  color-scheme: dark;
}

.spawn-media-thumb.is-video-thumb {
  position: relative;
}

.spawn-media-thumb.is-video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-video-tag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.88);
  color: #ffffff;
  pointer-events: none;
}

.btn-score-music {
  border-color: rgba(168, 85, 247, 0.36) !important;
  color: #e9d5ff !important;
}

.btn-score-music:hover {
  border-color: rgba(168, 85, 247, 0.65) !important;
  background: rgba(168, 85, 247, 0.16) !important;
  color: #ffffff !important;
}

@media (max-width: 640px) {
  .pipe-target-grid-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   Creative Studio Mixer & Multi-Track Compositor
   ============================================================ */

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.studio-toolbar-left,
.studio-toolbar-right,
.studio-project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-project-name-input {
  width: 220px;
  max-width: 100%;
  padding: 7px 11px !important;
  font-size: 13px !important;
  font-weight: 600;
  background: rgba(6, 8, 14, 0.9) !important;
}

.studio-project-select {
  width: auto !important;
  min-width: 155px;
  padding: 6px 10px !important;
  font-size: 12px !important;
}

.studio-aspect-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(5, 7, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.studio-aspect-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-aspect-btn:hover {
  color: #fff;
}

.studio-aspect-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.48);
  color: #e0f2fe;
}

.studio-render-cta {
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1 0%, #38bdf8 52%, #a855f7 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.35);
}

.studio-render-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.42);
}

.studio-mixer-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.studio-bin-card,
.studio-stage-card,
.studio-inspector-card {
  padding: 16px;
  min-width: 0;
}

.studio-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.studio-pane-head h3 {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
}

.studio-pane-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.studio-bin-source-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(5, 7, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.studio-bin-source-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-calm);
}

.studio-bin-source-btn:hover {
  color: #fff;
}

.studio-bin-source-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.42);
  color: #e0f2fe;
}

.studio-bin-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.studio-bin-filter {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-bin-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.studio-bin-filter.active {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

.studio-asset-bin-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 2px;
}

.studio-bin-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(7, 9, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.065);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-bin-item:hover {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 19, 32, 0.92);
  transform: translateY(-1px);
}

.studio-bin-item.kind-audio:hover {
  border-color: rgba(168, 85, 247, 0.55);
}

.studio-bin-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: #04050a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.studio-bin-thumb img,
.studio-bin-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-bin-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  background: rgba(34, 197, 94, 0.85);
}

.studio-bin-badge.aud {
  background: rgba(168, 85, 247, 0.9);
}

.studio-bin-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.studio-bin-meta strong {
  font-size: 12px;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-bin-meta span {
  font-size: 10px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.studio-bin-add {
  font-size: 10.5px;
  font-weight: 600;
  color: #7dd3fc;
  flex-shrink: 0;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
}

.studio-bin-item.kind-audio .studio-bin-add {
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.15);
}

.studio-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 16px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.09);
  text-align: center;
}

/* Center Stage Preview */
.studio-stage-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 14px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.05), rgba(4, 5, 10, 0.96) 78%);
  border: 1px solid rgba(255, 255, 255, 0.065);
  margin-bottom: 12px;
}

.studio-stage-frame {
  position: relative;
  width: 100%;
  max-height: 430px;
  border-radius: 12px;
  overflow: hidden;
  background: #04050a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-stage-frame.aspect-9-16 {
  aspect-ratio: 9 / 16;
  max-width: 242px;
}

.studio-stage-frame.aspect-4-5 {
  aspect-ratio: 4 / 5;
  max-width: 344px;
}

.studio-stage-frame.aspect-1-1 {
  aspect-ratio: 1 / 1;
  max-width: 390px;
}

.studio-stage-frame.aspect-16-9 {
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

.studio-stage-empty {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.studio-stage-empty-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-stage-empty-icons img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
}

.studio-stage-empty strong {
  font-size: 13.5px;
  color: #f8fafc;
}

.studio-stage-empty p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 220px;
}

.studio-stage-media-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #05060b;
}

.studio-stage-media-wrap[data-grade="obsidian"] {
  filter: contrast(1.14) brightness(0.97) saturate(1.06);
}
.studio-stage-media-wrap[data-grade="warm"] {
  filter: contrast(1.06) saturate(1.14) sepia(0.14);
}
.studio-stage-media-wrap[data-grade="cinema"] {
  filter: contrast(1.12) saturate(0.92) hue-rotate(-6deg);
}
.studio-stage-media-wrap[data-grade="mono"] {
  filter: grayscale(1) contrast(1.18);
}

.studio-preview-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

.studio-preview-text-layer {
  position: absolute;
  left: 8%;
  right: 8%;
  z-index: 5;
  display: flex;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.studio-preview-text-layer.pos-top { top: 10%; }
.studio-preview-text-layer.pos-center { top: 50%; transform: translateY(-50%); }
.studio-preview-text-layer.pos-lower_third { bottom: 20%; }
.studio-preview-text-layer.pos-bottom { bottom: 8%; }

.studio-preview-text-layer span {
  display: inline-block;
  font-weight: 700;
  line-height: 1.25;
  white-space: pre-wrap;
  word-break: break-word;
}

.studio-preview-text-layer.size-sm span { font-size: 12px; }
.studio-preview-text-layer.size-md span { font-size: 15px; }
.studio-preview-text-layer.size-lg span { font-size: 19px; }

.studio-preview-text-layer.style-obsidian_pill span {
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(7, 9, 16, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.studio-preview-text-layer.style-cinema_bold span,
.studio-preview-text-layer.style-editorial_clean span {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.studio-preview-logo-layer {
  position: absolute;
  z-index: 6;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  pointer-events: none;
}

.studio-preview-logo-layer.corner-top_left { top: 12px; left: 12px; }
.studio-preview-logo-layer.corner-top_right { top: 12px; right: 12px; }
.studio-preview-logo-layer.corner-bottom_left { bottom: 12px; left: 12px; }
.studio-preview-logo-layer.corner-bottom_right { bottom: 12px; right: 12px; }

/* Transport Bar */
.studio-transport-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(6, 8, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-transport-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.studio-transport-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-transport-play:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #fff;
}

.studio-scrubber {
  flex: 1;
  min-width: 0;
  accent-color: #38bdf8;
  cursor: pointer;
}

.studio-track-row-ruler {
  align-items: center;
  margin-bottom: 2px;
}

.studio-track-label-ruler {
  border-color: rgba(56, 189, 248, 0.28) !important;
  color: #7dd3fc !important;
  min-height: 28px !important;
  padding: 4px 8px !important;
}

.studio-timeline-ruler {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 8px;
  background: rgba(6, 10, 19, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.24);
  cursor: pointer;
  user-select: none;
  overflow: visible;
}

.studio-timeline-ruler:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.studio-ruler-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 7px;
}

.studio-ruler-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  padding-left: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  line-height: 26px;
  color: #94a3b8;
  white-space: nowrap;
}

.studio-ruler-playhead {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
  pointer-events: none;
  transform: translateX(-1px);
  z-index: 3;
}

.studio-ruler-playhead::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #0b1120;
}

.studio-ruler-hover-tip {
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(7, 11, 22, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}

.studio-time-display {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.studio-rendered-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(8, 10, 18, 0.94));
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.studio-rendered-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.studio-rendered-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #d1fae5;
}

.studio-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.studio-rendered-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.studio-rendered-video {
  width: 100%;
  max-height: 300px;
  border-radius: 9px;
  background: #000;
  display: block;
}

/* Right Inspector */
.studio-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(5, 7, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.studio-insp-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-insp-tab:hover {
  color: #fff;
}

.studio-insp-tab.active {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.42);
  color: #fff;
}

.studio-selected-clip-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.28);
  margin-bottom: 12px;
}

.studio-selected-clip-badge strong {
  font-size: 12px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-selected-clip-badge.studio-audio-badge {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.36);
}

.studio-grade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.studio-grade-btn {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(8, 10, 17, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.studio-grade-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.studio-grade-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}

/* Bottom Multi-Track Timeline */
.studio-timeline-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
}

.studio-track-label {
  width: 78px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.studio-track-label-audio {
  color: #d8b4fe;
}

.studio-visual-track,
.studio-audio-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(5, 7, 12, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.075);
  min-height: 58px;
}

.studio-track-empty {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 6px;
}

.studio-clip-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(14, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-calm);
}

.studio-clip-pill:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.studio-clip-pill.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 14px -3px rgba(56, 189, 248, 0.45);
  background: rgba(17, 25, 42, 0.96);
}

.studio-clip-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.studio-clip-thumb img,
.studio-clip-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-clip-dur {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
}

.studio-clip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 120px;
}

.studio-clip-info strong {
  font-size: 11.5px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-clip-info span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.studio-clip-ctrls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.studio-clip-ctrls button {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}

.studio-clip-ctrls button:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.studio-clip-ctrls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.studio-clip-ctrls button.danger:hover {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.45);
}

.studio-audio-bar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  width: 100%;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(168, 85, 247, 0.45);
  cursor: pointer;
}

.studio-audio-bar-chip img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.studio-audio-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.studio-audio-bar-copy strong {
  font-size: 12px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-audio-bar-copy span {
  font-size: 10.5px;
  color: #e9d5ff;
  font-family: "JetBrains Mono", monospace;
}

.btn-open-studio {
  border-color: rgba(56, 189, 248, 0.34) !important;
  color: #bae6fd !important;
}

.btn-open-studio:hover {
  border-color: rgba(56, 189, 248, 0.68) !important;
  background: rgba(56, 189, 248, 0.14) !important;
  color: #fff !important;
}

@media (max-width: 1180px) {
  .studio-mixer-grid {
    grid-template-columns: 1fr;
  }
  .studio-asset-bin-list {
    max-height: 240px;
  }
}

@media (max-width: 640px) {
  .studio-toolbar {
    padding: 12px;
  }
  .studio-project-name-input {
    width: 100%;
  }
  .studio-toolbar-left,
  .studio-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .studio-track-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .studio-track-label {
    width: auto;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================================
   Compact Gallery-First Library Cards + Details Dropdown
   ============================================================ */

.content-card.is-compact-library {
  padding: 12px;
  gap: 10px;
  justify-content: flex-start;
}

.library-card-creative {
  width: 100%;
  min-width: 0;
}

.content-card.is-compact-library .content-media-frame {
  margin: 0;
}

.content-card.is-compact-library .crystal-audio-card {
  margin: 0;
}

.library-details-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-calm);
}

.library-details-toggle:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

.library-details-toggle.is-open {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.34);
  color: #e0e7ff;
}

.library-details-chevron {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.library-details-toggle.is-open .library-details-chevron {
  transform: rotate(180deg);
}

.library-details-drawer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.library-details-toggle-title {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-align: left;
}

.library-details-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.content-label-editor {
  display: flex;
  align-items: center;
  gap: 6px;
}

.content-label-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px !important;
  font-size: 12px !important;
  background: rgba(6, 8, 14, 0.88) !important;
  border-radius: 8px !important;
}

/* ============================================================
   Studio V2 — AI Extend Clip & AI Voiceover Track Controls
   ============================================================ */

.studio-ai-extend-card {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(52, 211, 153, 0.28);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.studio-ai-extend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-ai-extend-head strong {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #a7f3d0;
}

.studio-mini-select {
  width: auto !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  background: rgba(6, 9, 18, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
}

.studio-extend-input {
  width: 100%;
  min-height: 78px;
  padding: 9px 11px !important;
  font-size: 12.5px !important;
  line-height: 1.45;
  border-radius: 8px !important;
  background: rgba(6, 9, 18, 0.88) !important;
  resize: vertical;
}

.studio-voice-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.studio-voice-select {
  width: 100%;
  padding: 9px 11px !important;
  font-size: 13px !important;
  min-height: 40px;
  border-radius: 8px !important;
}

.studio-voice-style-input {
  width: 100%;
  min-height: 60px;
  padding: 9px 11px !important;
  font-size: 12.5px !important;
  line-height: 1.45;
  border-radius: 8px !important;
  resize: vertical;
}

.studio-voice-textarea {
  width: 100%;
  min-height: 92px;
  padding: 9px 11px !important;
  font-size: 12.5px !important;
  line-height: 1.45;
  resize: vertical;
}

.btn-studio-extend {
  width: 100%;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(56, 189, 248, 0.18));
  color: #ecfdf5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-studio-extend:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.36), rgba(56, 189, 248, 0.28));
  border-color: rgba(110, 231, 183, 0.78);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.2);
}

.btn-studio-extend:disabled {
  opacity: 0.55;
  cursor: wait;
}

.studio-voice-generator-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-studio-voice-gen {
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(129, 140, 248, 0.2));
  color: #f0f9ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-studio-voice-gen:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.36), rgba(129, 140, 248, 0.3));
  border-color: rgba(125, 211, 252, 0.8);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.22);
}

.btn-studio-voice-gen:disabled {
  opacity: 0.55;
  cursor: wait;
}

.studio-voice-badge {
  border-color: rgba(56, 189, 248, 0.42) !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

.studio-track-label-voice {
  border-color: rgba(56, 189, 248, 0.32) !important;
  color: #bae6fd !important;
}

.studio-voice-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(6, 10, 19, 0.65);
  border: 1px dashed rgba(56, 189, 248, 0.24);
}

.studio-voice-bar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  width: 100%;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.45);
  cursor: pointer;
}

.studio-voice-bar-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.studio-voice-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.studio-voice-bar-copy strong {
  font-size: 12px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-voice-bar-copy span {
  font-size: 10.5px;
  color: #bae6fd;
  font-family: "JetBrains Mono", monospace;
}

.studio-bin-badge.vox {
  background: rgba(56, 189, 248, 0.88);
  color: #04131e;
}

/* ============================================================
   Studio V2 Phase B — Captions, Speed FX, Waveform & Beat-Sync
   ============================================================ */

.studio-video-fx-box,
.studio-clip-caption-box {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.studio-fx-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.studio-clip-caption-box input[type="text"],
.studio-clip-caption-box select {
  font-size: 11.5px !important;
  padding: 6px 8px !important;
}

.studio-beatsync-box {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.1), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-beatsync-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-studio-beatsync {
  flex: 1;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid rgba(192, 132, 252, 0.5);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(99, 102, 241, 0.22));
  color: #faf5ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-studio-beatsync:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.42), rgba(99, 102, 241, 0.34));
  border-color: rgba(216, 180, 254, 0.85);
}

.studio-beatsync-meta {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.studio-audio-bar-chip.has-waveform {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.studio-audio-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.studio-waveform-wrap {
  position: relative;
  width: 100%;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(5, 8, 16, 0.86);
  border: 1px solid rgba(168, 85, 247, 0.28);
  cursor: crosshair;
}

.studio-waveform-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.studio-clip-cap-dot {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.45);
  margin-left: 4px;
  vertical-align: middle;
}

/* ============================================================
   Studio V3 — Spacious UX: AI Director, Brand Presets,
   Split-Screen/PiP Stage, Lyria Auto-Score, Batch Export & Cover
   ============================================================ */

.btn-studio-tool {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid rgba(129, 140, 248, 0.36);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-studio-tool:hover {
  border-color: rgba(168, 85, 247, 0.65);
  background: rgba(99, 102, 241, 0.18);
  color: #ffffff;
}

/* Live Stage Split-Screen & Picture-in-Picture Layouts */
.studio-stage-media-wrap {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
}

.studio-stage-primary-slot {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.studio-stage-secondary-slot {
  position: relative;
  overflow: hidden;
  background: #060812;
}

.studio-stage-media-wrap[data-layout="split_h"] {
  flex-direction: row;
}

.studio-stage-media-wrap[data-layout="split_h"] .studio-stage-primary-slot,
.studio-stage-media-wrap[data-layout="split_h"] .studio-stage-secondary-slot {
  width: 50%;
  height: 100%;
  flex: 0 0 50%;
}

.studio-stage-media-wrap[data-layout="split_h"] .studio-stage-secondary-slot {
  border-left: 2px solid rgba(7, 10, 20, 0.92);
}

.studio-stage-media-wrap[data-layout="split_v"] {
  flex-direction: column;
}

.studio-stage-media-wrap[data-layout="split_v"] .studio-stage-primary-slot,
.studio-stage-media-wrap[data-layout="split_v"] .studio-stage-secondary-slot {
  width: 100%;
  height: 50%;
  flex: 0 0 50%;
}

.studio-stage-media-wrap[data-layout="split_v"] .studio-stage-secondary-slot {
  border-top: 2px solid rgba(7, 10, 20, 0.92);
}

.studio-stage-media-wrap[data-layout="pip_br"] .studio-stage-secondary-slot,
.studio-stage-media-wrap[data-layout="pip_tr"] .studio-stage-secondary-slot {
  position: absolute;
  right: 4%;
  width: 36%;
  height: 32%;
  border-radius: 10px;
  border: 2px solid rgba(56, 189, 248, 0.85);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  z-index: 4;
}

.studio-stage-media-wrap[data-layout="pip_br"] .studio-stage-secondary-slot {
  bottom: 4%;
}

.studio-stage-media-wrap[data-layout="pip_tr"] .studio-stage-secondary-slot {
  top: 4%;
}

/* Collapsible Split/PiP Drawer in Clip Inspector */
.studio-collapsible-card {
  margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.studio-collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.studio-collapsible-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.studio-collapsible-body {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.studio-sec-media-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 6px;
}

.studio-sec-thumb {
  position: relative;
  flex: 0 0 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.22);
  background: #060912;
  padding: 0;
  cursor: pointer;
}

.studio-sec-thumb.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.studio-sec-thumb img,
.studio-sec-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lyria Auto-Score Card in Music Tab */
.studio-autoscore-card {
  padding: 12px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(168, 85, 247, 0.34);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-studio-autoscore {
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid rgba(192, 132, 252, 0.55);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(56, 189, 248, 0.22));
  color: #faf5ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-studio-autoscore:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.46), rgba(56, 189, 248, 0.32));
  border-color: rgba(216, 180, 254, 0.85);
}

/* Multi-Ratio Batch Export Pills */
.studio-batch-ratio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-batch-pill {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 22, 0.72);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.studio-batch-pill:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}

.studio-batch-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.72);
  color: #e0f2fe;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.16);
}

/* Multi-Variant Output Bar & Cover Preview */
.studio-variants-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.studio-variant-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.studio-variant-btn.active {
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(56, 189, 248, 0.2);
  color: #f0f9ff;
}

.studio-cover-preview-img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 9px;
  background: #050811;
}

/* AI Auto-Director & Brand Preset Modals */
.studio-director-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.studio-director-preview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.studio-director-summary {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.studio-director-clips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.studio-director-clip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12.5px;
}

.studio-director-clip-row strong {
  color: #f8fafc;
}

.studio-preset-summary-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.78);
  border: 1px solid rgba(129, 140, 248, 0.25);
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.5;
}

.studio-preset-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}




















