/* ── Design tokens ── */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg:            #0b0f12;
  --bg-2:          #0f1418;
  --panel:         #131a1f;
  --panel-2:       #182026;
  --panel-3:       #1d262d;
  --border:        #232c34;
  --border-strong: #2e3942;

  /* Text */
  --fg:      #e8ecf0;
  --fg-2:    #c2c9d1;
  --muted:   #8a939c;
  --muted-2: #5d666e;

  /* Stem colours */
  --vocals: #ef4444;
  --drums:  #f97316;
  --bass:   #eab308;
  --guitar: #22c55e;
  --piano:  #a855f7;
  --other:  #9ca3af;
  /* Recorded takes (constants.js TAKE_COLOR must match) */
  --take:   #5ec8c0;

  /* Width shared by the composer's two end segments (Song structure and
     Extract stems) so they match. See .daw-process-btn / .structure-toggle. */
  --composer-action-w: 140px;

  /* Accent */
  --accent:   #f4b740;
  --accent-2: #d99a2b;

  /* Legacy compat aliases used by waves.css / player.js */
  --gold:        var(--accent);
  --gold-bright: #f8c054;
  --gold-soft:   rgba(244,183,64,0.16);
  --gold-line:   rgba(244,183,64,0.28);
  --ink:         var(--fg);
  --ink-dim:     var(--fg-2);
  --ink-faint:   var(--muted);
  --line:        var(--border);
  --line-strong: var(--border-strong);
  --glass-line:  var(--border);
  --danger:      #d65a4a;
  --focus-ring:  rgba(236,236,236,0.55);

  /* Typography */
  /* Explicit CJK fallbacks for Japanese/Simplified Chinese (i18n, EN/PL/JA/ZH):
     neither Inter nor JetBrains Mono carries CJK glyphs, so without these the
     browser still substitutes automatically, just to whichever CJK font it
     picks on its own -- naming one keeps weight/x-height consistent with the
     Latin text sitting next to it across platforms, rather than leaving it to
     chance. Never affects EN/PL text: browsers only reach past the first name
     a glyph is missing from. */
  --font-sans: 'Inter', -apple-system, system-ui, 'Hiragino Sans', 'Noto Sans JP', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Hiragino Sans', 'Noto Sans JP', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', monospace;

  /* Layout */
  --header-w: 300px;
  /* Width of the studio's left column: the stems/mixer panel and the label
     cell above it. */
  --daw-col-w: 300px;
  --lane-h:   86px;
  --radius:   10px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Track header controls (the mixer column's rows): K, M, S, download, arm,
     the track menu, the input picker and the EQ tab are one size, large
     enough to read across a room (a practice screen seen from the drum
     stool). The row keeps its height and the column its width: the controls
     sit on two lines, centred on the row's middle where the name sits. */
  --mx-ctl-h:      28px;
  --mx-ctl-w:      28px;
  --mx-ctl-font:   13px;
  --mx-name-font:  15px;
  --mx-name-w:     88px;

  /* EQ tab and panels (eq.css). The tab is the M/S buttons' family: the
     same 5px corner and height, at the start of the fader's line. */
  --eq-tab-h:      var(--mx-ctl-h);
  --eq-tab-radius: 5px;
  --eq-panel-bg:   #0d1216;
  --eq-graph-bg:   #090c0f;
  --eq-grid:       rgba(148,163,184,0.09);
  --eq-grid-zero:  rgba(148,163,184,0.26);
  --eq-label:      #6b757e;
  --eq-spectrum:   rgba(148,163,184,0.20);
  --eq-spectrum-line: rgba(148,163,184,0.42);
  --eq-curve-fill: rgba(244,183,64,0.10);
  /* A suggested EQ under review, drawn dashed over the current curve. */
  --eq-ghost:      rgba(125,211,252,0.90);
  --eq-plate:      #161d23;
  --eq-plate-edge: #26313a;
  --eq-knob:       #222c34;
  --eq-knob-cap:   #2c3741;
  /* Band handles, in turn (a band keeps its colour while it exists). */
  --eq-band-1: #f4b740;
  --eq-band-2: #5ec8c0;
  --eq-band-3: #e97a6a;
  --eq-band-4: #8fb4ff;
  --eq-band-5: #b9e07a;
  --eq-band-6: #d49cf0;
  /* The Master drawer (mastering.css): its settings column fits without
     scrolling at this height. */
  /* A third of the window, so the lanes keep room above it (364 px fixed left
     no lane at all on a 720 px tall window). The settings column scrolls. */
  --master-drawer-h: clamp(250px, 34vh, 340px);

  /* Motion */
  --t-fast: 80ms;
  --t-base: 120ms;
  --easing: cubic-bezier(0.2,0.8,0.2,1);
  --shadow-panel: 0 4px 24px rgba(0,0,0,0.4);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
