:root {
  /* Colours matched to the plugin (mouseplugins-ui-pro Style.h). */
  --bg: #10161a;            /* backgroundTop */
  --bg-bottom: #050708;     /* backgroundBottom */
  --panel: #11161a;         /* metal panel base */
  --panel-2: #181d22;
  --line: #030506;          /* near-black panel edge */
  --text: #e7e9ee;
  --muted: #9aa0ad;
  --orange: #f67f2d;        /* plugin accent (color0) */
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.demo { max-width: 1040px; margin: 0 auto; padding: 28px 20px 48px; }

.brandbar { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); margin-bottom: 18px; opacity: .92; }
.brandbar:hover { opacity: 1; }
.brandbar span { font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.demo-head h1 { margin: 0; font-size: 40px; letter-spacing: 1px; font-weight: 800; }
.tagline { margin: 4px 0 0; color: var(--muted); }
.buy { background: var(--orange); color: #1a1206; font-weight: 700; text-decoration: none; padding: 11px 18px; border-radius: 10px; white-space: nowrap; }
.buy:hover { background: #ff8a3c; }

.transport { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.play { background: var(--orange); color: #1a1206; border: none; font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 10px; cursor: pointer; min-width: 120px; }
.play:hover { background: #ff8a3c; }
.play.playing { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }

.ab { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ab-btn { background: #14161d; color: var(--muted); border: none; padding: 10px 16px; font-weight: 800; letter-spacing: 1px; cursor: pointer; }
.ab-btn + .ab-btn { border-left: 1px solid var(--line); }
.ab-btn.on { background: var(--orange); color: #1a1206; }

.loopsel { display: flex; align-items: center; gap: 8px; }
.loopsel label { color: var(--muted); font-weight: 600; }
.loopsel select { background: #14161d; color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; }
.loop-note { color: var(--muted); font-size: 12px; font-style: italic; }
.status { margin-left: auto; color: var(--muted); font-size: 13px; }

.controls { display: flex; flex-wrap: wrap; gap: 14px; }
/* Metal panel matched to the plugin's drawMetalPanel (gradient + dark edge + bevel). */
.panel {
  background: linear-gradient(180deg, #1a2027 0%, var(--panel) 42%, #0f1317 78%, #0c1014 100%);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px 14px; flex: 1 1 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -14px 26px rgba(0,0,0,.30);
}
.panel-title { font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-align: center; margin-bottom: 10px; }
.panel-knobs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.knob-cell { display: flex; flex-direction: column; align-items: center; width: 84px; }
.knob { cursor: ns-resize; touch-action: none; user-select: none; }
.knob-label { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .4px; margin-top: 4px; text-align: center; line-height: 1.15; }
.knob-val { font-size: 12px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* segmented selector (saturation type) + toggle (hpf) */
.seg-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 120px; }
.seg { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: #14161d; color: var(--muted); border: none; padding: 8px 12px; font-weight: 700; font-size: 12px; cursor: pointer; }
.seg button + button { border-top: 1px solid var(--line); }
.seg button.on { background: var(--orange); color: #1a1206; }
.seg-label { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.hpf-btn { width: 74px; height: 34px; border-radius: 9px; background: linear-gradient(180deg,#1c1f29,#0f1117); border: 1px solid var(--line); color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: 1.5px; cursor: pointer; }
.hpf-btn.on { color: #1a1206; }

.apply-banner {
  margin: 0 0 16px; text-align: center; font-weight: 700; font-size: 13px;
  color: #1a1206; background: var(--orange); border-radius: 10px; padding: 9px 14px;
  animation: blink 1.05s ease-in-out infinite;
}
.apply-banner[hidden] { display: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }

input[type=range] { accent-color: var(--orange); }
.demo-foot { margin-top: 26px; color: var(--muted); font-size: 13px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.demo-foot .copyright { font-size: 12px; }
.demo-foot a { color: var(--orange); text-decoration: none; }
.demo-foot a:hover { text-decoration: underline; }

/* Embed mode: drop brand chrome, keep the trust note. */
.embed .brandbar, .embed .buy, .embed .demo-foot .copyright { display: none; }
.embed .demo { padding: 8px 16px 16px; }
