/* Sonoglyph · Phase 0 styles
 *
 * Visual language matches the Sidekick motion lab (experiment 10) and Glaaass
 * (experiment 11): dark chrome over a radial dark field, floating pill top bar,
 * collapsible 22px floating panels, tall rounded 36px sliders with default dots
 * and value chips, and a contained dish stage with top-left highlight arc and
 * bottom-rim toolbar. Tokens are copied locally so Sonoglyph stands alone.
 */

:root {
  --page: #ffffff;
  --chrome: #1b1b1d;
  --chrome-raised: #232326;
  --chrome-sunk: #151517;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.13);
  --fill: rgba(255, 255, 255, 0.055);
  --fill-hover: rgba(255, 255, 255, 0.09);
  --fill-active: rgba(255, 255, 255, 0.13);
  --track-fill: rgba(255, 255, 255, 0.12);

  --text: #ededef;
  --text-2: #a3a3ab;
  --text-3: #7d7d86;
  --on-light: #141416;
  --light: #ececee;
  --thumb: #f2f2f4;

  --accent: #e5c694;
  --accent-soft: rgba(229, 198, 148, 0.16);
  --accent-ring: rgba(229, 198, 148, 0.55);
  --pass: #7ddc97;
  --pass-soft: rgba(125, 220, 151, 0.13);

  --r-panel: 22px;
  --r-dish: 40px;
  --r-well: 31px;
  --dish-pad: 9px;
  --r-ctl: 12px;
  --r-chip: 8px;
  --r-pill: 999px;

  --shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.18), 0 10px 30px -6px rgba(0, 0, 0, 0.32), 0 24px 60px -20px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.22), 0 24px 64px -12px rgba(0, 0, 0, 0.5);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.2, 1);
  --t-fast: 140ms;
  --t: 200ms;
  --t-slow: 240ms;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --top: 12px;
  --bar-h: 44px;
  --panel-top: calc(var(--top) + var(--bar-h) + 12px);
  --lib-w: 260px;
  --par-w: 320px;

  color-scheme: dark;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--page);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-chip); }
.booting * { transition: none !important; }
body.is-dragging, body.is-dragging * { cursor: ew-resize !important; user-select: none !important; }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font: 500 11px/1 var(--mono);
  color: var(--text);
  background: var(--fill);
  border: 1px solid var(--hair);
  border-bottom-color: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

/* ------------------------------------------------------------------ */
/* Icons & buttons                                                     */
/* ------------------------------------------------------------------ */

.icon { display: inline-flex; width: 16px; height: 16px; flex: none; }
.icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover:not(:disabled) { background: var(--fill-hover); color: var(--text); }
.icon-btn:active:not(:disabled) { background: var(--fill-active); }
.icon-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.icon-btn.small { width: 28px; height: 28px; border-radius: var(--r-chip); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 10px;
  font-weight: 500; font-size: 13px;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast), transform var(--t-fast);
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-quiet { background: var(--fill); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--fill-hover); }
.btn-light { background: var(--light); color: var(--on-light); font-weight: 600; border-radius: var(--r-pill); padding: 0 14px; }
.btn-light:hover:not(:disabled) { background: #fff; }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--fill); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-full { width: 100%; }

/* ------------------------------------------------------------------ */
/* The dish: contained stage                                           */
/* ------------------------------------------------------------------ */

.dish {
  position: fixed; z-index: 1;
  left: 284px; top: 68px; width: 640px; height: 520px;
  border-radius: var(--r-dish);
  background: linear-gradient(180deg, #1e1e22, #18181b);
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 5px 14px -4px rgba(0, 0, 0, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: left var(--t-slow) var(--ease), top var(--t-slow) var(--ease), width var(--t-slow) var(--ease), height var(--t-slow) var(--ease);
}
.dish::before {
  content: ""; position: absolute; inset: 3px;
  padding: 1.5px;
  border-radius: calc(var(--r-dish) - 4px);
  background: conic-gradient(from 200deg, transparent 0deg, rgba(255, 255, 255, 0.48) 50deg, rgba(255, 255, 255, 0.12) 110deg, transparent 150deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.dish-well {
  position: absolute; inset: var(--dish-pad);
  border-radius: var(--r-well);
  overflow: hidden;
  background: #0a0a0c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 4px rgba(0, 0, 0, 0.25);
  display: flex; align-items: center; justify-content: center;
  padding: 36px 20px 30px;
  isolation: isolate;
}
.dish-well.light-surface {
  background: #f1eee7;
}

.stage-note {
  position: absolute; left: 50%; top: 10px; z-index: 3;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(27, 27, 29, 0.88);
  border: 1px solid var(--hair);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  color: var(--text-2);
  font: 500 11px/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.plates-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  height: 100%;
}

.plate-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  min-width: 0;
  flex: 1 1 0;
}

.plate-frame {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 180ms var(--ease);
}
.plates-stage[data-view="compare"] .plate-frame {
  height: auto;
  width: min(100%, 360px);
  max-height: calc(100% - 36px);
}
.plate-frame.snap-flash {
  box-shadow: 0 0 0 2px var(--light);
}
.plate-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.plate-tag {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
}
.dish-well.light-surface .plate-tag,
.dish-well.light-surface .plate-sub {
  color: #6b665d;
}
.plate-sub {
  font: 500 10.5px/1.2 var(--mono);
  color: var(--text-3);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dish bottom-rim bar */
.dish-bar {
  position: absolute; left: 50%; bottom: 0; z-index: 4;
  transform: translate(-50%, 50%);
  display: flex; align-items: center; gap: 2px;
  height: 40px; padding: 0 6px;
  max-width: calc(100% - 36px);
  overflow-x: auto; scrollbar-width: none;
  background: var(--chrome);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.dish-bar::-webkit-scrollbar { display: none; }

.bg-swatches { display: inline-flex; align-items: center; gap: 5px; padding: 0 4px; }
.bg-swatch {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.bg-swatch:hover { transform: scale(1.1); }
.bg-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--chrome), 0 0 0 3.5px var(--text); }

.spectrum-canvas {
  width: 112px; height: 22px;
  border-radius: 999px;
  background: var(--chrome-sunk);
  border: 1px solid var(--hair);
  margin: 0 2px;
  flex: none;
}

/* ------------------------------------------------------------------ */
/* Floating pill top bar                                               */
/* ------------------------------------------------------------------ */

.topbar {
  position: fixed; z-index: 30;
  top: var(--top); left: 12px; right: 12px;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 2px;
  height: var(--bar-h);
  padding: 0 6px;
  background: var(--chrome);
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
}
.brand-pill { padding-left: 14px; }
.tools-pill { padding-left: 12px; padding-right: 5px; }
.brand { display: inline-flex; align-items: center; gap: 9px; padding-right: 4px; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, transparent 22%, rgba(245, 226, 191, 0.9) 26%, transparent 33%, transparent 52%, rgba(229, 198, 148, 0.85) 57%, transparent 64%),
    linear-gradient(135deg, #2b2722, #141312);
  box-shadow: inset 0 0 0 1px rgba(245, 226, 191, 0.38);
}
.brand-name { font-weight: 600; font-size: 13px; letter-spacing: -0.005em; white-space: nowrap; }
.pill-sep { width: 1px; height: 18px; background: var(--hair-strong); margin: 0 6px; flex: none; }
.pill-group { display: inline-flex; align-items: center; gap: 2px; }

.live-indicator { display: inline-flex; align-items: center; gap: 7px; max-width: 190px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.7; flex: none; }
.status-dot.live { background: var(--pass); opacity: 1; box-shadow: 0 0 8px rgba(125, 220, 151, 0.55); }
.status-label { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-meta { font: 500 11.5px var(--mono); color: var(--text-3); padding: 0 4px; white-space: nowrap; }

.export-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; margin-left: 6px; padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--light); color: var(--on-light);
  font-weight: 600; font-size: 13px;
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.export-btn:hover { background: #fff; }
.export-btn:active { transform: scale(0.97); }

/* Segmented controls */
.segmented {
  display: inline-flex; align-items: stretch; gap: 2px;
  padding: 3px;
  background: var(--fill);
  border-radius: 11px;
  width: 100%;
}
.seg {
  flex: 1;
  min-height: 28px; padding: 0 11px;
  border-radius: var(--r-chip);
  color: var(--text-2);
  font-size: 12.5px; font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.seg:hover { color: var(--text); }
.seg[aria-pressed="true"] { background: var(--light); color: var(--on-light); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }

#view-switch { width: auto; background: transparent; padding: 0; }
#view-switch .seg { min-height: 28px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12px; }
#view-switch .seg:hover:not([aria-pressed="true"]) { background: var(--fill); }

/* ------------------------------------------------------------------ */
/* Floating collapsible panels                                         */
/* ------------------------------------------------------------------ */

.panel {
  position: fixed; z-index: 20;
  top: var(--panel-top);
  height: max(50px, calc(100dvh - var(--panel-top) - 12px));
  display: flex; flex-direction: column;
  background: var(--chrome);
  border: 1px solid var(--hair);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: height var(--t-slow) var(--ease-in-out), opacity var(--t) var(--ease), transform var(--t-slow) var(--ease);
}
.panel-left { left: 12px; width: var(--lib-w); }
.panel-right { right: 12px; width: var(--par-w); }
.panel.collapsed { height: 50px !important; }

.panel-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 48px; padding: 0 10px 0 6px;
  user-select: none;
}
.panel-title {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 8px 0 10px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
}
.panel-title:hover { background: var(--fill); }
.panel-title .icon { width: 14px; height: 14px; color: var(--text-3); transition: transform var(--t) var(--ease); }
.panel.collapsed .panel-title .icon { transform: rotate(-90deg); }
.panel-actions { display: flex; align-items: center; gap: 4px; }
.panel-badge {
  font: 500 11px var(--mono);
  color: var(--text-3);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--fill);
}

.panel-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--hair);
  transition: opacity var(--t) var(--ease);
}
.panel.collapsed .panel-body { opacity: 0; pointer-events: none; }
.panel-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 2px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.panel-pad { padding: 12px 14px 4px; }

/* Audio panel elements */
.file-drop {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  background: var(--fill);
  border: 1px dashed var(--hair-strong);
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.file-drop:hover { background: var(--fill-hover); border-color: var(--accent-ring); }
.file-drop-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  background: var(--chrome-sunk);
  color: var(--text-2);
}
.file-drop-text { display: flex; flex-direction: column; min-width: 0; }
.file-drop-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-drop-sub { font-size: 11px; color: var(--text-3); }

.transport-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; margin-bottom: 8px;
}
.time-readout { font: 500 11.5px var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.scrub-track[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

.synth-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 6px; }
.hint-inline { font: 500 11.5px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }

.recipe-list { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.recipe {
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
  color: var(--text-2);
  transition: background-color var(--t-fast) var(--ease);
}
.recipe:hover { background: var(--fill); }
.recipe[aria-pressed="true"] { background: var(--fill-hover); color: var(--text); }
.recipe-thumb {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #26252a, #131316 85%);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.recipe-thumb svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.recipe[aria-pressed="true"] .recipe-thumb {
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--chrome), 0 0 0 3.5px var(--accent);
}
.recipe-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.recipe-name { font-size: 13px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.recipe:hover .recipe-name, .recipe[aria-pressed="true"] .recipe-name { color: var(--text); }
.recipe-summary { font: 500 11px/1.3 var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe[aria-pressed="true"] .recipe-summary { color: var(--text-2); }
.recipe-key { margin-left: auto; height: 18px; min-width: 18px; font-size: 10px; color: var(--text-3); opacity: 0; transition: opacity var(--t-fast); }
.recipe:hover .recipe-key, .recipe[aria-pressed="true"] .recipe-key { opacity: 1; }

.synth-sliders { padding-top: 6px; }
.mic-note { margin: 10px 0 12px; }

/* ------------------------------------------------------------------ */
/* Sections & tall rounded sliders (Glaaass / Sidekick signature)      */
/* ------------------------------------------------------------------ */

.section + .section { border-top: 1px solid var(--hair); }
.section-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px;
  text-align: left;
}
.section-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--t-fast);
}
.section-toggle .icon { width: 14px; height: 14px; color: var(--text-3); transition: transform var(--t) var(--ease); transform: rotate(-90deg); }
.section.open .section-toggle .icon { transform: none; }
.section-toggle:hover .section-title, .section-toggle:hover .icon { color: var(--text); }
.section-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--ease-in-out); }
.section.open .section-body { grid-template-rows: 1fr; }
.section-inner { min-height: 0; overflow: hidden; padding: 0 16px; opacity: 0; transition: opacity var(--t-fast) var(--ease), padding var(--t) var(--ease-in-out); }
.section.open .section-inner { opacity: 1; padding-bottom: 16px; }
.section-note { font-size: 12px; line-height: 1.45; color: var(--text-3); }

.ctl { position: relative; }
.ctl + .ctl { margin-top: 14px; }
.ctl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; margin-bottom: 7px; }
.ctl-label {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 14px; font-weight: 450; letter-spacing: -0.01em;
  color: var(--text);
  user-select: none;
  cursor: default;
}
.ctl-label-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.changed-dot {
  width: 5px; height: 5px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0; transform: scale(0.4);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.ctl.changed .changed-dot { opacity: 1; transform: none; }
.ctl.changed .ctl-label { cursor: pointer; }

.chip-value {
  display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px;
  height: 24px; min-width: 50px; padding: 0 8px;
  border-radius: var(--r-chip);
  background: var(--fill);
  font: 500 12px/24px var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.chip-unit { color: var(--text-3); font-size: 11px; }

.slider-track {
  --pad: 6px;
  --thumb-w: 6px;
  position: relative;
  height: 36px;
  border-radius: var(--r-ctl);
  background: var(--fill);
  cursor: ew-resize;
  touch-action: none;
  transition: background-color var(--t-fast);
}
.slider-track:hover, .ctl.dragging .slider-track { background: var(--fill-hover); }
.slider-fill {
  position: absolute; left: 3px; top: 3px; bottom: 3px;
  width: calc(var(--r) * (100% - 2 * var(--pad)) + var(--pad) - 3px + var(--thumb-w) / 2);
  border-radius: 9px;
  background: var(--track-fill);
  pointer-events: none;
}
.slider-thumb {
  position: absolute; top: 50%;
  left: calc(var(--pad) + var(--r) * (100% - 2 * var(--pad)) - var(--thumb-w) / 2);
  width: var(--thumb-w); height: 20px; margin-top: -10px;
  border-radius: 3px;
  background: var(--thumb);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: height var(--t-fast) var(--ease), margin var(--t-fast) var(--ease);
}
.slider-track:hover .slider-thumb, .ctl.dragging .slider-thumb { height: 24px; margin-top: -12px; }
.slider-default {
  position: absolute; top: 50%;
  left: calc(var(--pad) + var(--d) * (100% - 2 * var(--pad)) - 1px);
  width: 2px; height: 2px; margin-top: -1px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0;
  pointer-events: none;
}
.ctl.changed .slider-default { opacity: 0.9; }

.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--fill-active); transition: background-color var(--t) var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); transition: transform var(--t) var(--ease), background-color var(--t) var(--ease); }
.switch[aria-checked="true"] { background: var(--light); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(16px); background: var(--chrome); }

/* ------------------------------------------------------------------ */
/* Bottom floating dock: Snapped Tiles                                 */
/* ------------------------------------------------------------------ */

.panel-bottom {
  left: calc(12px + var(--lib-w) + 12px);
  right: calc(12px + var(--par-w) + 12px);
  top: auto;
  bottom: 12px;
  height: auto;
  max-width: 980px;
  margin: 0 auto;
}
.panel-bottom.collapsed { height: 50px !important; }
.panel-bottom .status-pill { margin-right: auto; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status-pill.info { background: var(--fill-active); color: var(--text-2); }
.status-pill.pass { background: var(--pass-soft); color: var(--pass); }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tiles-body { overflow: hidden; }
.tiles-strip {
  display: flex; align-items: stretch; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 10px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.tiles-empty {
  width: 100%;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

.tile-item {
  position: relative;
  flex: none;
  width: 112px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 5px;
  border-radius: 12px;
  background: var(--chrome-sunk);
  border: 1px solid var(--hair);
}
.tile-item img {
  display: block;
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 7px;
  object-fit: cover;
}
.tile-meta {
  display: flex; justify-content: space-between; gap: 4px;
  font: 500 10px var(--mono);
  color: var(--text-2);
  white-space: nowrap;
}
.tile-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-modes {
  font: 500 9.5px var(--mono);
  color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-remove {
  position: absolute; top: 7px; right: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(15, 15, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 11px; line-height: 1;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.tile-item:hover .tile-remove { opacity: 1; }

/* ------------------------------------------------------------------ */
/* Zen mode (chrome hidden), toast, drop overlay                       */
/* ------------------------------------------------------------------ */

body.chrome-off .panel,
body.chrome-off .topbar {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.chrome-hint {
  position: fixed; left: 50%; top: 16px; z-index: 40;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--chrome);
  border: 1px solid var(--hair-strong);
  box-shadow: var(--shadow);
  font-size: 12px; color: var(--text-2);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
body.chrome-off .chrome-hint { opacity: 0.9; }

.toast {
  position: fixed; left: 50%; top: 68px; z-index: 60;
  transform: translate(-50%, -8px);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--chrome-raised);
  border: 1px solid var(--hair-strong);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-size: 12.5px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.drop-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 15, 17, 0.84);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 150ms ease;
}
.drop-overlay.visible { opacity: 1; pointer-events: auto; }
.drop-overlay-card {
  padding: 28px 38px;
  border-radius: 22px;
  border: 1.5px dashed var(--accent);
  background: var(--chrome);
  box-shadow: var(--shadow-pop);
  text-align: center;
}
.drop-overlay-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.drop-overlay-sub { font-size: 12px; color: var(--text-2); }

@media (max-width: 1040px) {
  .panel-left { width: 220px; }
  .panel-right { width: 280px; }
  .panel-bottom { left: 244px; right: 304px; }
  .spectrum-canvas, .spec-sep { display: none; }
}
