:root{color-scheme:dark;--bg:#0c1017;--panel:#101922;--panel-raised:#192230;--line:#2a3545;--text:#edf1f8;--muted:#a6b3c7;--accent:#b5f17c;--accent-ink:#182312;--sky:#92d8fc;--cyan:#7bd8ca;--danger:#ffacaa;--green-line:#405651;--green-raised:#21312c;--sidebar:352px;--header-h:64px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);overflow:hidden}button,input,select,textarea{font:inherit}button{border:1px solid var(--line);background:var(--panel-raised);color:var(--text);padding:10px 12px;border-radius:8px;cursor:pointer;line-height:1.2;min-height:40px;transition:background .15s,border-color .15s,transform .15s}button:hover{background:var(--green-raised);border-color:var(--green-line)}button:active{transform:translateY(1px)}button:disabled{opacity:.45;cursor:default;transform:none}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:750}button.primary:hover{background:#c8f79b;border-color:#c8f79b}button.quiet{background:transparent}.full-width{width:100%}.icon-button{font-size:24px;line-height:1;width:42px;min-width:42px;padding:6px;display:inline-flex;align-items:center;justify-content:center}a{color:var(--accent);text-underline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:22px;letter-spacing:-.5px;font-weight:650}h2{font-size:23px;font-weight:600;letter-spacing:-.5px}h3{font-size:16px;font-weight:650}p{line-height:1.55}input[type=number],select,textarea,input[type=text],input[type=search]{background:#0c131d;color:var(--text);border:1px solid var(--line);border-radius:7px;padding:9px 10px;min-height:40px}select{width:100%;cursor:pointer}input[type=number]{font-variant-numeric:tabular-nums}input[type=number]::-webkit-inner-spin-button{opacity:.5}textarea{resize:vertical;width:100%;line-height:1.55;font-family:Consolas,"Cascadia Code",monospace;font-size:14px}input[type=range]{width:100%;accent-color:var(--accent);height:22px;cursor:pointer;margin:8px 0 0}input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:9px;background:#354a4e}input[type=range]::-webkit-slider-thumb{margin-top:-5px}input[type=range]::-moz-range-track{height:5px;border-radius:9px;background:#354a4e}input[type=range]::-moz-range-thumb{background:var(--accent);border:0}code{font-family:Consolas,"Cascadia Code",monospace;font-size:14px;color:#c9d6e2;overflow-wrap:anywhere}.small{font-size:14px}.muted{color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}
.app-header{height:var(--header-h);display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--line);background:#0e141d;gap:20px}.brand{display:flex;align-items:center;gap:12px}.header-actions{display:flex;gap:8px;align-items:center}.workspace{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);height:calc(100dvh - var(--header-h))}.sidebar{display:flex;flex-direction:column;background:var(--panel);border-right:1px solid var(--line);min-height:0;z-index:2}.tabs{display:flex;border-bottom:1px solid var(--line);flex-shrink:0;padding:4px 14px 0;gap:5px}.tab{width:33.333%;border:0;border-radius:0;background:transparent;padding:16px 4px;color:var(--muted);font-weight:600;position:relative}.tab.active{background:transparent;color:var(--accent)}.tab.active:after{content:"";height:2px;position:absolute;bottom:0;left:12px;right:12px;background:var(--accent)}.panel{padding:24px 20px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#405651 transparent;flex:1}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-heading h3{margin:0}.intro{margin:9px 0 18px;color:var(--muted);font-size:15px}.select-label{display:block;color:var(--muted);font-size:14px;margin:16px 0 8px}.explore-actions,.button-pair{display:flex;gap:8px}.explore-actions button,.button-pair button{flex:1;font-size:14px}.gallery{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.preset-card{position:relative;min-width:0}.preset-pick{display:block;padding:0;text-align:left;width:100%;overflow:hidden;background:#131a24;border:1px solid var(--line);border-radius:8px}.preset-pick:hover{background:#18212d;border-color:#5d7a6c}.preset-card.active .preset-pick{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.preset-picture{display:block;width:100%;height:84px;object-fit:cover;background:#080c12}.preset-fallback{display:block;width:100%;height:84px;opacity:.65;background:radial-gradient(ellipse at 20% 30%,var(--c1),transparent 65%),repeating-radial-gradient(ellipse at 80% 60%,transparent 0 6px,var(--c2) 7px 8px,transparent 9px 12px),#0a111a}.preset-title{display:block;font-size:15px;font-weight:550;padding:11px 10px 13px;line-height:1.3;min-height:52px}.preset-star{position:absolute;top:5px;right:5px;min-height:29px;width:30px;border:0;padding:2px;border-radius:6px;font-size:22px;background:#0b1119c9;color:#dde5ec;line-height:1}.preset-star.saved{color:var(--accent)}.empty-gallery{grid-column:1/-1;padding:30px 6px;color:var(--muted);font-size:15px;line-height:1.6}.gallery-tip{margin:18px 0}.sidebar-footer{padding:13px 18px;border-top:1px solid var(--line);color:var(--muted);font-size:14px;display:flex;gap:9px;align-items:center;flex-shrink:0}.status-light{width:6px;height:6px;border-radius:50%;background:var(--accent);flex-shrink:0}.control-section{padding:20px 0;border-top:1px solid var(--line);margin-top:17px}.control-section h3{margin-bottom:6px}.control-section p{margin:10px 0 14px}.range-control{margin:17px 0 21px}.range-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.range-heading label{font-size:15px}.range-heading input{width:86px;padding:6px 7px;font-size:14px;min-height:34px;text-align:right}.range-control .range-note{color:var(--muted);font-size:14px;margin-top:4px}.palette-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:14px}.palette-button{display:flex;align-items:center;gap:8px;font-size:14px;padding:9px}.palette-button.active{border-color:var(--accent);color:var(--accent)}.palette-swatch{display:inline-block;width:28px;min-width:28px;height:24px;border-radius:4px}.advanced{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.advanced summary{cursor:pointer;font-size:16px;padding:4px 0;user-select:none}.advanced[open] summary{margin-bottom:12px}.advanced p{margin:12px 0}.seed-row{display:flex;align-items:center;gap:8px;margin:18px 0}.seed-row label{font-size:15px}.seed-row input{width:140px;min-width:0;flex:1;font-size:14px}.seed-row button{font-size:14px}.error{color:var(--danger);border-left:2px solid var(--danger);padding:8px 0 8px 12px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:230px;overflow:auto;font-size:14px}.format-tag{font-size:14px;border:1px solid var(--line);padding:5px 7px;border-radius:5px;color:var(--muted)}.record-button{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:14px}.record-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#f18e84;flex-shrink:0}.record-button.recording{border-color:#e29585;color:#f7b9b1}.record-button.recording .record-dot,.recording-badge .record-dot{animation:pulse 1.3s infinite}@keyframes pulse{50%{opacity:.35}}
.stage{position:relative;overflow:hidden;min-width:0;min-height:0;background:#05080d}.stage canvas{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;touch-action:none;cursor:grab}.stage canvas:active{cursor:grabbing}.stage-heading{position:absolute;top:26px;left:30px;display:flex;gap:20px;align-items:center;pointer-events:none;max-width:calc(100% - 60px);text-shadow:0 2px 12px #000}.eyebrow{display:block;font-size:14px;color:#7bd8ca;letter-spacing:1.8px;text-transform:uppercase;margin-bottom:7px}.stage-heading h2{font-size:28px;color:#eef3f7;font-weight:450;letter-spacing:-.5px}.star-button{font-size:26px;border:0;background:#0b111975;pointer-events:auto;padding:6px 10px}.stage-toolbar{position:absolute;bottom:52px;left:26px;right:26px;display:flex;align-items:center;justify-content:space-between;gap:16px;pointer-events:none}.playback,.view-actions{display:flex;align-items:center;gap:4px;padding:5px;border:1px solid #ffffff35;background:#0d1726dc;backdrop-filter:blur(12px);border-radius:12px;pointer-events:auto;box-shadow:0 4px 20px #0003}.stage-toolbar button{background:transparent;border:0;font-size:14px;min-height:38px;padding:8px 10px;white-space:nowrap}.stage-toolbar button:hover{background:#21312c}.stage-toolbar .icon-button{font-size:25px;min-width:32px;width:32px}.stage-toolbar .play-button{color:var(--accent);min-width:66px;font-weight:600}.toolbar-divider{width:1px;height:24px;background:#3c4a5c;margin:0 4px}.stage-status{position:absolute;bottom:19px;left:30px;right:30px;display:flex;justify-content:space-between;gap:16px;color:#b9c6d2;font-size:14px;text-shadow:0 1px 6px #000;pointer-events:none}.restore-ui{position:absolute;right:22px;top:22px;background:#141d28b3;border-color:#5a6d8280;opacity:.3;transition:opacity .15s}.restore-ui:hover,.restore-ui:focus{opacity:1}.recording-badge{position:absolute;right:26px;top:26px;display:flex;align-items:center;gap:9px;background:#261a1ce6;border:1px solid #794443;border-radius:10px;padding:8px 12px;font-size:14px}.recording-badge button{min-height:30px;padding:5px 8px;font-size:14px;background:#4c292c}.fatal-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px;padding:40px;background:#0c1017f2;text-align:center}.fatal-overlay p{max-width:600px}.fatal-overlay h2{font-size:28px}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#d3f5ad;color:#182312;max-width:min(620px,90vw);padding:13px 22px;border-radius:10px;font-size:15px;box-shadow:0 6px 36px #0006;z-index:20;line-height:1.45}.toast.error-toast{background:#f6c7be;color:#3a201a}.ui-hidden .app-header,.ui-hidden .sidebar,.ui-hidden .stage-toolbar,.ui-hidden .stage-heading,.ui-hidden .stage-status{display:none}.ui-hidden .workspace{display:block;height:100dvh}.ui-hidden .stage{width:100%;height:100%}.ui-hidden .restore-ui{display:block}.ui-hidden .recording-badge{display:none}dialog{background:#131a24;border:2px solid var(--accent);color:var(--text);padding:28px;border-radius:15px;width:min(600px,94vw);max-height:90dvh;overflow:auto;box-shadow:0 24px 90px #0009}dialog::backdrop{background:#0009;backdrop-filter:blur(6px)}dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}dialog p{margin:18px 0;font-size:15px}dialog ol{padding-left:24px;line-height:1.9;font-size:15px}dialog h3{margin-top:24px}dialog .dialog-heading button{background:transparent;border:0}.shortcut-grid{display:grid;grid-template-columns:1fr auto;gap:12px;font-size:14px;border-block:1px solid var(--line);padding:20px 0;margin:18px 0}kbd{font:14px Consolas,monospace;padding:3px 7px;background:#0c131d;border:1px solid #405651;border-radius:4px;text-align:center}
@media (max-width:1200px){:root{--sidebar:324px}.app-header{padding-inline:18px}.panel{padding-inline:17px}.stage-toolbar{left:16px;right:16px;gap:8px}.stage-toolbar button{padding-inline:8px}.stage-toolbar #clear-trails{display:none}.stage-heading{left:24px}.stage-status{left:24px;right:24px}.stage-status #interaction-hint{max-width:170px}.preset-title{font-size:14px}.gallery{gap:10px}}
@media (max-width:860px){:root{--sidebar:298px}.header-actions{gap:4px}.stage-toolbar{flex-wrap:wrap;bottom:67px}.stage-toolbar .view-actions{display:none}.stage-status{flex-direction:column;gap:4px}.stage-status #interaction-hint{max-width:unset;font-size:14px}.stage-heading h2{font-size:24px}.panel{padding:20px 14px}.stage-heading{top:24px;left:22px}.recording-badge{top:auto;bottom:126px;right:16px}.gallery{gap:9px}.preset-picture,.preset-fallback{height:74px}}
@media (max-width:640px){body{overflow:hidden}.app-header{padding:0 12px}.workspace{display:flex;flex-direction:column-reverse;height:calc(100dvh - var(--header-h))}.stage{flex:0 0 46%;min-height:190px}.sidebar{flex:1;min-height:0;border-top:1px solid var(--line);border-right:0}.tabs{padding-top:0}.tab{padding:12px}.panel{padding:17px}.sidebar-footer{display:none}.gallery{grid-template-columns:repeat(3,1fr)}.stage-heading{top:14px;left:16px}.stage-heading h2{font-size:21px}.eyebrow{font-size:14px;margin-bottom:4px}.stage-heading .star-button{font-size:23px;padding:4px;min-height:32px}.stage-toolbar{bottom:34px;left:12px;right:12px}.stage-toolbar .playback{padding:2px;border-radius:8px}.stage-toolbar button{font-size:14px;padding:6px 9px;min-height:30px}.stage-toolbar .icon-button{font-size:22px;min-width:28px;width:28px}.stage-status{bottom:10px;left:16px;right:16px;flex-direction:row;font-size:14px}.stage-status #interaction-hint{display:none}.stage-status #render-status{font-size:14px}.recording-badge{top:12px;bottom:auto;right:12px;flex-wrap:wrap;max-width:150px}.preset-picture,.preset-fallback{height:68px}.preset-title{font-size:14px;min-height:48px}.control-section{margin-top:12px;padding-top:16px}.ui-hidden .stage{height:100dvh;min-height:unset}.stage-toolbar #clear-trails{display:block}.stage-heading{max-width:calc(100% - 32px)}}
@media (prefers-reduced-motion:reduce){button{transition:none}.record-dot{animation:none!important}}

#field-search{width:100%;margin-top:10px;font-size:14px}.preset-new{position:absolute;top:8px;left:8px;background:#182312e6;color:var(--accent);padding:3px 5px;border:1px solid #537a44;border-radius:4px;font-size:14px;font-weight:700;letter-spacing:.8px;pointer-events:none}
/* Automatically discovered field controls stay searchable in the sidebar. */
.parameter-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.parameter-heading h3 { margin: 0; }
#parameter-count { font-size: 14px; white-space: nowrap; color: var(--muted); }
#parameter-search { width: 100%; margin: 8px 0; font-size: 14px; }

/* v0.4.1: compact controls with readable values and distinct section colors. */
:root {
  --section-a: #152632;
  --section-b: #1b2d29;
  --section-a-line: var(--accent);
  --section-b-line: var(--accent);
}
.tabs { padding: 2px 10px 0; gap: 4px; }
.tab { padding: 12px 4px; }
.panel { padding: 12px 10px; }
.intro { margin: 6px 0 10px; line-height: 1.4; }
.section-heading { gap: 8px; }
.button-pair, .explore-actions { gap: 6px; }
.button-pair button, .explore-actions button { min-height: 34px; padding: 7px 8px; }
.sidebar-footer { padding: 8px 12px; }
#panel-shape > .control-group,
#panel-export > .control-group {
  margin-top: 8px;
  padding: 7px 6px;
  border: 2px solid var(--section-a-line);
  border-radius: 6px;
  background: var(--section-a);
}
#panel-shape > .section-b,
#panel-export > .section-b {
  border-color: var(--section-b-line);
  background: var(--section-b);
}
.control-section h3 { margin-bottom: 3px; }
.control-section p { margin: 6px 0 8px; line-height: 1.4; }
.range-control { margin: 8px 0 10px; min-width: 0; }
.range-control + .range-control { padding-top: 8px; border-top: 1px solid #a9b9cc1c; }
.range-control:last-child { margin-bottom: 1px; }
.range-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.range-heading > label { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.range-value { display: flex; align-items: center; gap: 4px; min-width: 0; }
.range-heading .range-value input {
  width: 74px;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 4px 5px;
  font-size: 14px;
}
.range-control .range-note { margin-top: 2px; font-size: 14px; line-height: 1.35; }
.range-control > input[type=range] { margin-top: 3px; }
.value-scale { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.value-scale .value-scale-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 2px;
  border: 1px solid #4b6b65;
  border-radius: 5px;
  background: #233b39;
  color: #d4f1e4;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.value-scale .value-scale-button:hover:not(:disabled) { background: #2d4b47; border-color: #74a397; }
.value-scale .value-scale-button:focus-visible { outline-offset: 2px; }
.parameter-heading { gap: 6px; flex-wrap: wrap; }
#parameter-search { margin: 6px 0 3px; min-height: 32px; padding: 5px 8px; }
.select-label { margin: 10px 0 5px; }
.palette-grid { margin-top: 8px; gap: 6px; }
.palette-button { min-height: 34px; padding: 5px 7px; }
.advanced summary { padding: 2px 0; }
.advanced[open] summary { margin-bottom: 6px; }
.advanced p { margin: 6px 0; line-height: 1.4; }
.seed-row { margin: 9px 0; gap: 6px; }
.seed-row input, .seed-row button { min-height: 32px; padding: 5px 7px; }
.seed-row input { width: 100px; }
.gallery { margin-top: 12px; gap: 9px; }
.gallery-tip { margin: 10px 0; }
.preset-title { padding: 8px; min-height: 44px; }
.preset-new { font-size: 14px; letter-spacing: .3px; padding: 2px 4px; }
@media (max-width: 860px) and (min-width: 641px) {
  .panel { padding-inline: 8px; }
  #panel-shape > .control-group, #panel-export > .control-group { padding: 8px; }
}
@media (max-width: 640px) {
  .panel { padding: 10px 8px; }
  .tab { padding: 10px 4px; }
}


/* v0.5.2 — JingPrism green. Tokens, lockup, segmented tabs, lime-outlined
   groups and slider cards, the olive modulation bar and the glowing starting
   box follow JingPrism and JingFractals. Field Studio keeps its own layout. */
.app-header{height:var(--header-h);background:#0e141d;border-bottom:1px solid var(--line);padding:0 12px 0 14px;gap:14px;justify-content:space-between}
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.brand-mark{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--sky));color:#142423;transform:rotate(-7deg)}
.brand-mark svg{width:29px;height:25px;color:inherit;fill:none;stroke:currentColor;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round}
.brand-text{min-width:0}
.brand-name{margin:0;font-size:22px;font-weight:750;letter-spacing:-.5px;line-height:1.1;color:var(--accent);white-space:nowrap}
.brand-sub{display:block;margin-top:3px;font-size:14px;letter-spacing:.7px;text-transform:uppercase;line-height:1.2;color:var(--muted);white-space:nowrap}
.header-actions{display:flex;align-items:center;gap:5px;margin-left:auto}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:15px;white-space:nowrap;font-variant-numeric:tabular-nums}
.header-action{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:5px 9px;border:1px solid var(--line);border-radius:5px;background:var(--panel-raised);color:var(--text);font-size:15px;line-height:1.2;text-decoration:none;white-space:nowrap}
.header-action:hover{background:var(--green-raised);border-color:var(--green-line)}
.header-action svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
a.header-action:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.sidebar{background:var(--panel)}
.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:6px 6px 0;padding:3px;border:2px solid var(--accent);border-radius:6px;background:#090f17}
.tab{width:auto;min-height:36px;padding:6px 4px;border:1px solid var(--green-line);border-radius:6px;background:var(--green-raised);color:var(--text);font-weight:600}
.tab:hover{background:#2a3d36;border-color:#5d7a6c}
.tab.active{background:#253427;color:var(--accent);border-color:var(--green-line)}
.tab.active:after{content:none}
.panel{padding:8px 6px 12px}

.start-box{padding:10px 10px 11px;border:3px solid var(--accent);border-radius:12px;background:linear-gradient(135deg,#3b5a20,#29401b 50%,#203217);box-shadow:0 0 16px #b5f17c66,inset 0 1px 0 #ffffff17}
.start-box h2{color:var(--accent);font-weight:800;font-size:22px}
.start-box .intro,.start-box .select-label,.start-box #preset-count{color:#d9e6cc}
.start-box select{background:#0f190c;border:2px solid var(--accent);border-radius:8px;color:#f4ffe6;font-weight:700}
.start-box input[type=search]{background:#0f190c;border-color:#7d9a52;color:#f4ffe6}
.start-box input[type=search]::placeholder{color:#b3c5a2}
button.secondary{background:#1c2a14;border-color:#7d9a52;color:#e8f6d4}
button.secondary:hover{background:#26391b;border-color:#9ab968}
button.secondary[aria-pressed=true]{background:#3d5629;border-color:var(--accent);color:#f1fcd6}

#panel-shape > .control-group h3,#panel-export > .control-group h3,.advanced summary{color:#d6e3ec}
.control-group .range-control{margin:6px 0;padding:5px 6px 6px;border:2px solid var(--accent);border-radius:5px;background:#14222c}
.control-group .range-control + .range-control{padding-top:5px;border-top:2px solid var(--accent)}
.range-heading .range-value input{background:#101c20;border-color:#506158}

.eyebrow{color:var(--accent);font-weight:650;letter-spacing:1.6px}
.stage-heading h2{font-weight:650}
#session-status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.format-tag{border-color:var(--green-line)}
dialog h2{color:var(--accent)}
.startup-panel{position:fixed;z-index:40;inset:28% 15% auto;max-width:620px;margin:auto;background:#131a24;border:2px solid var(--accent);border-radius:12px;padding:22px 24px;box-shadow:0 0 16px #b5f17c40,0 20px 80px #000a;line-height:1.6}
.startup-panel h2{font-size:24px;margin:0 0 8px;color:var(--accent)}.startup-panel p{margin:6px 0}
.noscript-panel{position:fixed;inset:0;z-index:50;background:var(--bg);padding:10vh 8vw;font-size:18px;line-height:1.6}
.noscript-panel h2{font-size:28px;margin-bottom:12px;color:var(--accent)}
.noscript-panel a,.startup-panel a{color:var(--sky)}
@media (max-width:1100px){.badge{display:none}}
@media (max-width:920px){.brand-sub{display:none}.brand-name{font-size:20px}}
@media (max-width:760px){.header-action{font-size:0;gap:0;width:38px;min-width:38px;justify-content:center;padding:5px}.header-action svg{width:20px;height:20px}}
@media (max-width:640px){:root{--header-h:56px}.app-header{padding:0 8px 0 10px;gap:8px}.brand{gap:9px}.brand-mark{width:32px;height:32px;border-radius:7px}.brand-mark svg{width:23px;height:20px}.brand-name{font-size:18px;letter-spacing:-.3px}.header-actions{gap:3px}.header-action{width:36px;min-width:36px;min-height:34px}.tabs{margin:5px 5px 0}.startup-panel{inset:16% 16px auto;padding:18px}}
@media (max-width:360px){.brand-mark{display:none}}

/* Readable modulation controls, scoped to preserve native base inputs. */
.pm-param{--pm:var(--cyan);--pm-dim:#426b68;--pm-warm:#e4bf8e;--pm-thumb-size:15px;position:relative}
.pm-param .range-heading{margin-bottom:6px}
.base-value-label{display:none;font-size:14px;color:var(--muted)}
.pm-live-value .base-value-label{display:inline}
.pm-toolbar{display:flex;align-items:center;gap:7px;min-height:34px;margin:5px 0 1px}
.pm-enable{font-size:15px;min-height:34px;height:34px;padding:4px 9px;border:1px solid #344347;border-radius:6px;color:#91b2aa;background:#182326}
.pm-enable::before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:#506360}
.pm-enable[aria-pressed=true]{border-color:#507c70;color:#b6f2df;background:#223b33}
.pm-enable[aria-pressed=true]::before{background:#9fe3bf;box-shadow:0 0 5px #96e7c24d}
.pm-current{font-size:15px;font-variant-numeric:tabular-nums;color:var(--pm);white-space:nowrap;min-width:47px}
.pm-expand{margin-left:auto;gap:7px;min-height:36px;height:auto;padding:5px 5px 5px 8px;font-size:14px;color:#a1bab9;max-width:180px;min-width:0;display:flex;justify-content:flex-end}
.pm-summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-chevron{font-size:19px;color:#9ab3ac;line-height:18px;transition:transform .15s}
.pm-expanded .pm-chevron{transform:rotate(180deg)}
.pm-range-wrap{position:relative;min-height:38px;display:flex;align-items:center;isolation:isolate;cursor:pointer;touch-action:none;user-select:none}
.pm-range-wrap>input[type=range]{position:relative;z-index:2;flex:1;margin:0;height:22px;touch-action:none;cursor:pointer}
.pm-range-visual{position:absolute;z-index:3;pointer-events:none;inset:5px calc(var(--pm-thumb-size)/2);height:28px;visibility:hidden;opacity:0;transition:opacity .15s}
.pm-visual-enabled{visibility:visible;opacity:1}
.pm-band{position:absolute;top:6px;height:16px;min-width:1px;background:#6bcbbd30;border-top:1px solid #7bd8caa0;border-bottom:1px solid #7bd8ca70;border-radius:3px;box-shadow:0 0 9px #6bcbbd14}
.pm-band::before,.pm-band::after{content:"";position:absolute;top:-3px;bottom:-3px;width:2px;background:#77cbbca8}
.pm-band::before{left:0}.pm-band::after{right:0}
.pm-band-shifted{border-top-color:#d6ac6d8c}
.pm-offset-marker{position:absolute;top:1px;height:26px;border-left:1px dashed #b6d89e99;transform:translateX(-.5px)}
.pm-live-marker{position:absolute;top:50%;height:var(--pm-thumb-size);width:var(--pm-thumb-size);border-radius:50%;background:var(--accent);border:2px solid #19352e;box-shadow:0 0 0 1px #adc58a,0 0 8px #c7dd9f40;transform:translate(-50%,-50%);z-index:3}
.pm-mod-locked .pm-current{color:#d4bf9a}
.pm-gesturing .pm-range-wrap,.pm-gesturing .pm-range-wrap>input{cursor:ew-resize}
.pm-gesturing .pm-range-wrap::after{content:attr(data-gesture-label);position:absolute;z-index:6;top:34px;left:50%;transform:translateX(-50%);background:#253f3c;border:1px solid #598e83;color:#d1f8e2;border-radius:5px;padding:6px 10px;font-size:14px;white-space:nowrap;box-shadow:0 3px 12px #0005;pointer-events:none}
.pm-panel{margin-top:7px;padding:10px;border:1px solid #3b5554;background:#111d22;border-radius:8px;box-shadow:inset 0 1px 0 #a7e3cd08}
.pm-panel[hidden]{display:none}
.pm-wave-row{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.pm-wave-row>label{font-size:15px;color:#b0c7c5;min-width:48px}
.pm-wave-select{min-width:0;flex:1;height:36px;padding:4px 9px!important;border:1px solid #405d5f!important;border-radius:5px;background:#152a2d!important;color:#c9eadd!important;font-size:14px!important}
.pm-wavebox{height:58px;border:1px solid #3b5554;border-radius:5px;overflow:hidden;background:linear-gradient(90deg,#21363c50 1px,transparent 1px),linear-gradient(#21363c50 1px,transparent 1px),#0b171c;background-size:25% 100%,100% 50%;margin-bottom:12px}
.pm-wavebox>svg{width:100%;height:100%;display:block;overflow:visible}
.pm-wave-base{stroke:#7b9c8270;stroke-width:.8;stroke-dasharray:3 4}
.pm-wave-offset{stroke:#b8d69285;stroke-width:.8;stroke-dasharray:1 3}
.pm-wave-path{fill:none;stroke:#87e1cc;stroke-width:2;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.pm-wave-head{stroke:#e2f4a7d0;stroke-width:1.5;vector-effect:non-scaling-stroke}
.pm-wave-dot{fill:#ebffd0;stroke:#152c2d;stroke-width:1}
.pm-wave-paused .pm-wave-head{stroke:#a0b8a570}.pm-wave-paused .pm-wave-dot{fill:#b7ccbb}
.pm-field{display:grid;grid-template-columns:58px minmax(25px,1fr) 64px 22px;align-items:center;gap:6px;min-height:36px;margin:3px 0}
.pm-field>label{font-size:14px;color:#b0c5cb;white-space:nowrap}
.pm-field input.pm-control-range{height:22px;margin:0;min-width:25px;accent-color:var(--cyan)}
.pm-field input.pm-control-range::-webkit-slider-thumb{width:13px;height:13px;border-radius:50%;background:#a4e2cb;border-color:#17352d;box-shadow:0 0 0 1px #74baa4}
.pm-field input.pm-control-range::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#a4e2cb;border:1px solid #74baa4}
.pm-field input.pm-control-number{width:100%;height:34px;min-height:34px;border:1px solid #3c565d;border-radius:5px;background:#0d1920;color:#d0e4e4;text-align:right;padding:4px 6px;font-size:14px;appearance:textfield;min-width:0}
.pm-control-number::-webkit-inner-spin-button{appearance:none}
.pm-unit{font-size:14px;color:#98afb7;text-align:left}
.pm-sync-speed>label::after{content:" ↗";color:#b4d590;font-size:14px}
.pm-halves{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.pm-field-compact{grid-template-columns:1fr 54px 20px;gap:5px;min-height:62px;align-content:center}
.pm-field-compact>label{font-size:14px}
.pm-field-compact>input.pm-control-range{grid-column:1/-1;grid-row:2;margin:8px 0 9px}
.pm-field-compact>.pm-control-number{height:32px;font-size:15px}
.pm-bottom{display:flex;align-items:center;gap:10px;margin-top:6px;padding-top:8px;flex-wrap:wrap;border-top:1px solid #30484c}
.pm-check{display:inline-flex;align-items:center;gap:5px;color:#b5c9ce;font-size:14px;white-space:nowrap;cursor:pointer;min-height:34px}
.pm-check>input{margin:0!important;width:16px!important;height:16px!important}
.pm-division{flex:1;min-width:0;height:35px;font-size:14px!important;padding:4px 6px!important;border:1px solid #3b555d!important;border-radius:5px;background:#142329!important;color:#cadcdd!important}
.pm-division:disabled{opacity:.45}
.pm-panel-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;min-height:20px;flex-wrap:wrap}
.pm-state{font-size:14px;color:#a2babe}.pm-clipped{font-size:14px;color:#d4b98c}
.pm-running .pm-state{color:#aadcc0}.pm-mod-locked .pm-state{color:#d4b98c}
.pm-panel button:focus-visible,.pm-panel input:focus-visible,.pm-panel select:focus-visible,.pm-toolbar button:focus-visible{outline-color:#90d8be;outline-offset:2px}
.pm-param .range-bounds{margin-top:1px;font-size:14px}.pm-param .pm-panel input[type=range]{opacity:1}
@media(max-width:600px){.pm-field:not(.pm-field-compact){grid-template-columns:58px minmax(25px,1fr) 64px 22px;gap:6px}.pm-halves{gap:9px}.pm-bottom{gap:10px}.pm-expand{max-width:175px}}

@media(max-width:380px){.pm-halves{grid-template-columns:1fr;gap:7px}.pm-field-compact{grid-template-columns:1fr 80px 24px}.pm-toolbar{flex-wrap:wrap}.pm-expand{min-width:0;max-width:100%}.pm-summary{white-space:normal;text-align:right}.pm-bottom{flex-wrap:wrap}.pm-division{flex:1;min-width:110px}}


/* The reference relied on global inline-flex button rules; keep these scoped. */
.pm-toolbar button{display:inline-flex;align-items:center;justify-content:center}
.pm-enable{gap:6px}
.pm-expand{justify-content:flex-end;flex:1}
.pm-param{min-width:0}
.pm-current{min-width:0;flex-shrink:0}
.pm-panel .pm-field input.pm-control-number{min-height:34px}
.pm-panel select{min-height:34px}
.pm-panel .pm-bottom .pm-division{width:auto;min-width:95px;max-width:100%}
.pm-disabled .pm-range-wrap{cursor:default}
.pm-disabled .pm-range-wrap>input{cursor:default}

/* Shared transport and settings; lane controls stay collapsed until opened. */
.modulation-master{margin:18px 0 0;padding:12px;border:1px solid #3b5550;border-radius:9px;background:#14201e}
.mod-master-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:10px}
.mod-master-heading h3{font-size:16px;margin:0}.mod-status{font-size:14px;color:#aebfb5;white-space:nowrap}.mod-status.running{color:#d5edaa}
.mod-transport{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mod-transport button{min-height:35px;font-size:14px;padding:7px 6px}
.mod-hint{font-size:14px;line-height:1.6;color:#aabeb4;margin:10px 0 0}.mod-hint b{font-weight:550;color:#dbe6df}
.mod-master-details{border-top:1px solid #34473e;margin-top:11px;padding-top:9px}.mod-master-details summary{cursor:pointer;font-size:15px;color:#dce5d7}
#mod-master-summary{display:block;font-size:14px;color:#aabcb0;margin:3px 0 0 17px}
.mod-global{display:grid;grid-template-columns:minmax(0,1fr) 69px 32px;align-items:center;gap:6px;margin-top:12px;font-size:14px}
.mod-global label{font-size:14px}.mod-global input[type=number]{width:69px;min-height:33px;padding:5px 6px;text-align:right;font-size:14px}.mod-global input[type=range]{grid-column:1/-1;margin:0;height:22px}
.mod-global>span{font-size:14px;color:var(--muted)}
.mod-master-help{margin:7px 0 10px}

/* The native input still edits the base. While modulation is active, its
   transparent thumb retains the hit geometry and the overlay shows the live
   value within the band, using the same half-thumb track inset. */
.pm-range-wrap>input[type=range]{appearance:none;background:transparent}
.pm-range-wrap>input[type=range]::-webkit-slider-thumb{appearance:none;box-sizing:border-box;width:var(--pm-thumb-size);height:var(--pm-thumb-size);border-radius:50%;background:var(--accent);border:2px solid #19352e;margin-top:-5px;box-shadow:0 0 0 1px #adc58a}
.pm-range-wrap>input[type=range]::-moz-range-thumb{box-sizing:border-box;width:var(--pm-thumb-size);height:var(--pm-thumb-size);border-radius:50%;background:var(--accent);border:2px solid #19352e;box-shadow:0 0 0 1px #adc58a}
.pm-live-value .pm-range-wrap>input[type=range]::-webkit-slider-thumb{opacity:0;background:transparent;border-color:transparent;box-shadow:none}
.pm-live-value .pm-range-wrap>input[type=range]::-moz-range-thumb{opacity:0;background:transparent;border-color:transparent;box-shadow:none}

/* Compact rows retain full-size labels, controls, and modulation hit targets. */
.pm-param .range-heading { margin-bottom: 3px; }
.range-heading .base-value-label { margin: 2px 0 0; font-size: 14px; line-height: 1.1; }
.pm-live-value .range-heading .base-value-label { display: block; }
.pm-toolbar { min-height: 30px; margin: 3px 0 0; gap: 5px; }
.pm-enable { min-height: 30px; height: 30px; padding: 3px 7px; }
.pm-expand { min-height: 30px; padding: 4px 5px; gap: 4px; font-size: 14px; }
.pm-range-wrap { min-height: 34px; }
.pm-range-visual { top: 3px; }
.pm-gesturing .pm-range-wrap::after { top: 31px; }
.pm-panel { margin-top: 4px; padding: 6px; border-radius: 6px; }
.pm-wave-row { margin-bottom: 5px; gap: 6px; }
.pm-wave-row > label { min-width: 44px; }
.pm-wave-select { height: 32px; min-height: 32px; }
.pm-wavebox { height: 44px; margin-bottom: 5px; }
.pm-panel .pm-field {
  display: grid;
  grid-template-columns: 50px minmax(28px, 1fr) auto;
  align-items: center;
  align-content: initial;
  gap: 3px;
  min-height: 34px;
  margin: 2px 0;
}
.pm-field > label { font-size: 14px; line-height: 1.2; white-space: normal; }
.pm-panel .pm-field > input.pm-control-range {
  grid-column: auto;
  grid-row: auto;
  min-width: 28px;
  width: 100%;
  height: 22px;
  margin: 0;
}
.pm-value-tools { display: flex; align-items: center; gap: 3px; min-width: 0; }
.pm-panel .pm-field .pm-value-tools input.pm-control-number {
  width: 56px;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 3px 4px;
  font-size: 14px;
}
.pm-value-tools .pm-unit { width: 18px; font-size: 14px; }
.pm-halves { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; }
.pm-bottom { gap: 6px; margin-top: 5px; padding-top: 5px; }
.pm-check { min-height: 30px; }
.pm-panel .pm-bottom .pm-division { height: 30px; min-height: 30px; min-width: 84px; }
.pm-panel-footer { margin-top: 5px; gap: 5px; min-height: 18px; }
.mod-master-heading { margin-bottom: 5px; gap: 6px; flex-wrap: wrap; }
.mod-global { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 6px; margin-top: 6px; }
.mod-global label { font-size: 15px; line-height: 1.25; }
.mod-global-value { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mod-global-value input[type=number] {
  width: 60px;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 4px 5px;
  font-size: 14px;
}
.mod-global-value > span { min-width: 15px; font-size: 14px; color: var(--muted); }
.mod-global input[type=range] { height: 22px; }
.mod-hint { margin-top: 6px; line-height: 1.35; }
.mod-master-help { margin: 4px 0 6px; }
.mod-transport { gap: 5px; }
.mod-transport button { min-height: 30px; padding: 5px 6px; font-size: 14px; }
.mod-master-details { margin-top: 6px; padding-top: 6px; }
#mod-master-summary { margin-top: 2px; }
@media (max-width: 860px) and (min-width: 641px), (max-width: 340px) {
  .pm-panel .pm-field { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .pm-panel .pm-field > input.pm-control-range { grid-column: 1 / -1; grid-row: 2; }
  .pm-value-tools { grid-column: 2; grid-row: 1; }
}

/* v0.5.2 — JingPrism green for modulation: the same Mod / Edit mod colors,
   the olive master bar with a lime edge, and the status pill. */
.pm-enable{background:#152521;border-color:#496247;color:#c0d3a9}
.pm-enable:hover{background:#1c2f29;border-color:#5f7f5b}
.pm-enable[aria-pressed=true]{background:#34462b;border-color:#8aa158;color:#e4f4bb}
.pm-enable[aria-pressed=true]:hover{background:#3d5232}
.pm-expand{background:#21312c;border:1px solid #405651;border-radius:6px;color:#c1d7ca}
.pm-expand:hover{background:#2a3d36;border-color:#5d7a6c}
.pm-band{background:#7bd8ca35;border-top-color:#9ee8d9;border-bottom-color:#78bfb3}
.pm-panel{background:#172a28;border-color:#486b5f;border-left:2px solid #6d927e}
.pm-wave-select{background:#10201c!important;border-color:#486b5f!important}
#panel-shape > .modulation-master{background:linear-gradient(90deg,#36501f,#2b3d1c 62%,#25331a);border:1px solid #6f8d44;border-left:4px solid var(--accent);border-radius:6px;color:#f1fbe3}
.modulation-master h3,.modulation-master .mod-master-details summary{color:#f1fbe3}
.modulation-master .mod-hint,.modulation-master #mod-master-summary,.modulation-master .mod-global-value>span{color:#d3e4bf}
.modulation-master .mod-hint b{color:#f1fbe3}
.modulation-master .mod-master-details{border-top-color:#557035}
.modulation-master input[type=number]{background:#0f190c;border-color:#6f8d44;color:#f4ffe6}
.modulation-master input[type=range]::-webkit-slider-runnable-track{background:#1c2a14}
.modulation-master input[type=range]::-moz-range-track{background:#1c2a14}
.mod-status{display:inline-flex;align-items:center;gap:6px;padding:1px 9px;border:1px solid #7d9150;border-radius:999px;background:#1d2815;color:#e3efcf;line-height:1.3}
.mod-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.5}
.mod-status.running,.mod-status[data-status=running]{color:#efffc4;background:#3b5528;border-color:#a6c66a}
.mod-status.running::before{opacity:1;animation:pulse 1.4s ease-in-out infinite}
.mod-status[data-status=paused]{color:#ffda9c;border-color:#8a7240}
#mod-play{background:#3d5629;border-color:#86a856;color:#f1fcd6;font-weight:650}
#mod-play:hover{background:#4a6831;border-color:#a4c86d}
.mod-transport button:not(#mod-play){background:#25331a;border-color:#6f8d44;color:#e8f6d4}
.mod-transport button:not(#mod-play):hover{background:#2f4221;border-color:#86a856}
@media (prefers-reduced-motion:reduce){.mod-status.running::before{animation:none}}
