@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root, [data-theme="gold"] {
  --bg-void:       #0d0d0f;
  --bg-deep:       #111114;
  --bg-panel:      #16161b;
  --bg-section:    #1a1a20;
  --bg-card:       #1e1e26;
  --bg-glass:      rgba(22, 22, 26, 0.78);
  --bg-glass-card: rgba(26, 26, 31, 0.78);
  --bg-btn:        rgba(255, 255, 255, 0.025);
  --bg-btn-hover:  rgba(255, 255, 255, 0.06);
  --bg-btn-active: rgba(255, 255, 255, 0.01);

  /* ── Invisible Borders ── */
  --border:        rgba(255, 255, 255, 0.04);
  --border-light:  rgba(255, 255, 255, 0.08);
  --border-gold:   rgba(210, 185, 140, 0.2);
  --border-focus:  rgba(210, 185, 140, 0.4);

  /* ── Soft Typography ── */
  --text-primary:   #d4d4d8;
  --text-secondary: #8c8c94;
  --text-muted:     #5e5e66;
  --text-hint:      #43434a;

  /* ── Muted Champagne Gold System ── */
  --gold:           #d2b98c;
  --gold-bright:    #e8d2ac;
  --gold-dim:       #8a7654;
  --gold-glow:      rgba(210, 185, 140, 0.08);
  --gold-glow-sm:   rgba(210, 185, 140, 0.03);
  --gold-gradient:  linear-gradient(135deg, rgba(210, 185, 140, 0.9), rgba(180, 155, 110, 0.9));
  --gold-gradient-static: linear-gradient(135deg, rgba(210, 185, 140, 0.85), rgba(180, 155, 110, 0.85));

  /* ── Accent Purple (for variety) ── */
  --purple:         #8b7ab8;
  --purple-glow:    rgba(139, 122, 184, 0.1);
  --cyan:           #6fa3b5;
  --cyan-glow:      rgba(111, 163, 181, 0.1);

  /* ── Status Colors (Softer) ── */
  --status-ok:     #d2b98c;
  --status-green:  #639c75;
  --status-red:    #b56969;
  --status-blue:   #688cb0;

  /* ── Radius Scale (Smooth & Round) ── */
  --radius-xs:  6px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* ── Transitions (Silky Smooth) ── */
  --transition:       all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-fast:  all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-slow:  all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring:           all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

html, body {
  background-color: var(--bg-void, #0d0d0f);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   THEME 1 (default) — Champagne Gold × Royal Charcoal
   Already defined in :root above — no override needed.
═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   THEME 2 — Midnight Sapphire × Deep Navy
═══════════════════════════════════════════════════════════════ */
[data-theme="sapphire"] {
  --bg-void:       #060c18;
  --bg-deep:       #080e1e;
  --bg-panel:      #0a1122;
  --bg-section:    #0d1528;
  --bg-card:       #10192e;
  --bg-glass:      rgba(13, 21, 40, 0.68);
  --bg-glass-card: rgba(16, 25, 46, 0.68);
  --bg-btn:        rgba(91, 155, 213, 0.04);
  --bg-btn-hover:  rgba(91, 155, 213, 0.09);

  --border:        rgba(91, 155, 213, 0.06);
  --border-light:  rgba(91, 155, 213, 0.12);
  --border-gold:   rgba(91, 155, 213, 0.22);
  --border-focus:  rgba(91, 155, 213, 0.45);

  --gold:           #5b9bd5;
  --gold-bright:    #82b8e8;
  --gold-dim:       #3a6899;
  --gold-glow:      rgba(91, 155, 213, 0.1);
  --gold-glow-sm:   rgba(91, 155, 213, 0.04);
  --gold-gradient:  linear-gradient(135deg, rgba(91, 155, 213, 0.9), rgba(55, 110, 170, 0.9));
  --gold-gradient-static: linear-gradient(135deg, rgba(91, 155, 213, 0.85), rgba(55, 110, 170, 0.85));
  --status-ok:     #5b9bd5;
}

/* ═══════════════════════════════════════════════════════════════
   THEME 3 — Obsidian Emerald × Dark Forest
═══════════════════════════════════════════════════════════════ */
[data-theme="emerald"] {
  --bg-void:       #050d08;
  --bg-deep:       #07100b;
  --bg-panel:      #09130d;
  --bg-section:    #0c1710;
  --bg-card:       #101c14;
  --bg-glass:      rgba(12, 23, 16, 0.68);
  --bg-glass-card: rgba(16, 28, 20, 0.68);
  --bg-btn:        rgba(79, 192, 141, 0.04);
  --bg-btn-hover:  rgba(79, 192, 141, 0.09);

  --border:        rgba(79, 192, 141, 0.06);
  --border-light:  rgba(79, 192, 141, 0.12);
  --border-gold:   rgba(79, 192, 141, 0.22);
  --border-focus:  rgba(79, 192, 141, 0.45);

  --gold:           #4fc08d;
  --gold-bright:    #74d4a8;
  --gold-dim:       #2d8a5e;
  --gold-glow:      rgba(79, 192, 141, 0.1);
  --gold-glow-sm:   rgba(79, 192, 141, 0.04);
  --gold-gradient:  linear-gradient(135deg, rgba(79, 192, 141, 0.9), rgba(40, 145, 95, 0.9));
  --gold-gradient-static: linear-gradient(135deg, rgba(79, 192, 141, 0.85), rgba(40, 145, 95, 0.85));
  --status-ok:     #4fc08d;
}

/* ═══════════════════════════════════════════════════════════════
   THEME 4 — Arctic Rose × Near-Black Slate
═══════════════════════════════════════════════════════════════ */
[data-theme="rose"] {
  --bg-void:       #0e0b10;
  --bg-deep:       #110d14;
  --bg-panel:      #141018;
  --bg-section:    #18131c;
  --bg-card:       #1d1722;
  --bg-glass:      rgba(24, 19, 28, 0.68);
  --bg-glass-card: rgba(29, 23, 34, 0.68);
  --bg-btn:        rgba(224, 123, 138, 0.04);
  --bg-btn-hover:  rgba(224, 123, 138, 0.09);

  --border:        rgba(224, 123, 138, 0.06);
  --border-light:  rgba(224, 123, 138, 0.12);
  --border-gold:   rgba(224, 123, 138, 0.22);
  --border-focus:  rgba(224, 123, 138, 0.45);

  --gold:           #e07b8a;
  --gold-bright:    #f0a0ae;
  --gold-dim:       #a04a58;
  --gold-glow:      rgba(224, 123, 138, 0.1);
  --gold-glow-sm:   rgba(224, 123, 138, 0.04);
  --gold-gradient:  linear-gradient(135deg, rgba(224, 123, 138, 0.9), rgba(170, 75, 90, 0.9));
  --gold-gradient-static: linear-gradient(135deg, rgba(224, 123, 138, 0.85), rgba(170, 75, 90, 0.85));
  --status-ok:     #e07b8a;
}

/* ═══════════════════════════════════════════════════════════════
   THEME 5 — Void Violet × Electric Lavender
═══════════════════════════════════════════════════════════════ */
[data-theme="violet"] {
  --bg-void:       #070612;
  --bg-deep:       #090816;
  --bg-panel:      #0c0a1a;
  --bg-section:    #0f0d1f;
  --bg-card:       #131126;
  --bg-glass:      rgba(15, 13, 31, 0.68);
  --bg-glass-card: rgba(19, 17, 38, 0.68);
  --bg-btn:        rgba(155, 126, 232, 0.04);
  --bg-btn-hover:  rgba(155, 126, 232, 0.09);

  --border:        rgba(155, 126, 232, 0.06);
  --border-light:  rgba(155, 126, 232, 0.12);
  --border-gold:   rgba(155, 126, 232, 0.22);
  --border-focus:  rgba(155, 126, 232, 0.45);

  --gold:           #9b7ee8;
  --gold-bright:    #b89ef5;
  --gold-dim:       #6a52b5;
  --gold-glow:      rgba(155, 126, 232, 0.1);
  --gold-glow-sm:   rgba(155, 126, 232, 0.04);
  --gold-gradient:  linear-gradient(135deg, rgba(155, 126, 232, 0.9), rgba(105, 80, 190, 0.9));
  --gold-gradient-static: linear-gradient(135deg, rgba(155, 126, 232, 0.85), rgba(105, 80, 190, 0.85));
  --status-ok:     #9b7ee8;
}

/* ── Theme Switcher Scrollbar tint per theme ── */
[data-theme="sapphire"] ::-webkit-scrollbar-thumb:hover { background: rgba(91, 155, 213, 0.35); }
[data-theme="emerald"]  ::-webkit-scrollbar-thumb:hover { background: rgba(79, 192, 141, 0.35); }
[data-theme="rose"]     ::-webkit-scrollbar-thumb:hover { background: rgba(224, 123, 138, 0.35); }
[data-theme="violet"]   ::-webkit-scrollbar-thumb:hover { background: rgba(155, 126, 232, 0.35); }

/* ── Theme Switcher Component ──────────────────────────────── */
.theme-switcher-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px 12px;
}
.ts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ts-active-label {
  font-size: 8.5px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--gold-glow);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-gold);
  transition: all 0.3s ease;
}
.ts-swatches {
  display: flex;
  gap: 8px;
}
.ts-swatch {
  flex: 1;
  position: relative;
  height: 38px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ts-swatch-bg {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 4px;
  opacity: 0.85;
}
.ts-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.ts-swatch:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.ts-swatch:hover .ts-dot {
  transform: scale(1.25);
}
.ts-swatch.active {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow), 0 4px 12px rgba(0,0,0,0.4);
}
.ts-swatch.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  z-index: 2;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10px;
  font-weight: 400;
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(232, 196, 106, 0.3); }

/* ── Status Bar ── */
#status-bar {
  flex-shrink: 0;
  height: 20px;
  line-height: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  padding: 0 10px 0 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(20px);
  z-index: 100;
  position: relative;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
#status-bar::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D4AF37;
  box-shadow: 0 0 6px rgba(210,185,140,0.2);
  animation: statusPulse 3s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 0.8; box-shadow: 0 0 4px rgba(210,185,140,0.3); }
  50% { opacity: 0.4; box-shadow: 0 0 2px rgba(210,185,140,0.1); }
}

/* ── Tabs (Minimal) ── */
.tabs {
  flex-shrink: 0;
  height: 36px;
  display: flex;
  background: var(--bg-void);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  position: relative;
  padding: 0 4px;
  gap: 4px;
  justify-content: center;
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
  gap: 6px;
  border-radius: var(--radius-sm);
  margin: 4px 0;
}
.tab:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.015);
}
.tab.active {
  color: var(--gold);
  background: rgba(210, 185, 140, 0.05);
}
.tab-icon {
  width: 11px;
  height: 11px;
  opacity: 0.6;
  transition: opacity 0.3s;
  flex-shrink: 0;
}
.tab.active .tab-icon { opacity: 1; }

/* ── Panel Content ── */
.panel-content {
  flex: 1;
  background: var(--bg-panel);
  padding: 10px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.tab-pane {
  display: none;
  animation: tabReveal 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tab-pane.active { display: block; }

@keyframes tabReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Sections / Cards (Smooth, Borderless Look) ── */
.section {
  background: var(--bg-section);
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.01);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.section:hover {
  background: var(--bg-card);
}
.section-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.03), transparent);
}
.hint {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ── Buttons (Soft, No Hard Borders) ── */
button, .btn, .action-btn {
  background: var(--bg-btn);
  border: 1px solid transparent;
  color: var(--text-secondary);
  height: 26px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--transition);
  position: relative;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .btn:hover, .action-btn:hover {
  background: var(--bg-btn-hover);
  color: var(--text-primary);
  transform: scale(1.01);
}
button:active, .btn:active, .action-btn:active {
  background: var(--bg-btn-active);
  transform: scale(0.98);
}

/* Gold CTA Button (Soft Champagne Finish) */
button.gold-accent {
  background: var(--gold-glow);
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 9.5px;
  height: 28px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: var(--transition);
}
button.gold-accent:hover {
  background: var(--gold-glow-sm);
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(210,185,140,0.15);
  transform: scale(1.02);
  color: #fff;
}
button.gold-accent:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(210,185,140,0.05);
}

/* Danger Button */
button.danger-btn {
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}
button.danger-btn:hover {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 4px 14px rgba(248, 113, 113, 0.2);
}

/* ── Layout Primitives ── */
.row { display: flex; gap: 5px; margin-bottom: 5px; }
.row:last-child { margin-bottom: 0; }
.col { flex: 1; }

/* ── Anchor Grid ── */
.anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 3px;
  justify-content: center;
}
.anchor-grid button {
  width: 28px; height: 28px;
  padding: 0;
  font-size: 11px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.025);
  color: var(--text-secondary);
}
.anchor-grid button:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.anchor-grid button.center {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-glow-sm);
}
.anchor-grid button.center:hover {
  border-color: var(--gold);
  background: var(--gold-glow);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* ── Scroll Lists ── */
.scroll-list {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  height: 100px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
  transition: var(--transition);
}
.scroll-list:hover {
  border-color: var(--border-light);
}
.list-item {
  height: 28px;
  line-height: 28px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255,255,255,0.015);
  color: var(--text-secondary);
  font-size: 9.5px;
}
.list-item:hover { background: rgba(255,255,255,0.03); color: var(--text-primary); }
.list-item.selected {
  background: rgba(210,185,140,0.06);
  color: var(--gold-bright);
  border-left: 2px solid var(--gold);
}

/* ── Inputs ── */
input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 9.5px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  box-sizing: border-box;
  outline: none;
  transition: var(--transition);
  box-shadow: none;
}
input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
  background: rgba(0,0,0,0.2);
  box-shadow: 0 0 0 1px var(--border-gold);
}
textarea {
  height: 70px;
  resize: vertical;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ── Radio / Checkbox Groups ── */
.radio-group { display: flex; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.18s;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.02em;
}
.radio-item:hover { color: var(--text-primary); }
.radio-item input {
  margin: 0;
  accent-color: var(--gold);
  width: 11px; height: 11px;
  cursor: pointer;
}

/* ── Copyright ── */
#copyright {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--text-hint);
  background: var(--bg-void);
  border-top: 1px solid var(--border);
  text-transform: uppercase;
}

/* ── Global Tools Bar ── */
.global-tools-container {
  flex-shrink: 0;
  background: rgba(16,16,19,0.98);
  backdrop-filter: blur(16px);
  padding: 8px 10px;
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}
.global-tools-container .row { margin-bottom: 6px; }
.global-tools-container .row:last-child { margin-bottom: 0; }
.global-tools-container button {
  height: 20px;
  font-size: 8.5px;
  padding: 0 2px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-xs);
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}
.global-tools-container button:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.align-btn { 
  height: 20px;
  line-height: 18px;
  font-size: 11px;
  padding: 0;
  color: var(--gold); 
}
.align-btn:hover { color: #fff !important; border-color: var(--gold) !important; background: var(--gold-glow) !important; }


/* ── Gap Controls ── */
.gap-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 5px;
  background: rgba(0,0,0,0.1);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.gap-row { display: flex; align-items: center; gap: 6px; }
.gap-slider {
  flex: 1;
  accent-color: var(--gold);
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.gap-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px var(--gold-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.gap-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--gold-glow);
}
.gap-input {
  width: 48px !important;
  text-align: right;
  padding: 3px 6px !important;
  color: var(--gold-bright) !important;
  font-weight: 500;
  font-size: 9.5px;
  background: rgba(0,0,0,0.15) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
}

/* ── Quick FX Grid ── */
.quick-fx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.quick-fx-slot { 
  display: flex; 
  gap: 2px; 
  min-width: 0;
}
.quick-fx-slot .fx-name {
  flex: 1;
  text-align: left;
  padding: 4px 6px;
  font-size: 8.5px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-xs) 2px 2px var(--radius-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.quick-fx-slot .fx-name.empty {
  color: var(--text-hint);
  font-style: italic;
  font-weight: 400;
}
.quick-fx-slot .fx-browse {
  width: 20px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 2px var(--radius-xs) var(--radius-xs) 2px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ═══════════════════════════════════════════
   FAV PRESETS PANEL
═══════════════════════════════════════════ */
.fav-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Each slot = name-btn + browse-btn */
.fp-slot {
  display: flex;
  gap: 2px;
  position: relative;
}

.fp-name {
  flex: 1;
  height: 24px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 8px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: var(--radius-xs) 2px 2px var(--radius-xs);
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.fp-name:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.fp-name.fp-empty {
  color: var(--text-hint);
  font-style: italic;
  font-size: 8px;
  cursor: default;
}
.fp-name:not(.fp-empty):hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: #ffffff;
  transform: scale(1.01);
}
.fp-name:not(.fp-empty):active {
  transform: scale(0.98);
  background: rgba(255,255,255,0.03);
}

/* Subtle gold flash when a loaded slot is clicked (apply feedback) */
.fp-name.fp-flash {
  border-color: var(--gold-dim) !important;
  color: var(--gold) !important;
  background: var(--gold-glow-sm) !important;
}

.fp-browse {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 2px var(--radius-xs) var(--radius-xs) 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.fp-browse:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

/* Right-click remove badge */
.fp-slot .fp-remove {
  display: none;
  position: absolute;
  top: -5px;
  left: -5px;
  width: 13px;
  height: 13px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 7px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  border: 1px solid var(--bg-panel);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: var(--transition);
}
.fp-slot:hover .fp-remove.visible {
  display: flex;
}
.fp-remove.visible:hover {
  transform: scale(1.18);
  background: #dc2626;
}

/* ═══════════════════════════════════════════
   EASING SECTION
═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   EASING SECTION — full rewrite
═══════════════════════════════════════════ */

/* --- Keep old .easing-wrap for legacy selectors --- */
.easing-wrap { display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-start; }

/* --- New easing section layout --- */
.easing-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Header Row ─────────────────────────────── */
/* ── Header Row ─────────────────────────────── */
.easing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 32px;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}
.easing-header .section-label {
  margin: 0 !important;
  flex-shrink: 0;
  font-size: 8px;
  letter-spacing: 0.1em;
}
.easing-header .section-label::after { display: none; }
.easing-header #easing-status {
  margin: 0;
  min-width: 54px;
  text-align: right;
  font-size: 8px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  flex-shrink: 0;
}

/* ── Mode Switch (BEZIER ◉ SPEED) ──────────── */
.easing-mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 8px;
  height: 24px;
  box-sizing: border-box;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}
.ems-label {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-hint);
  transition: color 0.2s;
  user-select: none;
  cursor: pointer;
}
/* Active side label is gold */
.ems-label.active { color: var(--gold); }

/* ── Toggle Pill ────────────────────────────── */
.graph-toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.graph-toggle-switch input { display: none; }
.gts-track {
  position: relative;
  width: 34px;
  height: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: background 0.22s, border-color 0.22s;
}
/* BZ side active (unchecked) — gold background */
.gts-track {
  background: var(--gold-glow);
  border-color: var(--border-gold);
}
/* SP side active (checked) — dim */
.graph-toggle-switch input:checked + .gts-track {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-light);
}
.gts-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  transition: left 0.2s cubic-bezier(0.34,1.56,0.64,1), background 0.2s;
  box-shadow: 0 0 6px var(--gold-glow);
}
.graph-toggle-switch input:checked + .gts-track .gts-thumb {
  left: 20px;
  background: #a0a0a0;
  box-shadow: none;
}

/* ── Body: graph + presets vertical layout ─────── */
.easing-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ── Graph Column (full width, single column) ─── */
.easing-graph-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.easing-graph-col .canvas-outer {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 120px;
  min-height: 120px;
  max-width: 100%;
  max-height: 500px;
  resize: both;
  background: rgba(10, 10, 14, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 14px rgba(0,0,0,0.7), 0 4px 20px rgba(0,0,0,0.3);
}
.easing-graph-col .canvas-outer:hover {
  border-color: var(--border-gold);
  box-shadow: inset 0 2px 14px rgba(0,0,0,0.7), 0 0 18px var(--gold-glow);
}
#bezier-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: crosshair; display: block;
}
#speed-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: ew-resize; display: none;
}

/* ── Coords Side Box (outside graph on right) ── */
.graph-coords-side {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  cursor: pointer;
  background: rgba(0,0,0,0.3);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border-gold);
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.graph-coords-side:hover {
  background: rgba(0,0,0,0.55);
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}
.coords-display {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 7.5px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(255,255,255,0.03);
  padding: 5px 2px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
  display: block;
}

/* ── Right Sidebar ──────────────────────────── */
.graph-right-sidebar {
  width: 90px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preset-name-input {
  width: 100%;
  padding: 5px 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #fff;
  font-size: 8.5px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.preset-name-input:focus { border-color: var(--border-focus); }
.save-preset-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.save-preset-btn:hover {
  background: rgba(210,185,140,0.15);
  border-color: var(--gold);
}


/* ── Speed Sliders ─────────────────────────── */
.speed-sliders {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sp-lbl {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-hint);
  width: 20px;
  flex-shrink: 0;
}
.sp-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none; /* prevent scroll during drag */
}
.sp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--gold);
  cursor: grab;
  box-shadow: 0 0 5px rgba(232,196,106,0.4);
}
.sp-slider:active::-webkit-slider-thumb { cursor: grabbing; }
/* Active track fill — shows progress */
.sp-slider::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
}
.sp-val {
  font-size: 7px;
  color: rgba(232,196,106,0.75);
  font-family: 'SF Mono', monospace;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Presets Column ────────────────────────── */
.easing-presets-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  order: 2;
}

.preset-section-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-hint);
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.preset-section-label.speed-lbl {
  margin-top: 3px;
}

.preset-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)) !important;
  gap: 6px !important;
  padding: 4px 0 8px 0 !important;
}
.preset-grid .pc {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  border-radius: 6px;
  padding: 4px 3px 2px 3px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.preset-grid .pc:hover {
  background: rgba(232, 196, 106, 0.12);
  border-color: rgba(232, 196, 106, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.55), 0 0 12px rgba(232, 196, 106, 0.18);
}
.preset-grid .pc.sel {
  border-color: var(--gold);
  background: var(--gold-glow);
  box-shadow: 0 0 15px var(--gold-glow), inset 0 0 10px var(--gold-glow-sm);
}
.preset-grid .pc canvas {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}
.pc-lbl {
  font-family: 'Inter', 'SF Pro Text', sans-serif;
  font-size: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.02em;
}
.preset-grid .pc.sel .pc-lbl {
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Graph Presets Filter Switcher */
.gpf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gpf-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.gpf-btn.active {
  color: #fff;
  background: var(--gold);
  box-shadow: 0 1px 6px rgba(212, 175, 55, 0.35);
}

.pc-fav-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 8px;
  color: #D4AF37;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  pointer-events: none;
}

/* legacy pc-del stays hidden */
.pc-del { display: none !important; }

/* Save row */
.save-row { display: flex; gap: 4px; }
.save-row input { flex: 1; min-width: 0; font-size: 9px; }
.save-row button { flex-shrink: 0; font-size: 9px; padding: 0 8px; }

/* Apply button */
.apply-easing-btn {
  width: 100%;
  height: 26px;
  font-size: 9px;
  margin-top: auto;
}

/* Status states */
.status { font-size: 8px; white-space: nowrap; }
.s-idle { color: var(--text-muted); }
.s-info { color: var(--status-blue); }
.s-ok   { color: var(--status-green); }
.s-warn { color: #fbbf24; }
.s-err  { color: var(--status-red); }

/* ── Preset Right-Click Context Menu ─────────── */
#preset-ctx-menu {
  display: none;
  position: fixed;
  z-index: 99999;
  background: #1a1a1f;
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 7px;
  padding: 3px 0;
  min-width: 130px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.65);
  font-size: 10px;
  overflow: hidden;
}
#preset-ctx-menu .pctx-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; cursor: pointer;
  color: #e0e0e0; transition: background 0.13s; font-size: 10px;
}
#preset-ctx-menu .pctx-item:hover { background: rgba(255,255,255,0.06); }
#preset-ctx-menu .pctx-item.danger { color: #f87171; }
#preset-ctx-menu .pctx-item.danger:hover { background: rgba(248,113,113,0.1); }
#preset-ctx-menu .pctx-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 2px 0; }


/* ═══════════════════════════════════════════
   SPRING BUTTONS
═══════════════════════════════════════════ */
.spring-fx-row,
.smart-anchor-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 0;
}

.spring-btn {
  height: 22px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e8e8e8;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.spring-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.spring-btn:active {
  background: rgba(255,255,255,0.07);
  transform: translateY(0) scale(0.97);
}

/* Anchor-style gold accent — kept for anchor grid center btn */
.spring-btn.anchor-gold {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-glow-sm);
}
.spring-btn.anchor-gold:hover {
  border-color: var(--gold);
  background: var(--gold-glow);
  color: var(--gold-bright);
}
/* Removed inline extruder styles in favor of the new popup modal */
/* Number Counter / Applied FX trigger */
.nm-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.spring-divider {
  height: 1px;
  margin: 6px 0;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

.section-sublabel {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.section-sublabel::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}
.sublabel-hint {
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-transform: none;
  opacity: 0.65;
}


/* ═══════════════════════════════════════════
   REFERENCE TAB
═══════════════════════════════════════════ */
.ref-tab-pane { display: none; animation: tabReveal 0.28s ease; }
.ref-tab-pane.active { display: block; }

#ref-drop-zone {
  height: 200px;
  min-height: 100px;
  resize: vertical;
  margin-bottom: 10px;
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  background: radial-gradient(ellipse at 50% 80%, rgba(232,196,106,0.04) 0%, transparent 70%);
  transition: var(--transition-slow);
  padding: 16px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
#ref-drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}
#ref-drop-zone:hover {
  border-color: var(--gold-dim);
  background: radial-gradient(ellipse at 50% 80%, rgba(232,196,106,0.09) 0%, transparent 70%);
}
#ref-drop-zone.ref-drag-over {
  border-color: var(--gold);
  border-style: solid;
  background: radial-gradient(ellipse at 50% 80%, rgba(232,196,106,0.14) 0%, transparent 70%);
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(232,196,106,0.1), inset 0 0 20px rgba(232,196,106,0.05);
}

.ref-dz-icon { opacity: 0.5; transition: var(--transition-slow); }
#ref-drop-zone:hover .ref-dz-icon { opacity: 0.85; transform: translateY(-4px); }

.ref-dz-text { display: flex; flex-direction: column; gap: 5px; }
.ref-dz-title { font-size: 11px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.02em; }
.ref-dz-sub { font-size: 9px; color: var(--text-muted); }

.ref-dz-formats { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.ref-badge {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.07em;
}

#ref-preview {
  height: 200px;
  min-height: 100px;
  resize: vertical;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border: 1px solid var(--border);
}
#ref-preview video, #ref-preview img {
  display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: contain; transform-origin: 0 0;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#ref-toolbar {
  position: absolute; top: 0; left: 0; right: 0; height: 32px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
  z-index: 10; opacity: 0; transition: opacity 0.25s ease;
}
#ref-preview:hover #ref-toolbar { opacity: 1; }
#ref-fname { font-size: 9px; font-weight: 500; color: #fff; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,0.9); }
.ref-tb-btn {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; height: 20px; padding: 0 8px; border-radius: var(--radius-xs);
  font-size: 8.5px; font-weight: 600; cursor: pointer; transition: var(--transition); backdrop-filter: blur(4px);
}
.ref-tb-btn:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }

#ref-clear-btn {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(15,15,18,0.75); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12); color: var(--text-secondary);
  height: 24px; padding: 0 12px; border-radius: var(--radius-xs);
  font-size: 9px; font-weight: 600; cursor: pointer; z-index: 20;
  opacity: 0; transition: var(--transition);
}
#ref-preview:hover #ref-clear-btn { opacity: 1; }
#ref-clear-btn:hover { background: rgba(220,50,50,0.75); border-color: rgba(248,113,113,0.5); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(220,50,50,0.3); }

#ref-zoom-badge {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08); color: #fff;
  border-radius: var(--radius-xs); padding: 2px 8px;
  font-size: 9px; font-weight: 600; z-index: 20; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}
#ref-zoom-badge.visible { opacity: 1; }

.ref-media-controls {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(12,12,16,0.88); padding: 7px 10px; border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(20px);
  opacity: 0; transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7); width: 88%; z-index: 50; box-sizing: border-box;
}
#ref-preview:hover .ref-media-controls { opacity: 1; transform: translateX(-50%) translateY(0); }

.ref-btn-row { display: flex; gap: 6px; width: 100%; justify-content: center; align-items: center; }
.ref-c-btn {
  width: 22px; height: 22px; border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  border: 1px solid transparent;
}
.ref-c-btn svg { width: 11px; height: 11px; fill: currentColor; }
.ref-c-btn:hover { background: var(--gold-glow-sm); color: var(--gold); border-color: var(--border-gold); transform: scale(1.08); }
.ref-c-btn.danger:hover { background: rgba(248,113,113,0.15); color: #f87171; border-color: rgba(248,113,113,0.3); }

.play-pause-container {
  display: flex; justify-content: center; align-items: center;
  position: relative; cursor: pointer; width: 30px; height: 22px;
  background: var(--gold-gradient-static); border-radius: var(--radius-xs);
  color: #0d0d10; transition: var(--transition);
  box-shadow: 0 2px 10px rgba(232,196,106,0.3);
}
.play-pause-container:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(232,196,106,0.45); }
.play-pause-container input:checked ~ .play { display: none !important; }
.play-pause-container input:checked ~ .pause { display: block !important; }

.extra-dz {
  background: rgba(0,0,0,0.2); border: 1px dashed var(--border-light); border-radius: var(--radius-sm); height: 34px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: var(--transition); overflow: hidden;
}
.extra-dz:hover { background: rgba(255,255,255,0.025); border-color: var(--gold-dim); }
.extra-dz.drag-over { background: var(--gold-glow-sm); border-color: var(--gold); }
.extra-dz-content { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 10px; color: var(--text-secondary); font-weight: 500; }
.extra-dz-content.loaded { justify-content: space-between; padding: 0 10px; background: var(--gold-glow-sm); border: 1px solid var(--border-gold); border-radius: var(--radius-sm); }
.extra-dz-content .fname { color: var(--gold); font-size: 9px; }
.extra-dz-content .btn-close { color: rgba(255,255,255,0.35); font-size: 13px; transition: color 0.18s; }
.extra-dz-content .btn-close:hover { color: #f87171; }

.music-controls-panel {
  background: rgba(0,0,0,0.28); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; margin-top: 7px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}
.icon-btn {
  background: rgba(255,255,255,0.04); border: 1px solid transparent; color: var(--text-secondary);
  border-radius: var(--radius-xs); cursor: pointer;
  display: flex; align-items: center; justify-content: center; height: 24px; transition: var(--transition); font-size: 10px;
}
.icon-btn:hover { background: var(--gold-glow-sm); color: var(--gold); border-color: var(--border-gold); }

/* ═══════════════════════════════════════════
   MODALS
═══════════════════════════════════════════ */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  animation: modalFadeIn 0.25s ease forwards;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: linear-gradient(160deg, #1a1a20 0%, #141418 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 260px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05) inset;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalSpringIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalSpringIn {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal.closing { animation: modalFadeOut 0.2s ease forwards; }
.modal.closing .modal-content { animation: modalSlideDown 0.2s ease forwards; }
@keyframes modalFadeOut { to { opacity: 0; } }
@keyframes modalSlideDown { to { transform: scale(0.95) translateY(16px); opacity: 0; } }

.modal-header {
  background: rgba(0,0,0,0.4);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}
.close-modal {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.18s, transform 0.18s;
  line-height: 1;
}
.close-modal:hover { color: #f87171; transform: rotate(90deg); }
.modal-body { padding: 16px; overflow-y: auto; max-height: 80vh; }

/* Color Picker Modal */
#solid-color-modal .modal-content {
  width: 480px;
  max-width: 95vw;
}
.solid-modal-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 14px 16px;
  overflow: visible;
  max-height: none;
}
.solid-modal-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.solid-modal-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.color-preview-row { display: flex; gap: 8px; margin-bottom: 0; align-items: center; }
.preview-swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.preview-swatch-label {
  font-size: 7px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.premium-opposite-swatch {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.1s, border-color 0.1s;
}
.premium-opposite-swatch:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.8);
}
.premium-color-picker {
  -webkit-appearance: none; border: none; width: 38px; height: 38px;
  border-radius: var(--radius-sm); padding: 0; cursor: pointer;
  background: transparent; box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.premium-color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.premium-color-picker::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-sm); }
#solid-color-hex {
  flex: 1; text-align: center; font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border); height: 38px; line-height: 38px;
  border-radius: var(--radius-sm); color: var(--text-primary); outline: none; transition: border-color 0.2s;
}
#solid-color-hex:focus { border-color: var(--gold-dim); }
.fav-header { font-size: 8.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; display: flex; justify-content: space-between; text-transform: uppercase; }
.fav-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 8px; }
.fav-slot {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-xs); border: 1px solid var(--border);
  cursor: pointer; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center;
  position: relative; transition: var(--transition); box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.fav-slot.has-color { border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
.fav-slot:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.fav-slot.empty::after { content: "+"; color: var(--text-hint); font-size: 14px; font-weight: 300; transition: color 0.18s; }
.fav-slot.empty:hover::after { color: var(--gold); }

/* Premium Shades */
.premium-shade-row { display: flex; gap: 4px; margin-bottom: 4px; }
.premium-swatch {
  flex: 1; aspect-ratio: 1; border-radius: 4px; border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); transition: transform 0.1s, border-color 0.1s;
}
.premium-swatch:hover { transform: scale(1.15); border-color: rgba(255,255,255,0.8); z-index: 2; position: relative; }
.fav-slot .remove-fav {
  position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff;
  width: 14px; height: 14px; border-radius: 50%; font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8); transition: var(--transition); z-index: 10; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.fav-slot.has-color:hover .remove-fav { opacity: 1; transform: scale(1); }

/* Solid Color Modal Tab Switches */
.solid-modal-tab {
  height: 100%;
  padding: 0 4px;
  position: relative;
  transition: color 0.2s, border-color 0.2s;
  box-sizing: border-box;
  color: var(--text-muted);
}
.solid-modal-tab:hover {
  color: var(--gold-bright) !important;
}
.solid-modal-tab.active {
  color: var(--gold) !important;
  border-bottom: 2px solid var(--gold) !important;
}

/* Gradient specific layout elements */
.gradient-color-swatch {
  transition: background-color 0.2s, border-color 0.2s;
}
.gradient-color-swatch:hover {
  background-color: rgba(255,255,255,0.08) !important;
}
.gradient-color-swatch.active {
  background-color: rgba(212, 175, 55, 0.12) !important;
  border-color: var(--gold) !important;
}
.gradient-color-swatch.active span {
  color: #fff !important;
}

/* Premium Gradient presets styling */
.premium-gradient-row {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.premium-gradient-swatch {
  flex: 1;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.15s, border-color 0.15s;
}
.premium-gradient-swatch:hover {
  transform: scale(1.05) translateY(-1px);
  border-color: rgba(255,255,255,0.8);
  z-index: 2;
  position: relative;
}

/* ═══════════════════════════════════════════
   EASING TAB (Integration)
═══════════════════════════════════════════ */
.easing-wrap {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;
}
.easing-wrap .left-col { flex: 1 1 200px; min-width: 180px; max-width: 280px; }
.easing-wrap .right-col { flex: 2 1 250px; min-width: 220px; display: flex; flex-direction: column; }

.easing-wrap .graph-box {
  background: var(--bg-section); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.easing-wrap .canvas-outer { width: 100%; aspect-ratio: 1; background: var(--bg-btn); border-radius: 4px; border: 1px solid var(--border); overflow: hidden; }
#bezier-canvas { width: 100%; height: 100%; cursor: crosshair; display: block; }
.easing-wrap .graph-bar { display: flex; justify-content: space-between; align-items: center; }
.easing-wrap .coords-display { font-family: 'SF Mono', monospace; color: var(--text-muted); font-size: 9px; letter-spacing: 0.02em; }

.easing-wrap .preset-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.easing-wrap .pc {
  width: 28px; height: 27px;
  background: var(--bg-btn); border: 1px solid var(--border); position: relative;
  border-radius: 4px; padding: 2px; cursor: pointer; text-align: center;
  transition: var(--transition); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.easing-wrap .pc:hover { background: var(--bg-btn-hover); }
.easing-wrap .pc.sel { border-color: var(--gold); background: rgba(223, 185, 98, 0.15); }
.easing-wrap .pc canvas { width: 22px; height: 14px; display: block; margin-bottom: 2px; }
.easing-wrap .pc-lbl { font-size: 7px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; line-height: 1; }
.easing-wrap .pc.sel .pc-lbl { color: var(--gold); font-weight: 600; }

.easing-wrap .pc-del {
  position: absolute; top: -4px; right: -4px; width: 12px; height: 12px;
  background: #f87171; color: #fff; border-radius: 50%; font-size: 6.5px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: var(--transition); border: 1px solid var(--bg-panel);
}
.easing-wrap .pc:hover .pc-del { opacity: 1; }
.easing-wrap .pc-del:hover { transform: scale(1.1); background: #ef4444; }

.easing-wrap .save-row { display: flex; gap: 6px; margin-bottom: 8px; }
.easing-wrap .footer-controls {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.easing-wrap .bake-row { display: flex; align-items: center; gap: 8px; flex: 1; }
.easing-wrap .bake-lbl { font-size: 9px; color: var(--text-secondary); letter-spacing: 0.02em; font-weight: 600; text-transform: uppercase; }
.easing-wrap .bake-lbl span { color: var(--text-primary); }
#bake-slider {
  flex: 1; max-width: 100px; -webkit-appearance: none; height: 2px; background: var(--border); border-radius: 2px; outline: none;
}
#bake-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); cursor: pointer;
}
/* old duplicate blocks removed — see premium versions above */

/* ── NM Modal Tabs ── */
.nm-mode-tabs {
  display: flex; gap: 3px; margin-bottom: 10px;
  background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); padding: 3px;
}
.nm-tab {
  flex: 1; height: 22px; border: none; border-radius: var(--radius-xs);
  background: transparent; color: var(--text-muted); font-size: 9px; font-weight: 600;
  cursor: pointer; font-family: inherit; letter-spacing: 0.04em; transition: all 0.18s;
}
.nm-tab.active { background: var(--gold-glow-sm); color: var(--gold); border: 1px solid var(--border-gold); }
.nm-tab:hover:not(.active) { color: var(--text-primary); background: rgba(255,255,255,0.04); }

.nm-section-label {
  font-size: 7.5px; font-weight: 700; letter-spacing: 0.16em; color: var(--text-muted);
  margin-bottom: 6px; margin-top: 2px; display: flex; align-items: center; gap: 6px; text-transform: uppercase;
}
.nm-section-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, rgba(255,255,255,0.07), transparent); }

.nm-panel { padding: 0; }
.nm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.nm-row label { font-size: 9px; color: var(--text-secondary); flex-shrink: 0; min-width: 70px; }

.nm-input {
  flex: 1; height: 22px; background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text-primary); font-size: 9.5px; font-family: inherit;
  padding: 0 7px; outline: none; transition: border-color 0.18s, box-shadow 0.18s; min-width: 0;
}
.nm-input:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 2px var(--gold-glow); }

.nm-select {
  flex: 1; height: 22px; background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text-primary); font-size: 9px; font-family: inherit;
  padding: 0 5px; outline: none; cursor: pointer; transition: border-color 0.18s;
}
.nm-select:focus { border-color: var(--gold-dim); }
.nm-select option { background: #1a1a1f; }

.nm-pick-btn {
  height: 24px; padding: 0 10px; border-radius: var(--radius-xs);
  background: var(--bg-btn); border: 1px solid var(--border); color: var(--text-primary);
  font-size: 9px; font-weight: 600; cursor: pointer; font-family: inherit; flex-shrink: 0; transition: all 0.18s;
}
.nm-pick-btn:hover { background: var(--bg-btn-hover); border-color: var(--border-light); }
.nm-pick-btn.picked { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.4); color: #4ade80; }

.nm-radio-lbl { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--text-secondary); cursor: pointer; }

/* ── Applied FX Inspector ── */
.fx-list-container {
  max-height: 200px; overflow-y: auto; background: rgba(0,0,0,0.22);
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 5px; padding: 3px;
}
.fx-row-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 7px; margin-bottom: 2px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-xs); border: 1px solid transparent; transition: all 0.18s;
}
.fx-row-item:hover { background: rgba(255,255,255,0.05); border-color: var(--border); }
.fx-row-label {
  display: flex; align-items: center; gap: 7px; font-size: 9.5px; font-weight: 500;
  color: var(--text-primary); cursor: pointer; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-row-label input[type="checkbox"] { accent-color: var(--gold); cursor: pointer; margin: 0; }
.fx-count-badge { font-size: 8px; color: var(--text-muted); background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 3px; margin-left: 3px; }
.fx-delete-btn { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: var(--radius-xs); color: var(--text-muted); cursor: pointer; transition: all 0.18s; }
.fx-delete-btn:hover { background: rgba(248,113,113,0.15); color: #f87171; }
.fx-delete-btn svg { width: 11px; height: 11px; fill: currentColor; }
.fx-empty-state { text-align: center; padding: 18px 10px; font-size: 9.5px; color: var(--text-muted); font-weight: 500; }

/* ── Reference Sliders ── */
.ref-slider-container { width: 100%; }
.ref-slider { -webkit-appearance: none; width: 100%; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; outline: none; cursor: pointer; }
.ref-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; background: var(--gold); border-radius: 50%; cursor: pointer; box-shadow: 0 0 6px var(--gold-glow); transition: transform 0.15s; }
.ref-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }


/* ═══════════════════════════════════════════
   SPRING EFFECTS – compact layout
═══════════════════════════════════════════ */

/* 3-column compact button row */
.spring-fx-row,
.smart-anchor-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 0;
}


/* Divider between Section A and B */
.spring-divider {
  height: 1px;
  margin: 7px 0;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

/* Sub-label for Smart Anchors */
.section-sublabel {
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-sublabel::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}
.sublabel-hint {
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: none;
  opacity: 0.7;
}

/* ── Number Counter Button ───────────────────────────── */
.nm-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

/* ── Number Counter Modal ────────────────────────────── */
.nm-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 3px;
}
.nm-tab {
  flex: 1;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.nm-tab.active {
  background: rgba(223,185,98,0.15);
  color: var(--gold);
  border: 1px solid rgba(223,185,98,0.3);
}
.nm-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nm-section-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nm-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-light), transparent);
}

.nm-panel { padding: 0; }

.nm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.nm-row label {
  font-size: 9.5px;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 72px;
}

.nm-input {
  flex: 1;
  height: 24px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 10px;
  font-family: inherit;
  padding: 0 7px;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.nm-input:focus {
  border-color: var(--gold-dim);
}

.nm-select {
  flex: 1;
  height: 24px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 10px;
  font-family: inherit;
  padding: 0 5px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.nm-select:focus { border-color: var(--gold-dim); }
.nm-select option { background: #1c1c20; }

.nm-pick-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  background: var(--bg-btn);
  border: 1px solid var(--border);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.2s;
}
.nm-pick-btn:hover {
  background: var(--bg-btn-hover);
  border-color: var(--border-light);
  color: #ffffff;
}
.nm-pick-btn.picked {
  background: rgba(50,200,100,0.15);
  border-color: rgba(50,200,100,0.5);
  color: #5fdd91;
}

.nm-radio-lbl {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── Applied FX Inspector Modal ──────────────────────── */
.fx-list-container {
  max-height: 220px;
  overflow-y: auto;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  margin-top: 6px;
  padding: 4px;
}

.fx-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  margin-bottom: 3px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.fx-row-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-light);
}

.fx-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-row-label input[type="checkbox"] {
  accent-color: var(--gold);
  cursor: pointer;
  margin: 0;
}

.fx-count-badge {
  font-size: 8.5px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.4);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

.fx-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.fx-delete-btn:hover {
  background: rgba(255, 51, 51, 0.2);
  color: #ff3333;
}

.fx-delete-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.fx-empty-state {
  text-align: center;
  padding: 20px 10px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   CUSTOM TOOLTIP SYSTEM
   ========================================================================== */
.dxv-tooltip {
  position: fixed;
  background: rgba(10, 10, 12, 0.95);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translate(-50%, -100%) scale(0.95);
  z-index: 10000;
  width: max-content;
  max-width: 220px;
  white-space: normal;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.dxv-tooltip.active {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}
.dxv-tooltip.below {
  transform: translate(-50%, 0) scale(0.95);
}
.dxv-tooltip.active.below {
  transform: translate(-50%, 0) scale(1);
}
.tt-tip {
  font-weight: 500;
  margin-bottom: 3px;
  line-height: 1.3;
}
.tt-short {
  font-size: 8.5px;
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

/* Combined spring button with input */
.spring-btn-combined {
  height: 22px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  box-sizing: border-box;
}
.spring-btn-combined:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.spring-btn-combined:active {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(0) scale(0.98);
}

/* Layout Customization & Unified CSS Grid */
.spring-fx-container-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.edit-mode .spring-btn,
.edit-mode .section {
  cursor: grab !important;
  position: relative !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.edit-mode .spring-btn {
  border: 1px dashed rgba(212, 175, 55, 0.6) !important;
  background: rgba(212, 175, 55, 0.08) !important;
}

.edit-mode .section {
  border: 1px dashed rgba(123, 97, 255, 0.5) !important;
  background: rgba(123, 97, 255, 0.03) !important;
  border-radius: 6px !important;
  padding: 6px !important;
  box-sizing: border-box !important;
}

.edit-mode .section-label {
  cursor: grab !important;
  background: rgba(123, 97, 255, 0.15) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  display: inline-block !important;
}

.edit-mode .dragging {
  opacity: 0.5 !important;
  transform: scale(0.98) !important;
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.2) !important;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5) !important;
  cursor: grabbing !important;
}

/* Minus Button Styling */
.remove-item-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: rgba(255, 60, 60, 0.9);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  line-height: 0.8;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 0 0 1.5px rgba(255,255,255,0.4);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
  backdrop-filter: blur(4px);
}

.edit-mode .remove-item-btn {
  display: flex !important;
}

.remove-item-btn:hover {
  background: rgba(255, 30, 30, 1);
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(255,60,60,0.5), 0 0 0 2px rgba(255,255,255,0.6);
}

/* ── Google Keep Style Notes ── */
.notes-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  border-radius: var(--radius-sm);
  margin: 4px 4px 4px auto;
  width: 28px;
  height: 28px;
  position: relative;
}
.notes-tab-btn:hover {
  color: var(--gold-bright);
  background: rgba(255,255,255,0.03);
}
.notes-tab-btn.active {
  color: var(--gold);
  background: var(--gold-glow);
  box-shadow: inset 0 0 4px var(--border-gold);
}

/* Creator action buttons */
.creator-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-transform: uppercase;
  font-family: inherit;
}
.creator-action-btn:hover, .creator-action-btn.active {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-glow-sm);
}

/* Color Presets & Dots */
.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.15s;
}
.color-dot:hover, .color-dot.active {
  transform: scale(1.25);
  border-color: #fff;
}
.color-dot.default { background: #1a1a20; }
.color-dot.gold { background: #d4af37; }
.color-dot.blue { background: #1e3a8a; }
.color-dot.purple { background: #581c87; }
.color-dot.ruby { background: #7f1d1d; }

/* Keep Note Card */
.keep-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: border-color 0.22s, background 0.22s, transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
  position: relative;
  min-height: 50px;
  box-sizing: border-box;
}
.keep-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  border-color: var(--border-light);
}

/* Card Color presets overrides */
.keep-card.color-default {
  background: rgba(26, 26, 32, 0.4);
}
.keep-card.color-gold {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.18);
}
.keep-card.color-gold:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.08);
}
.keep-card.color-blue {
  background: rgba(41, 121, 255, 0.04);
  border-color: rgba(41, 121, 255, 0.18);
}
.keep-card.color-blue:hover {
  border-color: rgba(41, 121, 255, 0.4);
  box-shadow: 0 8px 18px rgba(41, 121, 255, 0.08);
}
.keep-card.color-purple {
  background: rgba(156, 39, 176, 0.04);
  border-color: rgba(156, 39, 176, 0.18);
}
.keep-card.color-purple:hover {
  border-color: rgba(156, 39, 176, 0.4);
  box-shadow: 0 8px 18px rgba(156, 39, 176, 0.08);
}
.keep-card.color-ruby {
  background: rgba(244, 67, 54, 0.04);
  border-color: rgba(244, 67, 54, 0.18);
}
.keep-card.color-ruby:hover {
  border-color: rgba(244, 67, 54, 0.4);
  box-shadow: 0 8px 18px rgba(244, 67, 54, 0.08);
}

/* Same color classes apply to Edit Dialog */
.modal.color-default .modal-content { background: linear-gradient(160deg, #1e1e24 0%, #141418 100%); }
.modal.color-gold .modal-content { background: linear-gradient(160deg, #2a2215 0%, #16120b 100%); border-color: rgba(212, 175, 55, 0.3); }
.modal.color-blue .modal-content { background: linear-gradient(160deg, #121b2d 0%, #0a0e18 100%); border-color: rgba(41, 121, 255, 0.3); }
.modal.color-purple .modal-content { background: linear-gradient(160deg, #22122d 0%, #110918 100%); border-color: rgba(156, 39, 176, 0.3); }
.modal.color-ruby .modal-content { background: linear-gradient(160deg, #2a1212 0%, #150909 100%); border-color: rgba(244, 67, 54, 0.3); }

/* Note Card Typography */
.note-card-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Responsive Grid columns */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}

/* Action buttons on card */
.card-action-btn {
  background: transparent;
  border: none;
  color: var(--text-hint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
  transition: var(--transition-fast);
}
.card-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.card-action-btn.delete:hover {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
}

/* Color Dropdown inside card */
.color-dropdown-trigger:hover .color-dropdown-menu {
  display: flex;
}
.color-dropdown-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #141418;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  z-index: 100;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  align-items: center;
}

/* Custom Checklist styles inside edit dialog */
.todo-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.todo-checkbox:hover {
  border-color: var(--gold);
}
.todo-checkbox:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.todo-checkbox:checked::after {
  content: '';
  width: 2.5px;
  height: 5.5px;
  border: solid #141418;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-bottom: 1px;
}

/* Small checkboxes inside Grid cards preview */
.todo-checkbox-grid {
  appearance: none;
  -webkit-appearance: none;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.todo-checkbox-grid:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.todo-checkbox-grid:checked::after {
  content: '';
  width: 1.5px;
  height: 3.5px;
  border: solid #141418;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  margin-bottom: 1px;
}

/* Floating bubble hover overrides */
#notes-floating-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 12px rgba(210,185,140,0.3);
}

/* Alignment Buttons Hover System */
.align-btn:hover {
  background: var(--bg-btn-hover) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.align-btn.gold-accent:hover {
  background: rgba(212,175,55,0.25) !important;
  border-color: var(--gold-bright) !important;
  color: var(--gold-bright) !important;
}

/* ═══════════════════════════════════════════
   SLEEK GRADIENT LAYOUT UPGRADES
   ═══════════════════════════════════════════ */
.gradient-targets {
  display: flex;
  gap: 6px;
  width: 100%;
}
.gradient-target-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
}
.gradient-target-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}
.gradient-target-btn.active {
  background: rgba(212,175,55,0.08);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 10px rgba(212,175,55,0.15);
}
.swatch-indicator {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.15s;
}
.gradient-target-btn.active .swatch-indicator {
  transform: scale(1.1);
  border-color: #fff;
}

.grad-control-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.grad-control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.grad-control-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  align-self: flex-start;
}
.premium-select, .premium-input {
  font-family: inherit;
  font-size: 9.5px;
  height: 24px;
  padding: 0 8px;
  box-sizing: border-box;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.premium-select:focus, .premium-input:focus {
  border-color: var(--gold-dim);
  background: rgba(0,0,0,0.35);
}
.premium-select {
  cursor: pointer;
}
.premium-select option {
  color: #000;
  background: #fff;
}
.gradient-opposite-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.15s, border-color 0.15s;
}
.gradient-opposite-btn:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.8);
}

.wheel-canvas-container {
  display: flex;
  justify-content: center;
  position: relative;
}
.wheel-canvas-container canvas {
  border-radius: 50%;
  cursor: crosshair;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}
.wheel-canvas-container #grad-wheel-selector {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
  left: 50%;
  top: 50%;
}

#premium-shades-container-gradient {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

/* Proximity & Settings Modals Cleanups */
.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
}
.setting-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  align-self: flex-start;
}

/* Checkbox Row Styling */
.setting-row-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  width: 100%;
}
.setting-row-checkbox input[type="checkbox"] {
  accent-color: var(--gold);
  width: 12px;
  height: 12px;
  margin: 0;
  cursor: pointer;
}
.setting-row-checkbox .setting-label {
  align-self: center;
  margin: 0;
}

/* Sortable JS Premium Styling */
.sortable-ghost {
    opacity: 0.3 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
}

.sortable-drag {
    opacity: 1 !important;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), 0 0 15px var(--gold-glow);
    z-index: 9999 !important;
    cursor: grabbing !important;
}

/* Modular Workspace Transitions */
.smooth-hide {
    display: none !important;
    opacity: 0 !important;
    transform: scaleY(0) translateY(-10px) !important;
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    border: none !important;
}

.spring-btn, .section, .easing-section, .spring-fx-container-grid > * {
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Project Work Timer & Session Tracker ──────────────────────── */
.project-timer-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
.pt-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  transition: all 0.3s;
}
.pt-badge.active {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.25);
  animation: ptPulse 2s infinite;
}
.pt-badge.paused {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}
@keyframes ptPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.pt-project-name {
  font-size: 9px;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  background: rgba(223, 185, 98, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(223, 185, 98, 0.2);
}
.pt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pt-main-time-wrap {
  text-align: center;
  background: linear-gradient(145deg, rgba(20,20,25,0.9), rgba(10,10,14,0.95));
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}
.pt-main-label {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pt-display {
  font-family: 'SF Mono', 'Roboto Mono', 'Consolas', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(223, 185, 98, 0.35);
}
.pt-session-wrap {
  display: flex;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
}
.pt-session-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pt-sub-label {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.pt-sub-val {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 10px;
  color: var(--text-primary);
  font-weight: 600;
}
.pt-controls {
  display: flex;
  gap: 6px;
}
.pt-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-btn);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 9px;
  font-weight: 500;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.pt-btn:hover {
  background: var(--bg-btn-hover);
  border-color: var(--border-light);
}
.pt-btn-toggle.active-pause {
  border-color: #fb923c;
  color: #fb923c;
}
.pt-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ── Graph Editor Visual Feedback & Animations ─────────── */
@keyframes dxvCanvasSuccessPulse {
  0%   { box-shadow: 0 0 0 0 var(--gold-glow), inset 0 0 0 2px var(--gold); border-color: var(--gold); }
  40%  { box-shadow: 0 0 22px 5px var(--gold-glow), inset 0 0 16px 2px var(--gold-glow); border-color: var(--gold); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0), inset 0 0 0 0 rgba(0, 0, 0, 0); border-color: var(--border); }
}

.canvas-flash-success {
  animation: dxvCanvasSuccessPulse 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  border-color: var(--gold) !important;
}

@keyframes dxvBadgeFloat {
  0%   { opacity: 0; transform: translateY(6px) scale(0.9); }
  20%  { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.95); }
}

.canvas-toast-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 20;
  animation: dxvBadgeFloat 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn-success-pulse {
  background: var(--gold-glow) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 12px var(--gold-glow);
  transform: scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ── 3D GLASSMORPHISM & GLOSSY UI ENGINE (Premium Frosted Glass) ──
   Gives every panel section and button a beveled, glossy 3D glass look.
═══════════════════════════════════════════════════════════════════════════ */

/* 1. Premium After Effects Liquid Glass Cards (Obsidian Frosted Glass) */
.section,
#wrap-anchor,
#wrap-custom-media,
#wrap-spring-effects-col,
#wrap-project-timer,
#wrap-graphs,
#wrap-graph-presets,
.section-card,
.card,
.preset-card,
.note-card {
  background: var(--bg-glass, rgba(24, 24, 30, 0.68)) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 14px !important;
  padding: 12px !important;
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.section:hover,
#wrap-anchor:hover,
#wrap-custom-media:hover,
#wrap-spring-effects-col:hover,
#wrap-project-timer:hover,
#wrap-graphs:hover,
#wrap-graph-presets:hover {
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-top-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.12) !important;
}

/* 2. Tactile Liquid Glass Pills (Quick Clicks Buttons - .spring-btn) */
.spring-btn,
.spring-btn-combined {
  height: 26px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 6px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #e2e8f0 !important;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.spring-btn:hover,
.spring-btn-combined:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-top-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.38) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.spring-btn:active,
.spring-btn-combined:active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  transform: translateY(0) scale(0.98) !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4) !important;
}

/* 3. Anchor Point 9-Grid Liquid Glass Buttons */
.anchor-grid button {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 6px rgba(0, 0, 0, 0.28) !important;
  color: #e2e8f0 !important;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.anchor-grid button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-top-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.38) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* Selected / Active Liquid Glass Jewel Dot */
.anchor-grid button.center,
.anchor-grid button.active-anchor {
  border: 1px solid var(--gold) !important;
  background: linear-gradient(180deg, rgba(210, 185, 140, 0.18) 0%, rgba(210, 185, 140, 0.04) 100%) !important;
  box-shadow: 0 0 10px var(--gold-glow), inset 0 0 8px rgba(210, 185, 140, 0.15) !important;
  color: var(--gold) !important;
}

.anchor-grid button.center:hover,
.anchor-grid button.active-anchor:hover {
  border-color: #fff !important;
  background: linear-gradient(180deg, rgba(210, 185, 140, 0.26) 0%, rgba(210, 185, 140, 0.08) 100%) !important;
  box-shadow: 0 0 14px rgba(210, 185, 140, 0.4), inset 0 0 10px rgba(210, 185, 140, 0.25) !important;
  transform: translateY(-1px) scale(1.03) !important;
}

/* 4. Project Work Timer Glowing Display & Controls */
#pt-display-total,
#pt-display-session {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25) !important;
  letter-spacing: 0.05em !important;
}

#wrap-project-timer button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 6px rgba(0, 0, 0, 0.28) !important;
  border-radius: 8px !important;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

#wrap-project-timer button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-top-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.38) !important;
  transform: translateY(-1px) !important;
}

/* 5. Dynamic Liquid Glass Specular Reflection on Mouse Hover (Apple VisionOS / Liquid Glass Vibe) */
.section,
#wrap-anchor,
#wrap-custom-media,
#wrap-spring-effects-col,
#wrap-project-timer,
#wrap-graphs,
#wrap-graph-presets,
.section-card,
.card,
.preset-card,
.note-card {
  position: relative !important;
  overflow: hidden !important;
}

.section::after,
#wrap-anchor::after,
#wrap-custom-media::after,
#wrap-spring-effects-col::after,
#wrap-project-timer::after,
#wrap-graphs::after,
#wrap-graph-presets::after,
.section-card::after,
.card::after,
.preset-card::after,
.note-card::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  pointer-events: none !important;
  background: radial-gradient(
    320px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.05) 0%,
    rgba(210, 185, 140, 0.018) 40%,
    transparent 80%
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  z-index: 2 !important;
}

.section:hover::after,
#wrap-anchor:hover::after,
#wrap-custom-media:hover::after,
#wrap-spring-effects-col:hover::after,
#wrap-project-timer:hover::after,
#wrap-graphs:hover::after,
#wrap-graph-presets:hover::after,
.section-card:hover::after,
.card:hover::after,
.preset-card:hover::after,
.note-card:hover::after {
  opacity: 1 !important;
}

.spring-btn,
.spring-btn-combined {
  position: relative !important;
  overflow: hidden !important;
}

.spring-btn::after,
.spring-btn-combined::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  pointer-events: none !important;
  background: radial-gradient(
    90px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.08) 0%,
    transparent 75%
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  z-index: 2 !important;
}

.spring-btn:hover::after,
.spring-btn-combined:hover::after {
  opacity: 1 !important;
}

/* 6. Custom Media Loop (GIF / Video Box) Hover Styling */
#custom-media-container:hover {
  border-color: rgba(210, 185, 140, 0.55) !important;
  box-shadow: 0 0 12px rgba(210, 185, 140, 0.2) !important;
}

/* 7. Classic Dark After Effects Theme Overrides */
body.classic-theme .section,
body.classic-theme #wrap-anchor,
body.classic-theme #wrap-custom-media,
body.classic-theme #wrap-spring-effects-col,
body.classic-theme #wrap-project-timer,
body.classic-theme #wrap-graphs,
body.classic-theme #wrap-graph-presets,
body.classic-theme .section-card,
body.classic-theme .card,
body.classic-theme .preset-card,
body.classic-theme .note-card {
  background: var(--bg-section) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.classic-theme .section::after,
body.classic-theme #wrap-anchor::after,
body.classic-theme #wrap-custom-media::after,
body.classic-theme #wrap-spring-effects-col::after,
body.classic-theme #wrap-project-timer::after,
body.classic-theme #wrap-graphs::after,
body.classic-theme #wrap-graph-presets::after,
body.classic-theme .section-card::after,
body.classic-theme .card::after,
body.classic-theme .preset-card::after,
body.classic-theme .note-card::after,
body.classic-theme .spring-btn::after,
body.classic-theme .spring-btn-combined::after {
  display: none !important;
}

body.classic-theme .spring-btn,
body.classic-theme .spring-btn-combined {
  background: var(--bg-btn) !important;
  border: 1px solid #32323d !important;
  box-shadow: none !important;
}

body.classic-theme .spring-btn:hover,
body.classic-theme .spring-btn-combined:hover {
  background: #2e2e38 !important;
  border-color: #444452 !important;
}

/* --- ASSET LIBRARY REFINED STYLES --- */
#asset-search-input:focus {
    background: rgba(212, 175, 55, 0.06) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}
#asset-filter-fav-btn.active {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}
#asset-filter-fav-btn.active svg {
    fill: var(--gold) !important;
    stroke: var(--gold) !important;
}
.asset-item-vert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}
.asset-item-vert:hover {
    background: rgba(255,255,255,0.055);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}
.asset-item-vert.is-fav {
    border-left: 2.5px solid var(--gold);
    background: rgba(212, 175, 55, 0.03);
}
.asset-fav-btn {
    color: var(--text-hint);
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.35;
}
.asset-item-vert:hover .asset-fav-btn {
    opacity: 0.8;
}
.asset-fav-btn:hover {
    opacity: 1 !important;
    transform: scale(1.2);
}
.asset-fav-btn.starred {
    opacity: 1 !important;
    color: var(--gold);
}
.asset-fav-btn.starred svg {
    fill: var(--gold);
    stroke: var(--gold);
}
.asset-del-btn {
    color: #ff4a4a;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.85);
}
.asset-item-vert:hover .asset-del-btn {
    opacity: 0.7;
    transform: scale(1);
}
.asset-del-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 74, 74, 0.15);
    transform: scale(1.15) !important;
}


