/**
 * theme.css — DeayanXtra Elemental Effects · shared design system
 * =============================================================================
 * Used by BOTH the pack shell (index.html) and every effect studio.
 *
 * Direction: dark studio with a light dot-matrix grid, and light titanium
 * "cards" cut from the same anisotropic brushed metal as the DeayanXtra button.
 * No primary colours anywhere — colour only ever appears as *content*.
 *
 * Every interactive control (sliders, switches, buttons, stops) is a metal part:
 * a conic-gradient anisotropic face, a bevelled edge and an iridescent film.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* ── surfaces ── */
  --bg: #0b0b0e;
  --bg-2: #101015;
  --dot: rgba(255, 255, 255, 0.075);
  --dot-strong: rgba(255, 255, 255, 0.16);
  --grid: 26px;

  /* ── ink ── */
  --ink: #121215;
  --ink-2: #3a3a42;
  --ink-3: #6f6f79;
  --paper: #ecebe6;
  --paper-dim: #a6a5a0;
  --line-dark: rgba(255, 255, 255, 0.09);

  /* ── the metal ── */
  --metal-light: conic-gradient(from 200deg at 50% 50%,
      #f7f6f2 0deg, #cfcdc6 38deg, #fbfaf6 84deg, #a9a7a0 132deg, #eeede8 178deg,
      #bdbbb4 222deg, #fbfaf6 268deg, #c4c2bb 312deg, #f7f6f2 360deg);
  --metal-dark: conic-gradient(from 200deg at 50% 50%,
      #4a4a52 0deg, #24242a 40deg, #5a5a63 88deg, #1c1c21 138deg, #494951 184deg,
      #26262c 232deg, #5b5b64 276deg, #2a2a30 320deg, #4a4a52 360deg);
  --plate: linear-gradient(180deg, #e9e8e3 0%, #dcdbd5 46%, #d2d1cb 100%);
  --brush: repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 1px, rgba(255,255,255,0.10) 1px 2px, rgba(0,0,0,0.028) 2px 3px);
  --edge-hi: rgba(255, 255, 255, 0.95);
  --edge-lo: rgba(0, 0, 0, 0.32);
  --film: linear-gradient(115deg, rgba(255,120,190,0.0) 20%, rgba(255,120,190,0.22) 36%, rgba(120,190,255,0.24) 50%, rgba(190,255,150,0.20) 64%, rgba(255,120,190,0.0) 80%);
  --groove: linear-gradient(180deg, #17171b 0%, #24242a 70%, #2c2c33 100%);
  --groove-lit: linear-gradient(180deg, #8d8c86 0%, #cfcec8 100%);

  --shadow-card: 0 1px 0 rgba(255,255,255,0.7) inset, 0 -1px 0 rgba(0,0,0,0.18) inset,
                 0 18px 40px -14px rgba(0,0,0,0.85), 0 2px 6px rgba(0,0,0,0.5);

  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Poppins', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; }
::selection { background: rgba(255, 255, 255, 0.85); color: #000; }

/* dot-matrix studio grid */
.dx-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1.1px, transparent 1.6px);
  background-size: var(--grid) var(--grid);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 88%);
}

/* ═════════ metal card ═════════ */
.dx-card {
  position: relative;
  background: var(--brush), var(--plate);
  color: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.dx-card::before {                       /* film sheen */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--film); mix-blend-mode: color-dodge; opacity: 0.16;
}
.dx-card::after {                        /* bevel */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.55) inset, 0 0 0 1.5px rgba(0,0,0,0.12);
}

/* ═════════ metal button ═════════ */
.dx-btn {
  --h: 34px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); padding: 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--metal-light); color: var(--ink);
  font-weight: 700; font-size: 12px; letter-spacing: 0.01em; white-space: nowrap;
  box-shadow: 0 1px 0 var(--edge-hi) inset, 0 -1px 1px var(--edge-lo) inset, 0 0 0 1px rgba(0,0,0,0.5),
              0 6px 14px -6px rgba(0,0,0,0.7);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s;
  user-select: none;
}
.dx-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--film); mix-blend-mode: color-dodge; opacity: 0.22;
}
.dx-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.dx-btn:active { transform: translateY(0.5px) scale(0.985); filter: brightness(0.94); }
.dx-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dx-btn[disabled] { opacity: 0.4; pointer-events: none; }
.dx-btn.sm { --h: 28px; padding: 0 12px; font-size: 11.5px; }
.dx-btn.icon { width: var(--h); padding: 0; }
.dx-btn.dark { background: var(--metal-dark); color: #f3f2ee; box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 0 0 1px #000, 0 6px 14px -6px #000; }
.dx-btn.ghost { background: transparent; color: var(--paper); box-shadow: 0 0 0 1px var(--line-dark) inset; }
.dx-btn.ghost::after { display: none; }
.dx-btn.ghost:hover { background: rgba(255,255,255,0.06); transform: none; }
.dx-btn.hero { --h: 40px; padding: 0 22px; font-size: 13px; }
.dx-btn svg { width: 15px; height: 15px; flex: none; }

/* ═════════ labels ═════════ */
.dx-mono { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.dx-hint { font-size: 10.5px; line-height: 1.4; color: var(--ink-3); margin-top: 5px; }

/* ═════════ control shell ═════════ */
.dx-ctl { padding: 9px 0; }
.dx-ctl + .dx-ctl { border-top: 1px solid rgba(0,0,0,0.07); }
.dx-ctl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.dx-ctl-head label { font-weight: 600; font-size: 12px; color: var(--ink); letter-spacing: 0.005em; }
.dx-ctl.inline .dx-ctl-head { margin-bottom: 0; align-items: center; }
.dx-ctl[hidden] { display: none; }

.dx-val {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink);
  min-width: 46px; text-align: right; padding: 2px 6px; border-radius: 6px;
  background: rgba(0,0,0,0.06); box-shadow: 0 1px 2px rgba(0,0,0,0.12) inset; cursor: text;
  border: 0; outline: 0;
}
.dx-val:focus { background: #fff; box-shadow: 0 0 0 1.5px var(--ink) inset; }

/* ═════════ slider ═════════ */
.dx-track { position: relative; height: 24px; touch-action: none; cursor: pointer; outline: 0; }
.dx-groove {
  position: absolute; left: 0; right: 0; top: 50%; height: 8px; margin-top: -4px; border-radius: 99px;
  background: var(--groove);
  box-shadow: 0 1px 2px rgba(0,0,0,0.75) inset, 0 -1px 0 rgba(255,255,255,0.05) inset, 0 1px 0 rgba(255,255,255,0.7);
}
.dx-fill {
  position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 99px; margin-left: 2px;
  background: linear-gradient(180deg, #f4f3ee, #a9a8a2);
  box-shadow: 0 0 6px rgba(255,255,255,0.28);
  pointer-events: none;
}
.dx-thumb {
  --rot: 0deg;
  position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: conic-gradient(from calc(200deg + var(--rot)) at 50% 50%,
      #fbfaf6 0deg, #c9c7c0 42deg, #ffffff 92deg, #9d9b94 140deg, #ecebe6 190deg,
      #b5b3ac 236deg, #fdfcf9 282deg, #c1bfb8 324deg, #fbfaf6 360deg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 -1px 2px rgba(0,0,0,0.35) inset,
              0 0 0 1px rgba(0,0,0,0.55), 0 4px 8px -1px rgba(0,0,0,0.55);
  transition: transform 0.16s var(--ease), box-shadow 0.16s;
  pointer-events: none;
}
.dx-thumb::before {                        /* concentric machining rings */
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(0,0,0,0.10) 0 0.6px, rgba(255,255,255,0.0) 0.6px 1.6px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18) inset;
}
.dx-thumb::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--film); mix-blend-mode: color-dodge; opacity: 0.35;
}
.dx-track:hover .dx-thumb { transform: scale(1.06); }
.dx-track.active .dx-thumb { transform: scale(1.14); box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 -1px 2px rgba(0,0,0,0.35) inset, 0 0 0 1px #000, 0 8px 14px -2px rgba(0,0,0,0.6); }
.dx-track:focus-visible .dx-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
.dx-track.dirty .dx-groove::after {        /* tick at the default value */
  content: ''; position: absolute; left: var(--def, 0%); top: -3px; width: 1px; height: 14px; background: rgba(0,0,0,0.0);
}

/* ═════════ toggle ═════════ */
.dx-switch { position: relative; width: 44px; height: 24px; flex: none; border: 0; padding: 0; border-radius: 99px; cursor: pointer; background: var(--groove);
  box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); transition: background 0.25s; }
.dx-switch .dx-thumb { top: 50%; left: 13px; width: 20px; height: 20px; margin: -10px 0 0 -10px; transition: left 0.28s var(--ease), transform 0.16s; }
.dx-switch[aria-checked="true"] { background: var(--groove-lit); box-shadow: 0 1px 3px rgba(0,0,0,0.55) inset, 0 1px 0 rgba(255,255,255,0.7); }
.dx-switch[aria-checked="true"] .dx-thumb { left: 31px; }
.dx-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ═════════ segmented ═════════ */
.dx-seg { position: relative; display: flex; padding: 3px; border-radius: 99px; background: var(--groove);
  box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); }
.dx-seg button { position: relative; z-index: 1; flex: 1; height: 26px; border: 0; background: none; cursor: pointer; border-radius: 99px;
  color: #b3b2ad; font-weight: 700; font-size: 11px; letter-spacing: 0.01em; transition: color 0.2s; white-space: nowrap; padding: 0 10px; }
.dx-seg button[aria-checked="true"] { color: var(--ink); }
.dx-seg .dx-seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 99px; background: var(--metal-light);
  box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 -1px 1px rgba(0,0,0,0.3) inset, 0 0 0 1px rgba(0,0,0,0.5), 0 3px 6px rgba(0,0,0,0.5);
  transition: transform 0.32s var(--ease), width 0.32s var(--ease); }

/* ═════════ select / popover ═════════ */
.dx-select { position: relative; width: 100%; height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 0 12px;
  border: 0; border-radius: 9px; cursor: pointer; background: var(--groove); color: #efeee9; font-weight: 600; font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); text-align: left; }
.dx-select svg { width: 12px; height: 12px; opacity: 0.7; flex: none; }
.dx-select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dx-pop { position: fixed; z-index: 1000; min-width: 160px; padding: 5px; border-radius: 12px; background: var(--brush), var(--plate); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 22px 46px -10px rgba(0,0,0,0.85), 0 1px 0 #fff inset;
  animation: dxPop 0.18s var(--ease); max-height: 60vh; overflow: auto; }
@keyframes dxPop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dx-pop .opt { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12px; }
.dx-pop .opt:hover, .dx-pop .opt.focus { background: rgba(0,0,0,0.09); }
.dx-pop .opt[aria-selected="true"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

/* ═════════ colour swatch + picker ═════════ */
.dx-swatch { position: relative; width: 30px; height: 30px; flex: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: var(--metal-light);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(0,0,0,0.55), 0 4px 8px -2px rgba(0,0,0,0.5); }
.dx-swatch i { position: absolute; inset: 5px; border-radius: 50%; background: var(--c, #f80); box-shadow: 0 0 0 1px rgba(0,0,0,0.45) inset, 0 1px 3px rgba(0,0,0,0.4) inset; }
.dx-swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dx-picker { width: 232px; padding: 12px; }
.dx-sv { position: relative; height: 132px; border-radius: 9px; cursor: crosshair; touch-action: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.5) inset; }
.dx-sv::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.dx-sv::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(0deg, #000, rgba(0,0,0,0)); }
.dx-sv .dot { position: absolute; z-index: 2; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #000, 0 2px 5px rgba(0,0,0,0.6); pointer-events: none; }
.dx-hue { position: relative; height: 12px; margin: 12px 0; border-radius: 99px; cursor: pointer; touch-action: none;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); box-shadow: 0 0 0 1px rgba(0,0,0,0.5) inset; }
.dx-hue .dx-thumb { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.dx-hex { width: 100%; height: 30px; border: 0; border-radius: 8px; padding: 0 10px; background: var(--groove); color: #efeee9; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); outline: 0; }

/* ═════════ gradient ramp editor ═════════ */
.dx-ramp-bar { position: relative; height: 30px; margin: 4px 8px 34px; border-radius: 8px; cursor: copy; touch-action: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.7), 0 2px 5px rgba(0,0,0,0.35) inset; }
.dx-stop { position: absolute; top: 100%; width: 16px; height: 22px; margin: 1px 0 0 -8px; cursor: grab; outline: 0; touch-action: none; }
.dx-stop::before { content: ''; position: absolute; left: 50%; top: -9px; width: 2px; height: 10px; margin-left: -1px; background: var(--ink); opacity: 0.55; }
.dx-stop b { position: absolute; left: 0; top: 0; width: 16px; height: 18px; border-radius: 4px 4px 8px 8px; background: var(--metal-light);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(0,0,0,0.6), 0 3px 6px rgba(0,0,0,0.5); }
.dx-stop b i { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 7px; border-radius: 2px; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,0.5); }
.dx-stop::after { content: ''; position: absolute; inset: -12px -5px -8px; }   /* generous grab area */
.dx-stop.sel { z-index: 2; }
.dx-stop.drag { z-index: 3; cursor: grabbing; }
.dx-stop.sel b { box-shadow: 0 1px 0 #fff inset, 0 0 0 2px var(--ink), 0 4px 8px rgba(0,0,0,0.55); transform: translateY(-1px); }
.dx-stop:active { cursor: grabbing; }
.dx-ramp-tools { display: flex; align-items: center; gap: 8px; }
.dx-ramp-tools .dx-val { flex: 1; text-align: left; min-width: 0; }

/* ═════════ numeric field (export) ═════════ */
.dx-num { display: flex; align-items: center; height: 30px; border-radius: 9px; background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); overflow: hidden; }
.dx-num input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0 4px 0 10px; border: 0; background: none; outline: 0; color: #f1f0eb; font-family: var(--font-mono); font-size: 12px; }
.dx-num textarea { flex: 1; min-width: 0; width: 100%; padding: 8px 10px; border: 0; background: none; outline: 0; resize: vertical; color: #f1f0eb; font-family: var(--font-mono); font-size: 12px; line-height: 1.45; }
.dx-num input::placeholder, .dx-num textarea::placeholder { color: #8d8c87; }
.dx-num .u { padding-right: 9px; color: #8d8c87; font-family: var(--font-mono); font-size: 10.5px; }
.dx-num button { width: 22px; align-self: stretch; border: 0; background: none; color: #b8b7b2; cursor: pointer; font-size: 13px; }
.dx-num button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.dx-num:focus-within { box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 0 0 1.5px rgba(255,255,255,0.7); }

/* ═════════ scrollbars ═════════ */
.dx-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.dx-scroll::-webkit-scrollbar { width: 8px; }
.dx-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ═════════ toast ═════════ */
.dx-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 3000; padding: 10px 18px; border-radius: 99px; background: var(--metal-light); color: var(--ink);
  font-weight: 700; font-size: 12px; box-shadow: 0 0 0 1px #000, 0 12px 28px -6px rgba(0,0,0,0.8); opacity: 0; transition: all 0.4s var(--ease); pointer-events: none; }
.dx-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition-duration: 0.01ms !important; } }

/* ═══════════════════════════════════════════════════════════════
   STUDIO LAYOUT  (effect pages)
   ═══════════════════════════════════════════════════════════════ */
body.dx-studio { display: flex; flex-direction: column; }
#dx-top { position: relative; z-index: 20; height: 60px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(20,20,25,0.92), rgba(11,11,14,0.86)); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-dark); }
.dx-top-l, .dx-top-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dx-crumb { display: flex; align-items: baseline; gap: 10px; padding-left: 4px; white-space: nowrap; }
.dx-crumb .dx-mono { color: var(--paper-dim); }
.dx-crumb strong { font-family: var(--font-title); font-weight: 800; font-size: 17px; letter-spacing: 0.02em; color: #fff; text-transform: uppercase; }
.dx-brand { height: 34px; padding: 0 16px; }
.dx-brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  z-index: 2;
  user-select: none;
}
.dx-brand-deayan {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #0f0f12;
}
.dx-brand-xtra {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #65646d;
  margin-left: 3px;
}

#dx-work { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 380px; gap: 0; }
#dx-panel { order: 2; position: relative; z-index: 5; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 12px 12px 12px 8px; }
#dx-panel-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 10px 2px; }
#dx-presets { display: flex; gap: 6px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
#dx-presets::-webkit-scrollbar { height: 4px; }
#dx-presets::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 99px; }
.dx-chip { flex: none; height: 28px; padding: 0 13px; border: 0; border-radius: 99px; cursor: pointer; background: rgba(255,255,255,0.06); color: var(--paper); font-weight: 700; font-size: 11.5px;
  box-shadow: 0 0 0 1px var(--line-dark) inset; transition: all 0.2s var(--ease); white-space: nowrap; }
.dx-chip:hover { background: rgba(255,255,255,0.13); }
.dx-chip.on { background: var(--metal-light); color: var(--ink); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px #000; }
#dx-sections { flex: 1; min-height: 0; padding-right: 6px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; }

.dx-sec { padding: 0 16px; }
.dx-sec-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 44px; border: 0; background: none; cursor: pointer; color: var(--ink); text-align: left; }
.dx-sec-head h3 { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.dx-sec-head .chev { width: 14px; height: 14px; transition: transform 0.35s var(--ease); opacity: 0.6; }
.dx-sec.open .chev { transform: rotate(180deg); }
.dx-sec-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.dx-sec.open .dx-sec-body { grid-template-rows: 1fr; }
.dx-sec-body > div { overflow: hidden; }
.dx-sec-inner { padding-bottom: 12px; }

#dx-stage { order: 1; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 8px 12px 14px; }
#dx-view { position: relative; flex: 1; min-height: 0; border-radius: 18px; overflow: hidden; background: #08080a; box-shadow: 0 0 0 1px var(--line-dark), 0 24px 60px -20px #000 inset; }
#dx-backdrop { position: absolute; inset: 0; transition: background 0.3s; }
#dx-backdrop.grid { background-color: #08080a; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.13) 1.1px, transparent 1.6px); background-size: 22px 22px; }
#dx-backdrop.checker { background-color: #2b2b30; background-image: conic-gradient(#3a3a41 25%, #26262b 0 50%, #3a3a41 0 75%, #26262b 0); background-size: 24px 24px; }
#dx-backdrop.black { background: #000; }
#dx-backdrop.grey { background: #7a7a7f; }
#dx-backdrop.white { background: #f2f1ec; }
#dx-backdrop.green { background: #00b140; }
#dx-frame { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#dx-canvas { display: block; width: 100%; height: 100%; image-rendering: auto; }
#dx-frame-edge { position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.22); }
#dx-stage-tools { position: absolute; z-index: 6; left: 12px; top: 12px; display: flex; gap: 8px; align-items: center; }
#dx-stage-tools .dx-seg { width: auto; }
#dx-stage-info { position: absolute; z-index: 6; right: 14px; top: 14px; padding: 5px 10px; border-radius: 99px; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); color: var(--paper-dim); }
#dx-error { position: absolute; z-index: 30; inset: 16px; padding: 22px; border-radius: 14px; background: rgba(20,8,8,0.94); color: #ffd9d0; font-family: var(--font-mono); font-size: 11.5px; white-space: pre-wrap; overflow: auto; display: none; }

#dx-transport { position: relative; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 12px 6px 0; }
#dx-transport .dx-time { font-family: var(--font-mono); font-size: 11.5px; color: var(--paper); min-width: 118px; white-space: nowrap; }
#dx-transport .dx-time span { color: var(--paper-dim); }
#dx-scrub { flex: 1; }
#dx-scrub .dx-groove { background: linear-gradient(180deg, #050507, #16161a); box-shadow: 0 1px 2px #000 inset, 0 1px 0 rgba(255,255,255,0.06); }
#dx-transport .dx-mono { color: var(--paper-dim); }
#dx-transport .dx-select { width: auto; min-width: 84px; height: 28px; }

/* export cluster */
.dx-exp { display: flex; align-items: center; gap: 8px; }
.dx-exp .dx-select { height: 34px; width: auto; min-width: 118px; }
.dx-exp .dx-num { height: 34px; width: 104px; }
.dx-exp .lbl { color: var(--paper-dim); margin-right: -2px; }
#dx-export-pop { width: 372px; padding: 16px; }
#dx-export-pop .row { margin-bottom: 12px; }
#dx-export-pop .row > label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 11.5px; color: var(--ink); }
#dx-export-pop .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#dx-export-pop .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); }
.dx-loopchip { display: inline-flex; align-items: center; gap: 6px; }
.dx-loopchip i { width: 7px; height: 7px; border-radius: 50%; background: #9a9992; box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }
.dx-loopchip.ok i { background: #fff; box-shadow: 0 0 0 1px #000, 0 0 8px rgba(255,255,255,0.9); }

/* progress modal */
#dx-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(4,4,6,0.72); backdrop-filter: blur(6px); }
#dx-modal.show { display: flex; }
#dx-modal .dx-card { width: 420px; padding: 24px; }
#dx-modal h2 { margin: 0 0 4px; font-family: var(--font-title); font-weight: 800; font-size: 20px; }
#dx-modal .sub { color: var(--ink-3); margin-bottom: 16px; font-size: 12px; }
#dx-modal canvas { width: 100%; aspect-ratio: 1; max-height: 210px; object-fit: contain; border-radius: 10px; background: #0a0a0d; box-shadow: 0 0 0 1px rgba(0,0,0,0.5); display: block; margin-bottom: 16px; }
.dx-bar { height: 10px; border-radius: 99px; background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); overflow: hidden; }
.dx-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(180deg, #f4f3ee, #a9a8a2); transition: width 0.2s; }
.dx-prog-meta { display: flex; justify-content: space-between; margin: 10px 0 18px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }

/* thumbnail mode (used by the pack shell to render card previews) */
body.dx-thumb { margin: 0; padding: 0; overflow: hidden; background: transparent !important; }

@media (max-width: 1180px) { .dx-exp .opt-inline { display: none; } }
@media (max-width: 900px) { #dx-work { grid-template-columns: 1fr; grid-template-rows: 46vh 1fr; } #dx-panel { order: 2; } .dx-crumb .dx-mono { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════
   THEME SWITCH + LIGHT THEME
   Dark stays the default look. Light flips the chrome, keeps the titanium
   plates, and inverts the metal buttons (dark metal = primary), like the main site.
   ═══════════════════════════════════════════════════════════════════════ */
.dx-theme-switch-btn { position: relative; display: inline-flex; align-items: center; justify-content: space-between; flex: none; width: 64px; height: 32px; padding: 3px; border: 0; border-radius: 99px; cursor: pointer; overflow: hidden;
  background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.25); user-select: none; }
.dx-switch-glyph { position: relative; z-index: 3; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: #8d8c87; transition: color 0.3s; pointer-events: none; }
.dx-switch-glyph svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dx-switch-coin { position: absolute; z-index: 2; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--metal-light);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(0,0,0,0.55), 0 3px 6px rgba(0,0,0,0.45); transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
html[data-theme="light"] .dx-switch-coin { transform: translateX(32px); }
html:not([data-theme="light"]) .dx-switch-glyph.dark-glyph, html[data-theme="light"] .dx-switch-glyph.light-glyph { color: var(--ink); }
.dx-theme-switch-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* wavy reveal — polygon is driven by core/theme-wave.js through --dx-wave */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; clip-path: var(--dx-wave, circle(0px)); }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e2e0d9; --bg-2: #eae8e2;
  --dot: rgba(20, 20, 28, 0.11); --dot-strong: rgba(20, 20, 28, 0.24);
  --paper: #17161b; --paper-dim: #6b6974; --line-dark: rgba(0, 0, 0, 0.14);
  --plate: linear-gradient(180deg, #f7f6f2 0%, #edece7 46%, #e3e2dc 100%);
  --brush: repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 1px, rgba(255,255,255,0.38) 1px 2px, rgba(0,0,0,0.02) 2px 3px);
  --shadow-card: 0 1px 0 #fff inset, 0 -1px 0 rgba(0,0,0,0.08) inset, 0 0 0 1px rgba(0,0,0,0.10), 0 18px 36px -16px rgba(30,28,40,0.30), 0 2px 5px rgba(30,28,40,0.10);
}
html[data-theme="light"] ::selection { background: rgba(20, 20, 28, 0.85); color: #fff; }

/* buttons: primary = dark metal, secondary = light metal (inverted vs dark theme) */
html[data-theme="light"] .dx-btn { box-shadow: 0 1px 0 #fff inset, 0 -1px 1px rgba(0,0,0,0.22) inset, 0 0 0 1px rgba(0,0,0,0.26), 0 6px 14px -6px rgba(30,28,40,0.4); }
html[data-theme="light"] .dx-btn.dark { background: var(--metal-light); color: var(--ink); }
html[data-theme="light"] .dx-btn.hero { background: var(--metal-dark); color: #f6f5f0; box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 0 0 1px #000, 0 8px 18px -8px rgba(0,0,0,0.6); }
html[data-theme="light"] .dx-btn.ghost { background: transparent; box-shadow: 0 0 0 1px var(--line-dark) inset; }
html[data-theme="light"] .dx-btn.ghost:hover { background: rgba(0,0,0,0.06); }
html[data-theme="light"] .dx-chip { background: rgba(0,0,0,0.06); }
html[data-theme="light"] .dx-chip:hover { background: rgba(0,0,0,0.12); }
html[data-theme="light"] .dx-chip.on, html[data-theme="light"] .dx-index-chip.on { background: var(--metal-dark); color: #f6f5f0; box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 0 0 1px #000; }
html[data-theme="light"] .dx-index-chip.on .no { color: #b9b8c0; }
html[data-theme="light"] .dx-index-chip { background: rgba(0,0,0,0.05); }
html[data-theme="light"] .dx-index-chip:hover { background: rgba(0,0,0,0.1); }

/* chrome: headers, studio viewport, scrollbars */
html[data-theme="light"] #dx-top, html[data-theme="light"] #dx-header { background: linear-gradient(180deg, rgba(246,245,241,0.94), rgba(230,228,222,0.86)); }
html[data-theme="light"] .dx-crumb strong { color: var(--paper); }
html[data-theme="light"] #dx-view { background: #d3d1ca; box-shadow: 0 0 0 1px var(--line-dark), 0 24px 60px -24px rgba(30,28,40,0.35) inset; }
html[data-theme="light"] #dx-backdrop.grid { background-color: #d3d1ca; background-image: radial-gradient(circle at 1px 1px, rgba(20,20,28,0.20) 1.1px, transparent 1.6px); }
html[data-theme="light"] #dx-frame-edge { box-shadow: 0 0 0 1px rgba(0,0,0,0.28); }
html[data-theme="light"] #dx-stage-info { background: rgba(255,255,255,0.72); color: var(--paper-dim); }
html[data-theme="light"] .dx-scroll { scrollbar-color: rgba(0,0,0,0.28) transparent; }
html[data-theme="light"] .dx-scroll::-webkit-scrollbar-thumb, html[data-theme="light"] #dx-presets::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); }
html[data-theme="light"] #dx-presets { scrollbar-color: rgba(0,0,0,0.25) transparent; }
html[data-theme="light"] #dx-modal, html[data-theme="light"] #dx-upsell { background: rgba(226,224,217,0.62); }

/* pack shell */
html[data-theme="light"] #dx-title { background: linear-gradient(180deg, #2c2b32 0%, #4d4c55 34%, #0e0d12 49%, #3b3a42 52%, #1c1b21 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.85)) drop-shadow(0 16px 26px rgba(30,28,40,0.22)); }
html[data-theme="light"] .dx-brand-watermark { color: rgba(0, 0, 0, 0.05); }

/* ═════════════════════════════════════════════════════════════
   Image Art Effects — source panel, preset grid
   ═════════════════════════════════════════════════════════════ */
.mv-trackcard { padding: 14px 16px 6px; }
.mv-tc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mv-tc-head h3, .mv-p-head h3 { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }
#mv-src { flex: 1; max-width: 250px; }
#mv-src .dx-seg button { font-size: 10.5px; height: 24px; }
.mv-file { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px; cursor: pointer; overflow: hidden;
  background: var(--groove); color: #f1f0eb; box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); outline: none; }
.mv-file:hover, .mv-file:focus-visible { box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 0 0 1.5px #d8d7dc; }
.mv-file-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #d8d7dc, #8d8c94); color: #fff; }
.mv-file-ic svg { width: 18px; height: 18px; }
.mv-file-txt { display: flex; flex-direction: column; min-width: 0; }
.mv-file-txt b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-file-txt span { font-size: 10.5px; color: #a3a2ad; margin-top: 2px; }
.mv-file-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.mv-file-bar i { display: block; height: 100%; width: 0; background: #d8d7dc; transition: width 0.2s; }
.mv-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 9px 0 2px; }
.mv-row[hidden], .mv-file[hidden], .mv-live[hidden] { display: none; }
.mv-select { height: 28px; border-radius: 9px; border: 0; padding: 0 8px; background: var(--groove); color: #f1f0eb; font-size: 11px; max-width: 100%; }
.mv-live .dx-hint { margin-top: 2px; }
.mv-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.mv-fields label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 11.5px; }
.mv-fields input { font-family: var(--font-ui) !important; font-size: 12px !important; }
.mv-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.mv-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mv-thumb { position: relative; width: 100%; aspect-ratio: 1; border: 0; padding: 0; border-radius: 11px; cursor: pointer; overflow: hidden; background: var(--groove);
  box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); }
.mv-thumb canvas { width: 100%; height: 100%; display: block; }
.mv-thumb span { position: absolute; inset: 0; display: grid; place-items: center; color: #8e8d97; font-size: 22px; font-weight: 300; }
.mv-slot.has .mv-thumb span { display: none; }
.mv-thumb:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 0 0 1.5px #d8d7dc; }
.mv-slot-l { font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.mv-clear { display: none; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; border-radius: 50%; padding: 4px; cursor: pointer; background: rgba(0,0,0,0.65); color: #fff; }
.mv-clear svg { width: 12px; height: 12px; display: block; }
.mv-slot.has .mv-clear { display: block; }
#mv-react { margin-top: 6px; border-top: 1px solid rgba(0,0,0,0.08); }
#mv-react .dx-ctl[hidden] { display: none; }

.mv-presets { padding: 14px 14px 12px; }
.mv-p-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.mv-p-head .dx-mono { color: var(--ink-3); }
.mv-ptabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; padding: 3px; border-radius: 12px; background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset; }
.mv-ptab { flex: 1 0 auto; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; cursor: pointer; background: none; color: #c9c8d0; font-weight: 700; font-size: 11px; }
.mv-ptab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.mv-ptab.on { background: var(--metal-light); color: var(--ink); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px #000; }
.mv-pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 172px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.mv-pgrid.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.mv-preset { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 9px 6px 6px; border: 0; border-radius: 11px; cursor: pointer; text-align: left;
  background: rgba(0,0,0,0.07); color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.1) inset; transition: background 0.15s, transform 0.15s; }
.mv-preset:hover { background: rgba(0,0,0,0.13); transform: translateY(-1px); }
.mv-preset i { flex: none; width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.35) inset; }
.mv-preset span { font-weight: 700; font-size: 11.5px; line-height: 1.15; padding-top: 6px; }
.mv-preset em { position: absolute; left: 44px; top: 5px; font-style: normal; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.mv-preset.on { background: var(--metal-dark); color: #f3f2ee; box-shadow: 0 0 0 1px #000, 0 1px 0 rgba(255,255,255,0.2) inset; }
.mv-preset.on em { color: #a9a8b2; }
.mv-pmore { width: 100%; margin-top: 10px; --h: 40px; font-size: 12.5px; font-weight: 800; }
.mv-pmore b { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,0.12); font-size: 11px; }

.mv-aspect { display: flex; padding: 3px; gap: 2px; border-radius: 99px; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px var(--line-dark); }
.mv-asp { height: 24px; padding: 0 10px; border: 0; border-radius: 99px; cursor: pointer; background: none; color: #c9c8d0; font-weight: 700; font-size: 11px; font-family: var(--font-mono); }
.mv-asp:hover { color: #fff; }
.mv-asp.on { background: var(--metal-light); color: var(--ink); }
#mv-sound { position: absolute; z-index: 7; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); color: #e9e8f0; pointer-events: none; }
#mv-sound[hidden], #mv-drop[hidden] { display: none; }
#mv-drop { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; background: rgba(4,16,10,0.8); border: 2px dashed #d8d7dc; border-radius: 18px; pointer-events: none; }
#mv-drop div { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; }
#mv-drop svg { width: 46px; height: 46px; color: #d8d7dc; }
#mv-drop b { font-size: 20px; }
#mv-drop span { color: #b9b4c8; font-size: 12px; }
#dx-scrub { position: relative; }
#mv-wave { position: absolute; left: 11px; top: -8px; height: 30px; width: calc(100% - 22px); pointer-events: none; z-index: 0; }
#mv-range { position: absolute; top: 24px; height: 3px; border-radius: 3px; background: #d8d7dc; opacity: 0.9; margin-left: 11px; max-width: calc(100% - 22px); pointer-events: none; }
#mv-range[hidden] { display: none; }
#dx-scrub .dx-slider { position: relative; z-index: 1; }
.mv-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; margin-right: 4px; animation: mvBlink 1s infinite; }
@keyframes mvBlink { 50% { opacity: 0.3; } }

body.mv-perform { cursor: none; }
body.mv-perform #dx-top, body.mv-perform #dx-panel, body.mv-perform #dx-transport, body.mv-perform #dx-stage-tools, body.mv-perform #dx-stage-info, body.mv-perform .dx-grid, body.mv-perform #mv-sound { display: none !important; }
body.mv-perform #dx-work { display: block; }
body.mv-perform #dx-stage { position: fixed; inset: 0; padding: 0; z-index: 4000; }
body.mv-perform #dx-view { border-radius: 0; background: #000; }
body.mv-perform #dx-frame { position: fixed; inset: 0; width: 100vw !important; height: 100vh !important; transform: none !important; }
body.mv-perform #dx-canvas { object-fit: cover; }
body.mv-perform #dx-frame-edge { display: none; }
#mv-perform-hint { position: fixed; z-index: 5000; left: 50%; bottom: 28px; transform: translate(-50%, 10px); padding: 9px 16px; border-radius: 99px; background: rgba(0,0,0,0.7); color: #eee; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
#mv-perform-hint.show { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="light"] .mv-ptab:not(.on) { color: #c9c8d0; }

.mv-react-d { margin: 8px 0 4px; border-top: 1px solid rgba(0,0,0,0.08); }
.mv-react-d summary { cursor: pointer; list-style: none; padding: 10px 0 4px; font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.mv-react-d summary::-webkit-details-marker { display: none; }
.mv-react-d summary::before { content: '+ '; }
.mv-react-d[open] summary::before { content: '− '; }
.mv-react-d summary span { font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ink-3); margin-left: 4px; font-family: var(--font-ui); }
.mv-react-d #mv-react { border-top: 0; margin-top: 0; }

#dx-presets.mv-presets { display: block; overflow: visible; flex: none; }
#mv-track { flex: none; }
#dx-sections > * { flex: none; }

/* ── Image Art Effects additions ───────────────────────────── */
.mv-file-ic { color: #04140b; }
.ia-srcgrid { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; }
.ia-srcthumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.7); cursor: pointer; border: 0; padding: 0; }
.ia-srcthumb canvas { width: 100%; height: 100%; display: block; }
.ia-demos { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ia-demos button.on { background: var(--metal-light); color: var(--ink); }
.ia-sub { margin: 8px 0 4px; border-top: 1px solid rgba(0,0,0,0.08); }
.ia-sub summary { cursor: pointer; list-style: none; padding: 10px 0 4px; font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.ia-sub summary::-webkit-details-marker { display: none; }
.ia-sub summary::before { content: '+ '; }
.ia-sub[open] summary::before { content: '− '; }
.ia-sub summary span { font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ink-3); margin-left: 4px; font-family: var(--font-ui); }
.ia-sub .dx-ctl[hidden], .ia-row[hidden] { display: none; }
.ia-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; }
.ia-brush.on { background: var(--metal-light) !important; color: var(--ink) !important; }
#ia-status { position: absolute; z-index: 6; left: 50%; top: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); color: #dfffe9; pointer-events: none; font-size: 11px; }
#ia-status[hidden] { display: none; }
#ia-status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d8d7dc; margin-right: 7px; box-shadow: 0 0 8px #d8d7dc; animation: mvBlink 0.9s infinite; }
#dx-view.brushing { cursor: crosshair; }
#ia-brushcursor { position: absolute; z-index: 8; pointer-events: none; border: 1.5px solid #fff; border-radius: 50%; mix-blend-mode: difference; transform: translate(-50%, -50%); }
#ia-brushcursor[hidden] { display: none; }
.ia-compare.on { background: var(--metal-light) !important; color: var(--ink) !important; }
@media (max-width: 720px) {
  #x-dur, #dx-undo, #dx-redo, .dx-crumb { display: none !important; }
  #dx-top { gap: 8px; padding: 0 10px; }
  .dx-top-l { flex-shrink: 1; overflow: hidden; }
  .mv-aspect .mv-asp[data-size="match"], .ia-compare { display: none; }
}

/* ── Interactive Cursor Effects additions ───────────────────── */
#dx-view { cursor: crosshair; touch-action: none; }
#dx-stage-tools .dx-btn.on { background: var(--metal-light); color: var(--ink); }
.cx-state { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); }
.cx-state.rec { color: #e5484d; animation: mvBlink 0.9s infinite; }
.cx-ixrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.cx-ixrow .dx-btn { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.cx-ixrow .dx-btn { width: 100%; justify-content: center; }
.cx-recbtn svg { width: 15px; height: 15px; }
.cx-takes { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.cx-take { display: flex; align-items: center; gap: 4px; border-radius: 10px; background: var(--groove); box-shadow: 0 1px 3px rgba(0,0,0,0.6) inset; padding: 3px; }
.cx-take.on { background: var(--metal-dark); color: #f3f2ee; box-shadow: 0 0 0 1px #000, 0 1px 0 rgba(255,255,255,0.2) inset; }
.cx-take-play { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; cursor: pointer; padding: 5px 6px; font: inherit; text-align: left; }
.cx-take-play svg { width: 13px; height: 13px; flex: none; }
.cx-take-play b { font-size: 12px; flex: 1; }
.cx-take-play span { font-size: 10.5px; opacity: 0.75; }
.cx-take-x { border: 0; background: none; color: inherit; opacity: 0.55; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; }
.cx-take-x:hover { opacity: 1; background: rgba(0,0,0,0.15); }
.cx-take-x svg { width: 12px; height: 12px; }
#cx-recbar { position: absolute; z-index: 7; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: rgba(0,0,0,0.72); backdrop-filter: blur(8px); color: #f1f0eb; pointer-events: none; font-size: 11px; white-space: nowrap; }
#cx-recbar[hidden] { display: none; }
#cx-recbar i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; margin-right: 8px; animation: mvBlink 0.9s infinite; }
.cx-rectime { color: #ff6b6f; font-weight: 700; }
/* sample web page over the canvas (design px: it scales with the frame) */
#cx-mock { position: absolute; inset: 0; pointer-events: none; color: #f6f5f2; font-family: var(--font-ui); text-shadow: 0 1px 16px rgba(0,0,0,0.35); container-type: inline-size; }
#cx-mock[hidden] { display: none; }
#cx-mock nav { position: absolute; left: 4cqw; right: 4cqw; top: 3cqw; display: flex; align-items: center; gap: 2.6cqw; font-size: max(13px, 1.05cqw); font-weight: 600; opacity: 0.92; }
#cx-mock nav b { margin-right: auto; font-size: max(15px, 1.3cqw); letter-spacing: -0.02em; }
#cx-mock nav span { opacity: 0.75; }
#cx-mock nav i { font-style: normal; padding: 0.55em 1.2em; border-radius: 99px; box-shadow: 0 0 0 1px rgba(255,255,255,0.45) inset; }
#cx-mock .cx-hero { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92%, 62cqw); text-align: center; }
#cx-mock small { display: inline-block; font-size: max(10px, 0.8cqw); letter-spacing: 0.16em; font-weight: 700; padding: 0.5em 1em; border-radius: 99px; box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset; margin-bottom: 1.6em; }
#cx-mock h1 { margin: 0 0 0.35em; font-family: var(--font-title); font-size: max(30px, 6cqw); line-height: 0.95; letter-spacing: -0.035em; font-weight: 800; }
#cx-mock p { margin: 0 auto 1.6em; max-width: 30em; font-size: max(13px, 1.25cqw); opacity: 0.78; }
#cx-mock a { display: inline-block; padding: 0.9em 2em; border-radius: 99px; background: #f6f5f2; color: #0b0b0e; font-weight: 700; font-size: max(13px, 1.05cqw); text-shadow: none; }
/* code modal */
#dx-modal .dx-card.cx-wide { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.cx-code-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cx-tabs { margin: 4px 0 8px; }
.cx-howto { margin: 0 0 10px; }
.cx-howto code { font-family: var(--font-mono); }
.cx-promptopts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.cx-promptopts #cx-fw { width: 180px; }
.cx-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cx-code { flex: 1; min-height: 260px; height: 46vh; width: 100%; box-sizing: border-box; resize: none; padding: 14px; border: 0; border-radius: 12px; background: #0a0a0d; color: #d9d8e0; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; box-shadow: 0 1px 3px #000 inset, 0 0 0 1px rgba(0,0,0,0.6); white-space: pre; tab-size: 2; }
.cx-code-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cx-code-foot .dx-mono { color: var(--ink-3); font-size: 10.5px; }
@media (max-width: 720px) { #x-code { padding: 0 12px; } #dx-stage-tools .mv-aspect { display: none; } }
.cx-img { display: flex; gap: 10px; align-items: center; }
.cx-img-thumb { flex: none; width: 58px; height: 58px; border: 0; padding: 0; border-radius: 11px; cursor: pointer; background: var(--groove) center / cover no-repeat; box-shadow: 0 1px 3px rgba(0,0,0,0.8) inset, 0 1px 0 rgba(255,255,255,0.6); }
.cx-img-thumb:not(.has)::after { content: '+'; display: grid; place-items: center; height: 100%; color: #8e8d97; font-size: 22px; font-weight: 300; }
.cx-img-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cx-img-r [hidden] { display: none; }
#dx-stage-info { top: auto; bottom: 14px; }
.cx-take { color: #f1f0eb; }
@media (max-width: 560px) { #x-more, #dx-brand { display: none !important; } #x-code { padding: 0 10px; font-size: 12px; } }
