/*!
 * ZzArt Studio 2.4.0 — the Classic ZzArt studio; an updated homage to ZzArt.
 * Original ZzArt copyright Frank Force, 2019: https://github.com/KilledByAPixel/ZzArt
 * Complete editable JavaScript and styles are included in this file. This program is
 * free software under the GNU General Public License, version 2 (full text below),
 * and comes with ABSOLUTELY NO WARRANTY.
 *
 * Modification notice (GPL-2.0 section 2a): changed on 2026-11-17 and 2026-11-18,
 * from version 2.2.4 to 2.4.0, with upgrades shared across the sibling apps
 * JingPrism 1.5.22 and JingFractals 1.0.1.
 * - Classic ZzArt only: the 18 procedural starting styles, which belong to
 *   JingPrism, were removed with the style browser, and so were GLSL/ISF import and
 *   the source-notice scanner it needed. GLSL and ISF remain export formats. Projects
 *   and browser saves leave out JingPrism artworks with a note.
 * - Interface, from JingPrism 1.5.22: a New project button; a collapsible
 *   Modulation bar with its status and Run / Pause; Undo on the Undo button
 *   instead of popups; Journey Play from any tab; a Fade toggle on every Journey
 *   frame; the Artwork playhead drops its duplicate checkbox; readable slider
 *   values; two-row sliders and tighter rows; accent lines on panel boxes; a
 *   preview sized to the artwork; the stacked stylesheets merged into one;
 *   Ctrl+S saves from any field and Space keeps a focused button's own action;
 *   dragging, scrolling and double-clicking the picture reframe it in Journey
 *   preview too, as a live edit; a repeated notice shows once.
 * - Shader exports: GLSL sets the artwork values at run time, so other hosts draw
 *   exactly what the preview shows. Exports no longer embed an editing recipe.
 * - Performance, from JingFractals 1.0.1: one preview draw per display frame;
 *   slider rows repaint only while visible and write only changed values; Genome
 *   rows are kept when choosing a variation, undoing or recalling a Journey frame;
 *   the Journey list is built only while its tab is open and its position menus
 *   fill in when used; session saves run in idle time without copying the
 *   collection; variation batches yield in short slices. Playback paces evenly at
 *   up to 60 fps.
 * - ZzArt Studio: opens on a curated Classic program; Genome no longer lists the
 *   inactive shape slots; a "How ZzArt draws" help section; the credits name the
 *   original app and the smooth HSV and cosine palette sources; projects record
 *   appVersion; file names use the local date; browser saves use new keys, and
 *   2.2-2.3 saves are read once and never rewritten; a favicon.
 * Earlier changes on 2026-11-16 (2.2 to 2.2.4): upgraded from JingPrism 1.5.20;
 * Classic operands and discrete selectors use live uniforms; Classic instruction
 * choices and repetitions can be modulated, with capacity for 2048 values; live
 * Journey controls; graphics errors keep the last valid frame and offer Retry.
 * Project files remain schema version 2.
 *
 * This web edition splits the single-file app into index.html and these
 * readable assets. Full license: licenses/LICENSE.txt. Credits: credits.html.
 * Offline single-file edition: downloads/ZzArt-Studio-2.4.0.html
 */

:root{--bg:#0c1017;--panel:#131a24;--panel2:#192230;--border:#2a3545;--text:#edf1f8;--muted:#a6b3c7;--accent:#b5f17c;--accent2:#92d8fc;--danger:#ffacaa;--shadow:0 14px 44px #0005;--radius:16px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,input,select,textarea{outline-offset:3px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent2)}button{border:1px solid var(--border);color:var(--text);background:var(--panel2);display:inline-flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s,transform .15s}button:hover:not(:disabled){border-color:#6a7c94;background:#253245}button:active:not(:disabled){transform:translateY(1px)}input,select,textarea{background:#0c131d;border:1px solid var(--border);color:var(--text);min-width:0}select{width:100%;padding-right:20px}input[type=checkbox]{accent-color:var(--accent);width:23px;height:23px;flex-shrink:0}input[type=range]{appearance:none;background:transparent;border:0;padding:0;width:100%;cursor:pointer;accent-color:var(--accent)}input[type=range]::-webkit-slider-runnable-track{border-radius:5px;background:#39465a}input[type=range]::-webkit-slider-thumb{appearance:none;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px #b5f17c15}input[type=range]::-moz-range-track{border-radius:5px;background:#39465a}input[type=range]::-moz-range-thumb{border:0;border-radius:50%;background:var(--accent)}label{display:block}svg.icon{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.primary{background:var(--accent);border-color:var(--accent);color:#182312;font-weight:750}.primary:hover:not(:disabled){background:#c5ffa0;border-color:#c5ffa0}.secondary-accent{border-color:#537a44;color:var(--accent);background:#1d2b21}.ghost{background:transparent}.wide{width:100%}.row{display:flex;align-items:center}.row.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.muted{color:var(--muted)}.small{font-size:20px}.hidden,[hidden]{display:none!important}.divider{height:1px;background:var(--border);}.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid var(--border);border-radius:6px;font-size:20px;color:var(--muted);white-space:nowrap}.badge .dot{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.app-header{border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;background:#0e141d}.brand{display:flex;align-items:center;flex-shrink:0}.brand-mark{font-weight:900;line-height:1;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#142423;display:grid;place-items:center;transform:rotate(-7deg)}.brand-name{font-weight:750;letter-spacing:-.6px}.brand-sub{text-transform:uppercase;color:var(--muted)}.header-actions{display:flex;align-items:center;}.app-layout{display:grid;grid-template-columns:316px minmax(0,1fr);min-height:calc(100vh - 80px)}.sidebar{border-right:1px solid var(--border);min-width:0}.side-tabs{display:grid;border:1px solid var(--border);}.side-tab{flex-direction:column;gap:4px;border:0;background:transparent;border-radius:8px;color:var(--muted)}.side-tab[aria-selected=true]{color:var(--accent);background:#253427}.section-heading{letter-spacing:-.3px;font-weight:700}.intro{color:var(--muted);}.field>label,.field-label{font-weight:650;display:block;}.hint{font-size:20px;color:var(--dim);margin-top:6px;line-height:1.5}.seed-row input{width:100%;font-family:ui-monospace,monospace}.seed-row button{flex-shrink:0}.lock-grid{display:grid;grid-template-columns:repeat(3,1fr);}.lock-button{flex-direction:column;min-width:0}.lock-button[aria-pressed=true]{color:var(--accent);border-color:#79985a;background:#263420}.lock-button .lock-state{text-transform:uppercase;color:var(--dim)}.lock-button[aria-pressed=true] .lock-state{color:var(--accent)}.check-label{display:flex;align-items:center;color:var(--muted);cursor:pointer}.control{margin:15px 0}.control-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:3px}.control-head label{font-size:20px}.number-box{width:94px;padding:4px 6px;font-size:20px;text-align:right}.control .row{gap:8px}.range-limits{display:flex;justify-content:space-between;font-size:20px;color:var(--dim);margin-top:-2px}.subsection{font-size:20px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin:20px 0 6px}.palette-grid{display:grid;}.palette-button{display:block;border-radius:9px;overflow:hidden;}.palette-button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}.swatches{display:flex;overflow:hidden;border-radius:4px;}.swatches i{flex:1}.motion-toggle{border:1px solid var(--border);background:var(--panel2);display:flex;align-items:center;justify-content:space-between;gap:10px}.motion-toggle input{width:28px;height:28px}.motion-toggle label{font-weight:700}.side-footer{color:var(--dim);border-top:1px solid var(--border)}.side-footer a{color:var(--muted)}details{margin-top:18px}summary{font-size:20px;color:var(--muted);cursor:pointer;padding:5px 0}details[open] summary{margin-bottom:10px}.history-list{overflow:auto;display:flex;flex-direction:column;}.history-button{justify-content:flex-start;text-align:left;display:block;}.history-button.current{border-color:var(--accent);color:var(--accent)}.history-button span{display:block;color:var(--dim);}.empty-state{border:1px dashed var(--border);border-radius:12px;text-align:center;color:var(--muted);}.collection-list{display:flex;flex-direction:column;}.favorite-card{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--panel)}.favorite-open{border:0;padding:0;display:block;width:100%;background:transparent;text-align:left;border-radius:0}.favorite-open img{width:100%;height:115px;object-fit:cover;display:block}.favorite-name{display:block;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.favorite-foot{display:flex;justify-content:space-between;align-items:center;color:var(--dim);}.favorite-foot button{padding:5px;min-height:38px}.favorite-foot .icon{width:20px;height:20px}
.workspace{min-width:0;max-width:1800px;width:100%;margin:0 auto}.canvas-heading{display:flex;align-items:center;justify-content:space-between;}.art-title{font-weight:650;border:0;padding:4px 0;background:none;width:100%;max-width:520px}.art-title:hover{background:#ffffff05}.canvas-subtitle{font-size:20px;color:var(--muted);display:flex;align-items:center;gap:9px;min-height:20px}.viewer{position:relative;background:#05080d;border:1px solid #303e50;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);min-height:230px;display:grid;place-items:center}.viewer canvas{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;cursor:grab;touch-action:none}.viewer canvas:active{cursor:grabbing}.viewer-overlay{position:absolute;top:14px;left:14px;display:flex;gap:7px;pointer-events:none}.glass-pill{font-size:20px;background:#08101bc9;backdrop-filter:blur(8px);color:#e4ecf8;border:1px solid #ffffff24;border-radius:7px;}.viewer-tools{position:absolute;right:12px;bottom:12px;display:flex;gap:7px}.viewer-tools button{background:#0d1726dc;border-color:#ffffff35;backdrop-filter:blur(10px)}.viewer-tools button:hover{background:#253850}.viewer:fullscreen{width:100vw;height:100vh;border:0;border-radius:0}.viewer:fullscreen canvas{width:100%;height:100%;max-height:none;object-fit:contain}.viewer:fullscreen .viewer-overlay{top:24px;left:24px}.viewer:fullscreen .viewer-tools{right:24px;bottom:24px}.viewer-error{padding:32px;max-width:680px;color:var(--danger)}.viewer-error h2{color:var(--text)}.preview-info{justify-content:space-between;color:var(--dim);}.playback{display:flex;align-items:center;border:1px solid var(--border);}.playback button{padding:7px;min-width:43px;border:0;background:transparent}.playback .icon{width:23px;height:23px}.phase-label{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:20px;color:var(--muted);}.loop-label{font-size:20px;color:var(--muted);white-space:nowrap}.variants-heading{justify-content:space-between;}.variants-heading h2{margin:0}.variants-heading p{margin:2px 0 0;font-size:20px;color:var(--muted)}.variants-heading button{font-size:20px;padding:8px 12px}.variation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}.variant{display:block;padding:0;text-align:left;overflow:hidden;border-radius:11px;position:relative;background:var(--panel);min-width:0}.variant:hover:not(:disabled){border-color:var(--accent)}.variant canvas{width:100%;aspect-ratio:16/9;display:block;background:#172230;object-fit:cover}.variant-caption{color:var(--muted);display:flex;align-items:center;justify-content:space-between;}.variant-caption .arrow{opacity:0;color:var(--accent)}.variant:hover .arrow{opacity:1}.variant.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.variant.selected .variant-caption{color:var(--accent)}.variant.skeleton{min-height:130px;background:linear-gradient(120deg,#182230,#222e3e,#182230);background-size:200% 100%;animation:shimmer 1.8s linear infinite;border-color:var(--border)}@keyframes shimmer{to{background-position:-200% 0}}.grid-progress{height:3px;width:100%;border-radius:3px;background:#1b2838;margin-top:11px;overflow:hidden}.grid-progress>div{height:100%;background:var(--accent);width:0%;transition:width .15s}.status-line{font-size:20px;color:var(--dim);min-height:19px;}.busy-dot{display:inline-block;height:8px;width:8px;border-radius:50%;background:var(--accent);margin-right:6px;animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.3}}
dialog{color:var(--text);border:1px solid #405069;border-radius:18px;padding:0;max-width:min(620px,calc(100vw - 32px));width:620px;box-shadow:0 25px 100px #0009}dialog::backdrop{background:#030811c7;backdrop-filter:blur(6px)}.dialog-head{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-head h2{margin:0;letter-spacing:-.4px}.dialog-body{max-height:70vh;overflow:auto}.dialog-foot{border-top:1px solid var(--border);padding:16px 24px;display:flex;justify-content:flex-end;}.export-types{display:grid;}.export-type{flex-direction:column;}.export-type.active{color:var(--accent);border-color:var(--accent);background:#233223}.export-settings{display:grid;grid-template-columns:1fr 1fr;}.export-settings .field{margin-bottom:5px}.info-box{border:1px solid var(--border);border-radius:10px;color:var(--muted);}.export-progress{margin-top:18px}.export-progress progress{width:100%;height:10px;accent-color:var(--accent)}.shortcut-table{width:100%;border-collapse:collapse;}.shortcut-table td{border-bottom:1px solid var(--border)}.shortcut-table td:last-child{text-align:right;color:var(--muted)}kbd{font-family:inherit;border:1px solid #4d5a6c;border-bottom-width:2px;border-radius:5px;padding:2px 6px;font-size:20px;background:#222e3e}.help-step{display:flex;}.step-number{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:50%;background:#2b3c29;color:var(--accent);font-size:20px;font-weight:bold}.toast-region{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:10000;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:min(90vw,600px);pointer-events:none}.toast{background:#e7f2e1;color:#172313;padding:12px 18px;border-radius:11px;box-shadow:0 8px 35px #0006;font-size:20px;display:flex;align-items:center;gap:15px;pointer-events:auto}.toast.error{background:#f4d1d0;color:#351716}.toast button{color:inherit;border-color:currentColor;background:transparent;font-size:20px;padding:4px 8px}.storage-warning{font-size:20px;color:#f0cf91;line-height:1.5;border:1px solid #7c6335;border-radius:10px;background:#30281a}.noscript{padding:30px;color:#f2c0ad}.file-input{display:none}.code-preview{width:100%;min-height:260px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:20px;resize:vertical}.project-import-text{width:100%;min-height:100px;resize:vertical;font-size:20px}.quality-select{font-size:20px;padding:5px 9px}
@media(min-width:1600px){.sidebar{padding-left:26px;padding-right:26px}.workspace{padding-left:38px;padding-right:38px}.variation-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1100px){.app-layout{grid-template-columns:285px minmax(0,1fr)}.header-actions .button-label{display:none}.variation-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.brand-sub{display:none}.header-actions .badge{display:none}.app-layout{display:flex;flex-direction:column;}.sidebar{border-right:0;border-bottom:1px solid var(--border);order:1}.workspace{order:0;}.side-tab{flex-direction:row;}.tab-panel{max-width:560px;margin:0 auto}.viewer{min-height:160px}.canvas-heading .keep-label{display:none}.canvas-subtitle{font-size:20px}.variation-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:300px;overflow:auto}.variants-heading{margin-top:16px}.variants-heading p{font-size:20px}.preview-info .pan-hint{display:none}.side-footer{display:none}.collection-list{display:grid;grid-template-columns:1fr 1fr}.favorite-open img{height:100px}.workspace-mobile-controls{display:flex!important}.loop-label{display:none}.viewer-overlay{top:8px;left:8px}.glass-pill{font-size:20px}.viewer-tools{right:8px;bottom:8px}.viewer-tools button{width:43px;height:43px;padding:7px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.hint,.range-limits,.side-footer,.badge,.brand-sub,.side-tab,.lock-button,.lock-button .lock-state,.palette-button,.canvas-subtitle,.glass-pill,.preview-info,.phase-label,.loop-label,.variants-heading p,.variant-caption,.status-line,.history-button,.history-button span,.favorite-foot,.favorite-name,.quality-select{font-size:20px}.palette-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.palette-button{white-space:normal;}.variant-caption{font-size:20px}.history-list{max-height:330px}
.lock-button .lock-state,.variant-caption{font-size:20px}
@media(max-width:760px){.brand-name{letter-spacing:-.5px}.header-actions .icon-only{width:43px;height:45px;padding:6px}#exportBtn{padding:8px 10px}#exportBtn .icon{display:none}.variant-caption .arrow{display:none}.variant-caption{font-size:20px}}

/* ZzArt Studio 2.4.0: Classic ZzArt. */
.side-tab{font-size:20px;padding:9px 3px}
#favoriteBtn[aria-pressed=true]{background:#354b29;border-color:var(--accent)}#favoriteBtn[aria-pressed=true] .icon{fill:currentColor}
#mirrorControl{background:#18241e;border:1px solid #324638;border-radius:8px}
.preview-source{flex-shrink:0;padding:8px;font-size:20px}
.journey-list{display:flex;flex-direction:column;max-height:540px;overflow:auto}.journey-card{border:1px solid var(--border);border-radius:10px;background:var(--panel);overflow:hidden}.journey-card.active{border-color:var(--accent)}.journey-open{border:0;background:transparent;border-radius:0;width:100%;justify-content:flex-start;text-align:left;}.journey-open img{object-fit:cover;border-radius:5px}.journey-text{min-width:0;flex:1}.journey-text strong{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.journey-text span{display:block;font-size:20px;color:var(--muted)}.journey-tools{display:flex;}.journey-tools button{font-size:20px;min-height:38px}.journey-tools .icon{width:20px;height:20px}.genome-group{margin:16px 0}.genome-group>summary{font-size:20px;}.genome-note{font-size:20px;color:var(--muted);line-height:1.55}.genome-controls .number-box{width:113px}.genome-swatch{height:20px;border-radius:5px;border:1px solid var(--border)}
@media(max-width:400px){.preview-source{padding:6px;font-size:20px}.phase-label{font-size:20px}}
.genome-choice{max-width:55%;text-align:right;font-size:20px;color:var(--accent);overflow-wrap:anywhere}.genome-code{font:20px/1.6 ui-monospace,monospace;overflow-wrap:anywhere;background:#09111c;border:1px solid var(--border);border-radius:8px}.genome-color-preview{display:flex;align-items:center;}.genome-color-preview input{padding:3px}.genome-color-code{font-variant-numeric:tabular-nums}.genome-actions{flex-wrap:wrap;}.genome-group>summary{font-weight:650}.genome-instruction{border-left:2px solid var(--border);}.genome-control .number-box{max-width:128px}.genome-group .hint{font-size:20px}.genome-control[data-genome-key="seed"] .number-box{width:145px;max-width:45%}
/* Each desktop pane scrolls independently; long controls never move the preview. */
@media(min-width:761px){
 body{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden}
 
 .app-layout{flex:1 1 0;grid-template-rows:minmax(0,1fr);overflow:hidden}
 
}
/* All selectors are scoped to the kit root. Nothing styles the host body. */
.jing-modulation {--font:Inter,"Segoe UI",Arial,sans-serif;--accent:#dbef9b;--text:#e4e9ee;--muted:#b0bbc7;--teal:#7bd8ca;color-scheme:dark;color:var(--text);font:20px/1.45 var(--font);width:100%;min-width:0;}
.jing-modulation *, .jing-modulation *::before, .jing-modulation *::after {box-sizing:border-box;}
.jing-modulation [hidden] {display:none!important;}
.jing-modulation button, .jing-modulation input, .jing-modulation select {font:inherit;color:inherit;}
.jing-modulation button {cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:45px;padding:5px 9px;border:1px solid #405651;border-radius:6px;background:#21312c;}
.jing-modulation button:hover {background:#2f463b;border-color:#7baf90;}
.jing-modulation button:disabled {opacity:.4;cursor:default;}
.jing-modulation :focus-visible {outline:2px solid #dcef9b;outline-offset:3px;}
.jing-modulation input[type=number], .jing-modulation select {border:1px solid #506158;border-radius:5px;background:#101c20;min-height:34px;padding:4px 6px;min-width:0;}
.jing-modulation input[type=number] {appearance:textfield;text-align:right;width:90px;font-variant-numeric:tabular-nums;}
.jing-modulation input::-webkit-inner-spin-button {appearance:none;}
.jing-modulation input[type=range] {--value:50%;appearance:none;display:block;width:100%;min-width:0;border:0;border-radius:5px;margin:14px 0;cursor:pointer;background:linear-gradient(to right,#78cabb var(--value),#354a4e var(--value));touch-action:none;}
.jing-modulation input[type=range]::-webkit-slider-thumb {appearance:none;border-radius:50%;background:#dbef9b;border:3px solid #17201b;box-shadow:0 0 0 1px #bdd889;}
.jing-modulation input[type=range]::-moz-range-thumb {border:2px solid #17201b;background:#dbef9b;border-radius:50%;}
.jing-modulation input[type=checkbox] {width:23px;height:23px;accent-color:#dbef9b;}
.jing-modulation .jm-master {background:#212c20;border:1px solid #52653b;border-left:3px solid #788f49;border-radius:7px;padding:9px 11px;}
.jing-modulation .jm-heading {display:flex;align-items:center;gap:10px;min-height:28px;flex-wrap:wrap;}
.jing-modulation .jm-heading strong {font-size:21.25px;line-height:1.3;}
.jing-modulation .jm-heading output {margin-left:auto;color:#e0f0aa;font-variant-numeric:tabular-nums;}
.jing-modulation .jm-status {border:1px solid #64714b;border-radius:15px;font-size:20px;padding:1px 8px;}
.jing-modulation .jm-status[data-status=running] {color:#e2f6ab;background:#33452d;}
.jing-modulation .jm-status[data-status=paused] {color:#ffda9c;}
.jing-modulation .jm-master-field {margin-top:5px;}
.jing-modulation .jm-master-field>label {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:20px;color:#dfe9cf;}
.jing-modulation .jm-master-field>label>output {color:#e0f0aa;}
.jing-modulation .jm-master-row {display:flex;align-items:center;gap:9px;min-height:40px;}
.jing-modulation .jm-master-row input[type=range] {flex:1;background:linear-gradient(to right,#9ab968 var(--value),#3c4837 var(--value));}
.jing-modulation .jm-master-row input[type=number] {width:80px;}
.jing-modulation .jm-master-row>span {min-width:20px;font-size:20px;}
.jing-modulation .jm-transport {display:flex;gap:6px;margin-top:5px;}
.jing-modulation .jm-transport button {flex:1;font-size:20px;}
.jing-modulation .jm-primary {background:#dbef9b;color:#202a20;font-weight:600;border-color:#dbef9b;}
.jing-modulation .jm-primary:hover {background:#eaffb3;color:#202a20;}
.jing-modulation .jm-more {border-top:1px solid #4b5b39;margin-top:7px;}
.jing-modulation summary {cursor:pointer;min-height:34px;padding:5px 0;line-height:1.45;font-size:20px;}
.jing-modulation .jm-tempo {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:5px 0;font-size:20px;}
.jing-modulation .jm-tempo input {width:75px;}
.jing-modulation .jm-slew {background:#1b2b30;border:1px solid #3a535b;border-left:3px solid #659295;border-radius:6px;padding:7px 11px;margin:7px 0;}
.jing-modulation .jm-slew .jm-heading output {color:#b9e3dd;}
.jing-modulation .jm-gliding {font-size:20px;color:#7bd8ca;}
.jing-modulation .jm-curve {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:20px;}
.jing-modulation .jm-curve select {max-width:190px;}
.jing-modulation .jm-help {margin:0 0 7px;padding:0 10px;border:1px solid #3c525c;border-radius:6px;background:#17252f;}
.jing-modulation .jm-help p {font-size:20px;line-height:1.5;color:#bdcbd4;margin:3px 0 10px;}
.jing-modulation .jm-error, .jing-modulation .parameter-input-error {font-size:20px;color:#ffd2c6;background:#3c2826;padding:7px 9px;border-radius:6px;overflow-wrap:anywhere;}
.jing-modulation .jm-params {display:flex;flex-direction:column;gap:7px;}
.jing-modulation .param {min-width:0;padding:7px 9px 5px;border:1px solid #30544f;border-left:3px solid #3d8f80;border-radius:6px;background:#192e2d;}
.jing-modulation .param:nth-child(even) {background:#18292d;}
.jing-modulation .param-top {display:flex;align-items:center;gap:7px;min-height:34px;}
.jing-modulation .param-top>label {flex:1;min-width:0;font-size:20px;line-height:1.3;overflow-wrap:anywhere;}
.jing-modulation .param-top input[type=number] {width:90px;font-size:20px;}
.jing-modulation .param-lock, .jing-modulation .param-dice {width:40px;height:43px;min-height:43px;flex:none;padding:3px;font-size:22.5px;}
.jing-modulation .param-dice {color:#efc28d;border-color:#685338;background:#302a22;}
.jing-modulation .param-lock {background:transparent;border-color:transparent;}
.jing-modulation .param.locked {border-left-color:#b9c17e;}
.jing-modulation .param-lock[aria-pressed=true] {background:#39462c;}
.jing-modulation .range-bounds {display:flex;justify-content:space-between;gap:6px;color:#b0c7c3;font-size:20px;min-height:20px;font-variant-numeric:tabular-nums;}
.jing-modulation .range-bounds output {color:#c8eee0;font-size:20px;}

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

/* Compact overrides match the later Jing inspector without global styles. */
.jing-modulation .pm-toolbar {min-height:34px;margin-bottom:0;gap:7px;}
.jing-modulation .pm-enable {min-height:43px;height:43px;padding:4px 7px;font-size:20px;background:#152521;border-color:#496247;color:#c0d3a9;}
.jing-modulation .pm-enable[aria-pressed=true] {background:#34462b;border-color:#8aa158;color:#e4f4bb;}
.jing-modulation .pm-current {font-size:20px;min-width:37px;color:#bee9db;}
.jing-modulation .pm-expand {min-width:0;min-height:34px;max-width:230px;padding:4px 2px 4px 4px;font-size:20px;gap:4px;color:#c1d7ca;}
.jing-modulation .pm-param .param-top {margin-bottom:0;}
.jing-modulation .pm-range-wrap>input[type=range] {margin:14px 0;}
.jing-modulation .pm-band {background:#7bd8ca35;border-top-color:#9ee8d9;border-bottom-color:#78bfb3;}
.jing-modulation .pm-live-marker, .jing-modulation .pm-live-marker::before {background:#c8ffe9;}
.jing-modulation .pm-panel {margin-top:6px;padding:9px;border-color:#657b47;border-left:3px solid #93ad5b;background:#1a271e;border-radius:6px;}
.jing-modulation .pm-wave-row {gap:8px;margin-bottom:6px;}
.jing-modulation .pm-wavebox {height:64px;margin-bottom:6px;border-color:#526b4d;}
.jing-modulation .pm-field {min-height:36px;margin:2px 0;gap:7px;}
.jing-modulation .pm-field input.pm-control-number {height:43px;font-size:20px;padding:4px 5px;}
.jing-modulation .pm-randomize {font-size:20px;margin:0 0 8px;min-height:34px;background:#2c3c28;color:#e1edcd;}
.jing-modulation .pm-state, .jing-modulation .pm-unit {color:#bfcfb8;}
@media(max-width:460px){
.jing-modulation .param-top {gap:5px;}
.jing-modulation .param-top input[type=number] {width:78px;}
.jing-modulation .param {padding-left:7px;padding-right:7px;}
.jing-modulation .pm-expand {max-width:190px;}
.jing-modulation .jm-transport button {padding:5px;font-size:20px;}
}
@media(prefers-reduced-motion:reduce){.jing-modulation * {transition:none!important;}}
/* ZzArt Studio compact inspector, shared with JingPrism. Load after the host and modulation-kit styles.
   Density comes from spacing and shared rows; visible type stays at least 20px. */
:root{--dim:#a8b7c9;--prism-section-a:#152632;--prism-section-b:#1b2d29;--prism-section-c:#292331;--prism-section-d:#2a2c20;--prism-section-e:#30291f}
body{font-size:20px;line-height:1.4}
button,input,select,textarea{font-size:20px}
button{padding:3px 6px;gap:4px;border-radius:5px;line-height:1.2}
input,select,textarea{padding:3px 5px;border-radius:5px}
.app-header{height:56px;}
.brand-mark{width:40px;height:40px;font-size:27.5px;border-radius:8px}
.brand-name{font-size:26.25px;line-height:1.1}.brand-sub{font-size:20px;letter-spacing:.7px;line-height:1.2}
.header-actions button{font-size:20px;}
.icon-only{width:38px;height:35px;min-height:35px;padding:4px}
.sidebar{padding:6px;background:#101922}
.side-tabs{position:sticky;top:0;z-index:20;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;margin-bottom:5px;border-radius:6px;background:#090f17;}
.side-tabs .side-tab{flex-direction:row;gap:3px;padding:3px;min-height:28px;font-size:20px}
.side-tab .icon{width:20px;height:20px}
.section-heading{font-size:22.5px;margin:0 0 3px}
.intro{font-size:20px;line-height:1.35;margin:0 0 8px}
.field{margin-bottom:5px}
.field>label,.field-label{font-size:20px;line-height:1.3;margin-bottom:3px}
.sidebar .hint,.sidebar .range-limits,.sidebar .range-bounds{font-size:20px;line-height:1.3;margin-top:3px;color:#b2c2d2}
.sidebar .control{margin:3px 0;padding:3px 4px;border:1px solid #2c3d4b;border-left:3px solid #4b7278;border-radius:6px;min-width:0}
.sidebar .control-head{gap:4px;margin-bottom:0;min-height:28px;align-items:center}
.sidebar .control-head>label{flex:1;min-width:0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
.sidebar .control-head>.number-box{flex:none;width:95px;max-width:38%;min-height:35px;padding:3px 4px;font-size:20px}
.sidebar .control .row{gap:5px}
.sidebar .control>.hint{margin:2px 0 0}
.sidebar .range-limits{margin:0;min-height:18px;font-variant-numeric:tabular-nums}
.sidebar .subsection{font-size:20px;letter-spacing:.4px;margin:7px 0 3px}
.sidebar .divider{margin:6px 0}
.sidebar details{margin-top:4px}
.sidebar summary{font-size:20px;line-height:1.2;min-height:28px;padding:3px 0}
.sidebar details[open]>summary{margin-bottom:3px}
.sidebar .genome-group{margin:4px 0;padding:3px 4px;border:1px solid #30414f;border-radius:6px;}
.sidebar .genome-group:nth-of-type(even){background:var(--prism-section-b)}
.sidebar .genome-group>.genome-group{padding:2px 4px}
.sidebar .genome-group>.hint{margin:2px 0 5px}
.sidebar .genome-group>summary{font-size:20px;font-weight:650}
.sidebar .genome-group .genome-group{margin:4px 0}
.genome-controls .genome-control .number-box{width:95px}
.genome-control[data-genome-key=seed] .number-box{max-width:45%}
.genome-note,.genome-code,.genome-instruction{font-size:20px;line-height:1.35}
.genome-code{padding:6px}.genome-instruction{padding-left:7px}
.genome-actions{gap:5px;margin-top:6px}
.genome-color-preview{gap:7px}.genome-color-preview input{width:60px;height:35px}
.genome-color-code{font-size:20px}
.sidebar .genome-random-color{float:right;min-width:55px;min-height:35px;height:35px;padding:3px 7px;margin-left:6px;font-size:20px;line-height:1.2;border-color:#766244;background:#332d23;color:#f2d3a1}
.sidebar .genome-random-color:hover:not(:disabled){background:#4a3e2c;border-color:#b99b65}
.palette-grid{gap:4px}.palette-button{font-size:20px;min-height:53px;padding:3px;line-height:1.25}
.swatches{height:15px;margin-bottom:3px}
.lock-grid{gap:4px}.lock-button{font-size:20px;padding:4px 3px;gap:1px}
.lock-button .lock-state{font-size:20px;letter-spacing:.35px}
.motion-toggle{padding:4px 5px;border-radius:7px}.motion-toggle label{font-size:20px}
.check-label{font-size:20px;gap:6px}
#mirrorControl{padding:6px 7px;margin:5px 0 8px}
.side-footer{font-size:20px;line-height:1.4;padding-top:8px;margin-top:12px}
.side-footer .credits-link{border:0;background:transparent;border-radius:0;color:var(--muted);font-size:20px;padding:0;min-height:28px;text-decoration:underline;text-underline-offset:3px}
.history-list{gap:4px}.history-button{padding:6px;font-size:20px}.history-button span{font-size:20px}
.empty-state{font-size:20px;padding:8px 6px}
.collection-list{gap:7px;margin-top:8px}.favorite-name{font-size:20px;padding:6px 8px 3px}
.favorite-foot{font-size:20px;padding:0 6px 6px 8px}
.journey-actions{gap:4px;margin:5px 0 3px}.journey-actions button{font-size:20px;padding:3px 5px}
.journey-list{gap:4px;margin:5px 0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
/* Cards must overflow the capped list rather than shrink into clipped strips. */
.journey-list>.journey-card{flex:0 0 auto}
.journey-open{gap:7px;padding:6px}
.journey-text strong{font-size:20px}.journey-text span,.journey-tools button{font-size:20px}
.journey-tools{padding:0 5px 5px}

/* Both endpoints are scaled by the row's ×2 / ÷2 actions. */
.prism-range-buttons{display:inline-flex;align-items:center;gap:3px;flex:none;margin-left:1px}
.sidebar .prism-range-scale{min-width:35px;width:35px;min-height:35px;height:35px;padding:2px 1px;font-size:20px;line-height:1;background:#233b39;border-color:#4b6b65;color:#d4f1e4;flex:none}
.sidebar .prism-range-scale:hover:not(:disabled){background:#34514a;border-color:#8ab4a1}
.sidebar .prism-range-readout,.sidebar .prism-range-bounds{font-size:20px;font-variant-numeric:tabular-nums;color:#bdd2cd;line-height:1.2;min-height:18px}
.prism-range-bounds{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:0}
.prism-range-readout{overflow-wrap:anywhere}
.prism-range-limit{color:#ffd49c}

/* Reuse the kit's gesture surface, range band and inline editor unchanged. */
.sidebar.jing-modulation,.sidebar .jing-modulation{font:20px/1.35 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;--text:#edf1f8;--muted:#b8c9d4;--accent:#b5f17c}
.sidebar.jing-modulation button,.sidebar .jing-modulation button{min-height:35px;padding:3px 5px;font-size:20px;line-height:1.2}
.sidebar .jing-modulation input[type=number],.sidebar .jing-modulation select{min-height:28px;padding:3px 5px;font-size:20px}
.sidebar .pm-toolbar{min-height:28px;gap:5px;margin:0}
.sidebar .pm-enable{height:35px;min-height:35px;padding:3px 6px;font-size:20px}
.sidebar .pm-enable::before{width:7px;height:7px}
.sidebar .pm-current{font-size:20px;min-width:0;flex:none;font-variant-numeric:tabular-nums}
.sidebar .pm-current:empty{display:none}
.sidebar .pm-expand{min-width:0;min-height:28px;width:auto;max-width:100%;margin-left:0;padding:3px 3px 3px 5px;gap:3px;font-size:20px;flex:0 1 auto}
.sidebar .pm-summary{font-size:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.sidebar .pm-chevron{font-size:22.5px}
.sidebar .pm-range-wrap>input[type=range]{height:5px;margin:11px 0;flex:1;min-width:0;padding:0}
.sidebar .pm-range-wrap>input[type=range]::-webkit-slider-runnable-track,.prism-mod-master input[type=range]::-webkit-slider-runnable-track{background:transparent}
.sidebar .pm-range-wrap>input[type=range]::-moz-range-track,.prism-mod-master input[type=range]::-moz-range-track{background:transparent}
.sidebar .pm-range-visual{inset:1px 6px;}
.sidebar .pm-gesturing .pm-range-wrap::after{padding:4px 6px;font-size:20px}
.sidebar .pm-panel{margin-top:3px;padding:4px;border-radius:6px;border-left-width:2px;min-width:0}
.sidebar .pm-wave-row{gap:4px;margin-bottom:3px}
.sidebar .pm-wave-row>label{font-size:20px;min-width:40px}
.sidebar .pm-wave-select{height:35px;min-height:35px;padding:3px 5px!important;font-size:20px!important}
.sidebar .pm-wavebox{margin-bottom:3px}
.sidebar .pm-field{grid-template-columns:48px minmax(16px,1fr) 58px 19px;min-height:28px;gap:3px;margin:1px 0}
.sidebar .pm-field>label{font-size:20px}
.sidebar .pm-field input.pm-control-number{height:35px;min-height:35px;font-size:20px;padding:3px 4px}
.sidebar .pm-field input.pm-control-range{margin:9px 0;}
.sidebar .pm-field input.pm-control-range::-webkit-slider-runnable-track{background:transparent}
.sidebar .pm-field input.pm-control-range::-moz-range-track{background:transparent}
.sidebar .pm-unit,.sidebar .pm-state,.sidebar .pm-clipped{font-size:20px;line-height:1.25}
.sidebar .pm-halves{margin-top:1px}
.sidebar .pm-field-compact>label{font-size:20px}
.sidebar .pm-field-compact>input.pm-control-range{grid-column:1/-1;grid-row:2;margin:7px 0}
.sidebar .pm-bottom{gap:5px;margin-top:2px;padding-top:3px;flex-wrap:wrap}
.sidebar .pm-check{min-height:28px;font-size:20px;gap:4px}
.sidebar .pm-division{height:35px;min-height:35px;font-size:20px!important;padding:3px 4px!important;min-width:113px}
.sidebar .pm-panel-footer{margin-top:3px;min-height:18px;gap:5px}
.sidebar .pm-randomize{font-size:20px;min-height:28px;margin:0 0 4px}

/* A single shared master and slew block, visible above every tab's controls. */
.prism-mod-master{margin:0 0 7px;min-width:0}
.prism-mod-master .jm-master{padding:4px 5px;border-radius:6px;border-left-width:2px}
.prism-mod-master .jm-heading{gap:5px;min-height:27px}
.prism-mod-master .jm-heading strong{line-height:1.25}
.prism-mod-master .jm-heading output{font-size:20px;line-height:1.25}
.prism-mod-master .jm-status{font-size:20px;padding:1px 6px}
.prism-mod-master .jm-master-field{margin-top:3px}
.prism-mod-master .jm-master-field>label{font-size:20px;gap:5px;line-height:1.25}
.prism-mod-master .jm-master-row{gap:5px;min-height:28px}
.prism-mod-master .jm-master-row input[type=number]{width:72px;min-height:28px;font-size:20px;padding:3px 4px}
.prism-mod-master .jm-master-row input[type=range]{margin:10px 0;height:5px}
.prism-mod-master .jm-master-row>span{font-size:20px;min-width:18px}
.prism-mod-master .jm-range-controls{display:flex;align-items:center;gap:4px;min-height:28px}
.prism-mod-master .jm-range-controls input[type=number]{flex:none;width:72px;min-height:28px;margin-left:auto;font-size:20px;padding:3px 4px}
.prism-mod-master .jm-range-controls>span{flex:none;min-width:0;font-size:20px}
.prism-mod-master .jm-range-controls>.prism-range-scale{flex:none;white-space:nowrap}
.prism-mod-master .jm-range-row{min-height:25px;gap:0}
.prism-mod-master .prism-master-range-bounds{margin-top:-1px}
.prism-mod-master .jm-transport{gap:4px;margin-top:3px}
.prism-mod-master .jm-transport button{flex:0 0 auto;font-size:20px;min-height:35px;padding:3px 5px;white-space:nowrap}
.prism-mod-master .jm-transport [data-action=random]{min-width:40px;width:40px;background:#332d23;border-color:#766244;color:#f2d3a1}
.prism-mod-master .jm-more{margin-top:5px}
.prism-mod-master summary{font-size:20px;line-height:1.3;padding:4px 0;min-height:27px}
.prism-mod-master .jm-tempo{font-size:20px;margin:3px 0;gap:5px}
.prism-mod-master .jm-tempo input{width:68px}
.prism-mod-master .jm-slew{padding:3px 4px;margin:3px 0;border-radius:6px;border-left-width:2px}
.prism-mod-master .jm-gliding{font-size:20px}
.prism-mod-master .jm-curve{font-size:20px;gap:5px;min-height:28px}
.prism-mod-master .jm-curve select{min-height:28px;font-size:20px;padding:3px 4px}
.prism-mod-master .jm-help{padding:0 6px;margin:4px 0;border-radius:6px}
.prism-mod-master .jm-help p{font-size:20px;line-height:1.35;margin:2px 0 6px}
.prism-mod-master .jm-error,.sidebar .parameter-input-error{font-size:20px;line-height:1.35;padding:5px 6px;margin:4px 0}

/* The artwork and dialogs get the same readable, restrained spacing. */
.canvas-heading{gap:6px;margin-bottom:5px}.art-title{font-size:22.5px}
.canvas-subtitle,.preview-info,.phase-label,.loop-label,.glass-pill,.quality-select,.badge{font-size:20px}
.glass-pill{padding:3px 6px;}
.playback{gap:5px;padding:3px 5px;border-radius:6px;margin-top:2px}
.variants-heading{margin:8px 0 5px}.variants-heading h2{font-size:22.5px}
.variants-heading p,.variant-caption,.status-line{font-size:20px}
.variant-caption{padding:3px 5px}.variation-grid{gap:6px}.status-line{margin-top:4px}
.dialog-head,.dialog-foot{padding:8px 10px}.dialog-head h2{font-size:26.25px}
.dialog-body{padding:8px 10px}.dialog-foot{gap:6px}
.export-types{margin-bottom:7px;gap:4px}.export-type{font-size:20px;padding:4px 3px}
.export-settings{gap:6px}.info-box{font-size:20px;line-height:1.35;padding:5px 6px;margin-top:6px}
.shortcut-table{font-size:20px;margin:7px 0}.shortcut-table td{padding:6px 0}
.help-step{font-size:20px;margin:9px 0;gap:8px}.help-intro{font-size:20px;line-height:1.45}
kbd,.small,.toast button,.storage-warning,.code-preview,.project-import-text{font-size:20px}
.code-preview{line-height:1.4}.storage-warning{padding:7px;margin-bottom:7px}
@media(min-width:761px){
 .app-header{flex:0 0 56px}
 .app-layout{min-height:0}
 .sidebar{padding:6px;}
 .sidebar,.workspace{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
}
@media(max-width:760px){
 
 
 .brand-name{font-size:22.5px}.brand-mark{width:38px;height:40px;font-size:27.5px}
 .sidebar{padding:8px}
 .side-tabs{margin-bottom:5px}.side-tabs .side-tab{font-size:20px;min-height:28px;padding:3px}
 .canvas-subtitle,.variant-caption,.variants-heading p,.glass-pill{font-size:20px}
 .variation-grid{gap:5px}.export-type{font-size:20px}
 .dialog-head,.dialog-foot,.dialog-body{padding:7px 8px}
 .header-actions button{font-size:20px}
}
@media(max-width:340px){
 
 
 .sidebar .pm-field-compact>input.pm-control-range{grid-column:auto;grid-row:auto;margin:10px 0}
 .sidebar .control-head>.number-box{width:90px}
 .sidebar .prism-range-scale{width:37px;min-width:37px}
 .brand-name{font-size:21.25px}
}

/* Exact-duration exports keep timing and format controls in the same compact grid. */
.export-duration-row{display:flex;gap:5px;min-width:0}
.export-duration-row input{min-width:0;flex:1;width:0;font-variant-numeric:tabular-nums}
.export-duration-row button{flex:none;font-size:20px;padding:5px 7px}
.export-frame-total{font-size:20px;font-variant-numeric:tabular-nums;margin:3px 0;color:var(--accent)}
.export-frame-total span{font-size:20px;color:var(--muted)}
#exportDimensions{font-size:20px;line-height:1.4}

/* Journey editing stays compact and readable. */
.journey-tools{align-items:center;flex-wrap:wrap}
.journey-tools .journey-edit{margin-right:0}
.journey-tools .journey-drag{min-width:30px;padding:3px;font-size:23.75px;cursor:grab;touch-action:none}
.journey-tools .journey-drag:active{cursor:grabbing}
.journey-tools .journey-position{min-height:35px;padding:3px 4px;font-size:20px}
.journey-tools .journey-up,.journey-tools .journey-down{min-width:30px;padding:3px;font-size:21.25px}
.journey-tools .journey-delete{margin-left:auto;color:#ffb5b5;border-color:#694343;padding:4px 7px}
.journey-card.dragging{opacity:.5}
.journey-card.drop-before{box-shadow:inset 0 3px 0 var(--accent)}
.journey-card.drop-after{box-shadow:inset 0 -3px 0 var(--accent)}
.journey-save{display:flex;width:calc(100% - 10px);margin:0 5px 5px;min-height:28px;padding:5px 7px;font-size:20px;color:#dcf5e5;background:#243d35;border-color:#496c59}
.journey-save:hover:not(:disabled){background:#335444;border-color:#85b197}
.journey-slider-row{display:flex;align-items:center;gap:5px;min-width:0}
.journey-slider-row input[type=range]{flex:1;min-width:0;width:0}
.journey-transition-control .number-box{flex:none;width:80px;min-height:35px;padding:3px 4px;font-size:20px}
.sidebar .journey-transition-control .control-head .journey-value-controls{flex:none;gap:3px;margin-left:auto;white-space:nowrap}
.journey-value-actions{display:inline-flex;align-items:center}
.journey-curve-control input[type=range]{width:100%}

/* Live recording keeps its Stop action visible while the inspector remains usable. */
.live-recording-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;position:sticky;top:0;z-index:7;margin:5px 0;padding:5px 8px;border:1px solid #a94d57;background:#351b26;border-radius:7px;font-size:20px;font-variant-numeric:tabular-nums}
.live-recording-bar strong{color:#ffbdc4;font-size:20px}
.live-record-dot{width:10px;height:10px;border-radius:50%;background:#ff6a7b;flex:none}
.live-recording-bar button{font-size:20px;padding:5px 8px;min-height:35px;background:#612b36;border-color:#bd6775;color:#fff}
#liveRecordingInfo{font-size:20px;color:#f5c3cb}
.live-record-button{font-size:20px;min-height:35px;padding:4px 7px;white-space:nowrap}
.live-record-button.recording{color:#ffc1c9;border-color:#bc5a69;background:#42202b}
#liveAutoStopField{margin:2px 0 10px;font-size:20px}
#videoModeField select{width:100%}
@media(max-width:760px){.preview-info{flex-wrap:wrap}.live-recording-bar{gap:6px}#liveRecordingInfo{flex-basis:30%}}

.selection-slew-control{display:flex;align-items:center;gap:6px;padding:5px 7px;margin:0 0 7px;border:1px solid var(--border);border-radius:6px;font-size:20px}
.selection-slew-control label{font-size:20px;font-weight:600;white-space:nowrap}
.selection-slew-control input[type=range]{flex:1;min-width:70px;width:auto;margin:0}
.selection-slew-control .number-box{padding:4px 5px;font-size:20px;flex:none}
.selection-slew-range-buttons{display:flex;gap:3px;flex:none}
.selection-slew-range-buttons button{min-width:39px;min-height:35px;padding:3px;font-size:20px;background:#233b39;border-color:#4b6b65;color:#d4f1e4}
.variation-strength-range-buttons{display:flex;gap:3px;flex:none}
.variation-strength-range-buttons button{min-width:39px;min-height:35px;padding:3px;font-size:20px;background:#233b39;border-color:#4b6b65;color:#d4f1e4}
@media(max-width:560px){.selection-slew-control{flex-wrap:wrap}.selection-slew-control input[type=range]{order:2;flex-basis:100%;width:100%}.selection-slew-control .number-box{margin-left:auto}}.row.end{justify-content:flex-end}

/* Random actions reuse existing rows and keep labels and exact values readable. */
.prism-random,.sidebar .prism-random,.sidebar.jing-modulation .prism-random{flex:none;min-height:35px;height:35px;padding:3px 5px;font-size:20px;font-weight:600;line-height:1.2;letter-spacing:0;text-transform:none;background:#332d23;border:1px solid #766244;color:#f2d3a1;border-radius:5px;white-space:nowrap}
.prism-random:hover:not(:disabled),.sidebar .prism-random:hover:not(:disabled){background:#4a3e2c;border-color:#b99b65}
.prism-random:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.prism-random-all{height:35px;min-height:35px;padding:3px 6px}
.sidebar .genome-section-random{float:right;margin:0 0 0 5px}
.random-section-heading{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:28px}
.sidebar .random-section-heading{margin:7px 0 3px}
.sidebar .pm-toolbar>.prism-slider-random{margin-left:1px}
.sidebar .pm-field-has-random{grid-template-columns:48px minmax(16px,1fr) 58px 19px 40px;gap:3px}
.sidebar .pm-field-compact.pm-field-has-random>.prism-lane-random{justify-self:start}
.sidebar .pm-field-compact.pm-field-has-random>input.pm-control-range{grid-column:2/4;grid-row:2;min-width:0;width:100%;margin:10px 0}
.prism-mod-master .jm-master-row input[type=range]{flex:1;min-width:25px;width:0}
.prism-mod-master .jm-heading strong{flex:1;min-width:0;font-size:20px}
.prism-mod-master .jm-tempo>span{display:flex;align-items:center;gap:4px}
.sidebar .motion-toggle{gap:6px}.sidebar .motion-toggle>label{flex:1;min-width:0}
#strengthRandom{margin-left:4px}
.canvas-heading>.row{flex-wrap:wrap;justify-content:flex-end;gap:5px}
@media(max-width:560px){.canvas-heading{align-items:flex-start}.canvas-heading>.row{max-width:170px}.prism-random-all{padding:5px 7px}}


/* Small action pairs keep their own width instead of filling a panel row. */
.sidebar .pm-row-actions{justify-content:flex-start;align-items:center;gap:4px;margin:0 0 3px;flex-wrap:wrap}
.sidebar .pm-row-actions>button,.prism-mod-master .jm-transport>.prism-motion-random{flex:0 0 auto;width:auto;min-height:35px;height:35px;padding:3px 5px;white-space:nowrap;line-height:1.2}
.sidebar .pm-row-actions>.prism-motion-random,.prism-mod-master .jm-transport>.prism-motion-random{width:40px;min-width:40px}
.sidebar .pm-row-actions>.prism-motion-lock{width:35px;min-width:35px;padding:4px;gap:0}
.sidebar .prism-motion-lock .icon{width:20px;height:20px}
.sidebar .prism-motion-lock[aria-pressed=true]{color:#f2d3a1;border-color:#a08958;background:#3b3323}
.row{gap:6px}.divider{margin:8px 0}
.playback>button{min-width:35px;padding:4px}
.sidebar #resetMotionBtn{margin-top:7px!important}
.sidebar .random-section-heading{padding:2px 4px;border-left:3px solid #56758a;border-radius:3px;background:#192a35}

/* Muted section tones distinguish controls without reducing text contrast. */
.sidebar .genome-group{--section-tone:#152632;--section-border:#3b5566;--control-tone:#14222c;--control-alt-tone:#1c2e37;background:var(--section-tone);border-color:var(--section-border)}
.sidebar .genome-group:nth-of-type(5n+2){--section-tone:#1b2d29;--section-border:#42665c;--control-tone:#192823;--control-alt-tone:#22352e}
.sidebar .genome-group:nth-of-type(5n+3){--section-tone:#292331;--section-border:#63516b;--control-tone:#241f2c;--control-alt-tone:#302837}
.sidebar .genome-group:nth-of-type(5n+4){--section-tone:#2a2c20;--section-border:#626747;--control-tone:#25281e;--control-alt-tone:#303425}
.sidebar .genome-group:nth-of-type(5n+5){--section-tone:#30291f;--section-border:#716044;--control-tone:#29241c;--control-alt-tone:#352e23}
.sidebar .control{background:var(--control-tone,var(--prism-section-a));border-left-color:var(--section-border,#4e7187)}
.sidebar .control:nth-of-type(even){background:var(--control-alt-tone,var(--prism-section-b));border-left-color:var(--section-border,#537d6b)}
#compositionControls{--control-tone:#142631;--control-alt-tone:#1a303c;--section-border:#426980}
#colorControls{--control-tone:#292130;--control-alt-tone:#32293b;--section-border:#6a5375}
#panel-motion{--control-tone:#202c27;--control-alt-tone:#28352b;--section-border:#58745c}
#panel-journey{--control-tone:#282330;--control-alt-tone:#312a39;--section-border:#6b5677}
#panel-motion .motion-toggle{background:#243329;border-color:#526c58}
#panel-journey .random-section-heading{background:#2a2634;border-left-color:#75607f}
#panel-evolve .control{--control-tone:#2c271f;--section-border:#756341}
.sidebar .pm-panel{background:#172a28;border-color:#486b5f;border-left-color:#6d927e}
.sidebar .control:nth-of-type(even) .pm-panel{background:#222b33;border-color:#4b6578;border-left-color:#7294a9}
.prism-mod-master .jm-master{background:#252e22;border-color:#5b6d42;border-left-color:#899f5c}
.prism-mod-master .jm-slew{background:#2b2532;border-color:#685171;border-left-color:#93739a}
.prism-mod-master .jm-help{background:#192832;border-color:#3e5c6d}
.journey-card,.favorite-card{background:#182932}
.journey-card:nth-child(3n+2),.favorite-card:nth-child(3n+2){background:#252530}
.journey-card:nth-child(3n+3),.favorite-card:nth-child(3n+3){background:#243027}
.playback{background:#1b2831;border-color:#3a5364}
.selection-slew-control{background:#272832;border-color:#514b66}
.selection-slew-control.variation-strength-control{background:#1e302a;border-color:#466353}
.variant:nth-child(3n+2){background:#24232e}
.variant:nth-child(3n+3){background:#1e2c28}
dialog{background:#141e27}.dialog-head{background:#1c2a34}.dialog-foot{background:#222931}.info-box{background:#212833;border-color:#405367}
@media(max-width:340px){
 
 
 .sidebar .pm-field-compact.pm-field-has-random>input.pm-control-range{grid-column:2;grid-row:1;margin:9px 0}
 .sidebar .pm-field-compact.pm-field-has-random>.pm-control-number{grid-column:3;grid-row:1}
 .sidebar .pm-field-compact.pm-field-has-random>.pm-unit{grid-column:4;grid-row:1}
 
}
/* Compact shortcut beside the preview recording controls. */
.preview-actions{display:flex;align-items:center;gap:4px;flex:none}
.preview-actions .journey-quick-add{width:35px;min-width:35px;height:35px;min-height:35px;padding:0;gap:0;font-size:27.5px;font-weight:600;line-height:1}
/* Recallable Journey states share the space beside the variation heading. */
.variants-heading{display:grid;gap:6px;align-items:center}
.variants-title{min-width:0}
.variants-title h2{line-height:1.25}
.variants-title p{line-height:1.3}
.variants-heading>#rerollBtn{white-space:nowrap;min-height:30px;padding:5px 7px}
.journey-state-strip{display:flex;align-items:center;gap:4px;min-width:0;padding:3px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-padding:4px;scrollbar-width:thin;scrollbar-color:#607970 #111e25;background:#111e25;border:1px solid #334c51;border-radius:6px}
.journey-state-strip::-webkit-scrollbar{height:7px}
.journey-state-strip::-webkit-scrollbar-thumb{background:#607970;border-radius:4px}
.journey-state-strip::-webkit-scrollbar-track{background:#111e25}
.journey-state-card{position:relative;flex:0 0 96px;overflow:hidden;border:1px solid #465664;border-radius:5px;background:#17232e;cursor:grab;user-select:none}
.journey-state-card:hover{border-color:#92b3aa}
.journey-state-card.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.variants-heading .journey-state-open{display:block;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;cursor:grab;line-height:1}
.variants-heading .journey-state-open:active{cursor:grabbing;transform:none}
.variants-heading .journey-state-open:focus-visible{outline:2px solid var(--accent2);outline-offset:-3px}
.journey-state-canvas,.journey-state-open>img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
.journey-state-number{position:absolute;left:3px;bottom:3px;min-width:21px;padding:1px 3px;border-radius:3px;background:#09121de8;color:#edf1f8;font-size:20px;font-weight:600;line-height:1.25;font-variant-numeric:tabular-nums;pointer-events:none}
.journey-state-card.active .journey-state-number{background:#253f23ed;color:#d2ffab}
.variants-heading .journey-state-delete{position:absolute;top:2px;right:2px;display:grid;place-items:center;width:29px;min-width:29px;height:29px;min-height:29px;padding:0;gap:0;border:1px solid #a7b4be65;border-radius:4px;background:#101821e8;color:#f3d4d4;font-size:23.75px;font-weight:500;line-height:1;cursor:pointer}
.variants-heading .journey-state-delete:hover:not(:disabled){background:#6d2935;color:#fff;border-color:#f5a2ae}
.variants-heading .journey-state-delete .icon{width:20px;height:20px}
.journey-state-card.dragging{opacity:.45}
.journey-state-card.drag-before::before,.journey-state-card.drop-before::before,.journey-state-card.drag-after::after,.journey-state-card.drop-after::after{content:'';position:absolute;top:0;bottom:0;width:4px;background:var(--accent);z-index:3;pointer-events:none}
.journey-state-card.drag-before::before,.journey-state-card.drop-before::before{left:0}
.journey-state-card.drag-after::after,.journey-state-card.drop-after::after{right:0}
.journey-state-empty{margin:auto;padding:0 6px;color:var(--muted);font-size:20px;line-height:1.3;text-align:center}
.journey-card[draggable=true],.journey-card .journey-open[draggable=true]{cursor:grab;user-select:none}
.journey-card[draggable=true]:active,.journey-card .journey-open[draggable=true]:active{cursor:grabbing}
.journey-card .journey-open img{pointer-events:none;-webkit-user-drag:none}
.journey-list>.journey-card.drop-before{border-top-color:var(--accent);box-shadow:inset 0 3px 0 var(--accent)}
.journey-list>.journey-card.drop-after{border-bottom-color:var(--accent);box-shadow:inset 0 -3px 0 var(--accent)}
@media(max-width:560px),(min-width:761px) and (max-width:900px){
 .variants-heading{gap:4px 6px}
 .variants-title{grid-column:1;grid-row:1}
 .variants-heading>#rerollBtn{grid-column:2;grid-row:1}
 .journey-state-strip{grid-column:1/-1;grid-row:2;width:100%}
}

.journey-state-open>img[hidden],.journey-open>img[hidden]{display:none}
.side-tab.journey-drop-tab{border-color:var(--accent);background:#294030}
.shader-variation-section{margin-top:7px;min-width:0}
.shader-variation-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 4px;padding:3px 5px;border:1px solid #38545b;border-radius:5px;background:#162b31}
.shader-variation-heading h3{margin:0;font-size:20px;line-height:1.3;color:#bce9df}
.shader-variation-heading h3:focus-visible{outline:2px solid var(--accent2);outline-offset:2px;border-radius:2px}
.shader-variation-heading .badge{font-size:20px;padding:1px 4px;background:#203a40;border-color:#476a70}
.variant.detected-variant{background:#172b31;border-color:#3e5c63}
.variant.detected-variant .variant-caption{color:#c8e5e2}
.variant.detected-variant.selected{border-color:var(--accent)}
/* Keep 20px text readable inside the compact modulation editor. */
.sidebar .pm-field:not(.pm-field-compact){grid-template-columns:60px minmax(16px,1fr) 76px 24px}
.sidebar .pm-field.pm-field-has-random{grid-template-columns:60px minmax(16px,1fr) 76px 24px 44px}
.sidebar .pm-halves{grid-template-columns:1fr;gap:2px}
.sidebar .pm-field-compact{grid-template-columns:60px minmax(16px,1fr) 76px 24px;min-height:28px;gap:3px}
.sidebar .pm-field-compact.pm-field-has-random{grid-template-columns:60px minmax(16px,1fr) 76px 24px 44px;min-height:28px;gap:3px}
.sidebar .pm-field-compact>label{grid-column:1;grid-row:1}
.sidebar .pm-field-compact>input.pm-control-range,.sidebar .pm-field-compact.pm-field-has-random>input.pm-control-range{grid-column:2;grid-row:1;margin:9px 0}
.sidebar .pm-field-compact>.pm-control-number{grid-column:3;grid-row:1}
.sidebar .pm-field-compact>.pm-unit{grid-column:4;grid-row:1}
.sidebar .pm-field-compact.pm-field-has-random>.prism-lane-random{grid-column:5;grid-row:1}
.sidebar .pm-field input.pm-control-number,.sidebar .pm-wave-select,.sidebar .pm-division{line-height:1.2}
.prism-random,.sidebar .prism-random,.sidebar.jing-modulation .prism-random{min-width:55px}
.sidebar .pm-row-actions>.prism-motion-random,.prism-mod-master .jm-transport>.prism-motion-random,.prism-mod-master .jm-transport [data-action=random]{width:auto;min-width:44px}
@media(min-width:761px) and (max-width:1000px){
 .selection-slew-control{flex-wrap:wrap}
 .selection-slew-control input[type=range]{order:2;flex-basis:100%;width:100%}
 .selection-slew-control .number-box{margin-left:auto}
}
.export-license{margin:6px 0;padding:5px 6px;border:1px solid #466353;border-radius:6px;background:#192a26;font-size:20px;line-height:1.35;overflow-wrap:anywhere}
.export-license[data-level=notice]{border-color:#817043;background:#302b1e}
.export-license[data-level=warning]{border-color:#ba794b;background:#38271e}
.export-license-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.export-license p{margin:4px 0}.export-license ul{margin:4px 0;padding-left:20px}
.export-license details{margin-top:4px}.export-license summary{font-size:20px;line-height:1.3;padding:3px 0}
.export-license textarea{display:block;width:100%;min-height:132px;max-height:45vh;margin:4px 0;padding:5px 6px;font:20px/1.35 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;resize:vertical}
.export-license .row{flex-wrap:wrap;gap:4px}.export-license button{padding:3px 6px;min-height:35px;font-size:20px;line-height:1.2}
.export-license .badge{white-space:normal;font-size:20px;padding:1px 4px}
/* Larger content with the existing compact padding and gaps retained. */
button{min-height:35px}
input[type=range]{height:35px}
input[type=range]::-webkit-slider-runnable-track{height:6px}
input[type=range]::-moz-range-track{height:6px}
input[type=range]::-webkit-slider-thumb{width:20px;height:20px;margin-top:-7px;box-sizing:border-box}
input[type=range]::-moz-range-thumb{width:20px;height:20px;box-sizing:border-box}
.jing-modulation input[type=range]{height:6px}
.jing-modulation input[type=range]::-webkit-slider-thumb{width:23px;height:23px;margin-top:-8.5px;box-sizing:border-box}
.jing-modulation input[type=range]::-moz-range-thumb{width:23px;height:23px;box-sizing:border-box}
.sidebar .pm-range-wrap{min-height:35px}
.sidebar .pm-range-wrap>input[type=range],.prism-mod-master .jm-master-row input[type=range]{height:6px}
.sidebar .pm-range-wrap>input[type=range]::-webkit-slider-runnable-track,.prism-mod-master input[type=range]::-webkit-slider-runnable-track{height:6px}
.sidebar .pm-range-wrap>input[type=range]::-webkit-slider-thumb,.prism-mod-master input[type=range]::-webkit-slider-thumb{margin-top:-8.5px}
.sidebar .pm-range-wrap>input[type=range]::-moz-range-track,.prism-mod-master input[type=range]::-moz-range-track{height:6px}
.sidebar .pm-range-visual{height:34px}
.sidebar .pm-band{top:7px;height:20px}
.sidebar .pm-offset-marker{height:32px}
.sidebar .pm-live-marker{height:34px}
.sidebar .pm-gesturing .pm-range-wrap::after{top:35px}
.sidebar .pm-field input.pm-control-range{height:6px;min-width:24px}
.sidebar .pm-field input.pm-control-range::-webkit-slider-runnable-track{height:6px}
.sidebar .pm-field input.pm-control-range::-moz-range-track{height:6px}
.sidebar .pm-field input.pm-control-range::-webkit-slider-thumb{width:20px;height:20px;margin-top:-7px}
.sidebar .pm-field input.pm-control-range::-moz-range-thumb{width:20px;height:20px}
.sidebar .pm-wavebox{height:53px}
.sidebar .pm-field:not(.pm-field-compact),.sidebar .pm-field-compact{grid-template-columns:75px minmax(24px,1fr) 96px 30px;min-height:35px}
.sidebar .pm-field.pm-field-has-random,.sidebar .pm-field-compact.pm-field-has-random{grid-template-columns:75px minmax(24px,1fr) 96px 30px 55px;min-height:35px}
.sidebar .control-head>.number-box,.genome-controls .genome-control .number-box{width:96px}
.genome-control[data-genome-key=seed] .number-box{width:132px}
.sidebar .pm-chevron{line-height:24px}
.sidebar .range-limits,.sidebar .prism-range-readout,.sidebar .prism-range-bounds,.sidebar .pm-panel-footer{min-height:25px}
.sidebar .pm-toolbar,.prism-mod-master .jm-transport{flex-wrap:wrap}
.sidebar .pm-field input.pm-control-number,.sidebar .pm-wave-select,.sidebar .pm-division{min-height:35px;height:35px}
.prism-mod-master .jm-master-row input[type=number],.prism-mod-master .jm-range-controls input[type=number],.prism-mod-master .jm-tempo input{width:90px}
.prism-mod-master .jm-curve select{max-width:194px}
.side-tabs .side-tab{flex-wrap:wrap}
.selection-slew-control .number-box{width:96px;max-width:96px}
.preview-source{width:140px}
.quality-select{max-width:205px}
.preview-info,.playback{flex-wrap:wrap}
.playback input[type=range]{flex:1 1 120px;min-width:90px;width:auto}
.phase-label{min-width:92px}
.variants-heading{grid-template-columns:minmax(225px,290px) minmax(0,1fr) max-content}
.shader-variation-heading{flex-wrap:wrap}
.shader-variation-heading .badge{white-space:normal}
.journey-open img{width:85px;height:53px}
.export-types{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
.timeline{display:flex;align-items:center;flex-wrap:wrap;min-width:0;font-size:20px}
.timeline-play{flex:none;min-height:35px;min-width:35px;font-size:20px}
.timeline-slider{flex:1 1 120px;min-width:90px}
.timeline-label{font-size:20px;line-height:1.3;white-space:normal}
@media(min-width:761px){
 
 .app-layout{grid-template-columns:400px minmax(0,1fr)}
 .sidebar{scroll-padding-top:94px}
}
@media(max-width:760px){
 .app-header{height:auto;min-height:64px;flex-wrap:wrap}
 .app-layout{min-height:calc(100vh - 64px);min-height:calc(100dvh - 64px)}
}
@media(max-width:1120px){
 .selection-slew-control{flex-wrap:wrap}
 .selection-slew-control input[type=range]{order:2;flex-basis:100%;width:100%}
 .selection-slew-control .number-box{margin-left:auto}
}
@media(max-width:640px),(min-width:761px) and (max-width:1120px){
 .variants-heading{grid-template-columns:minmax(0,1fr) max-content}
 .variants-title{grid-column:1;grid-row:1}
 .variants-heading>#rerollBtn{grid-column:2;grid-row:1}
 .journey-state-strip{grid-column:1/-1;grid-row:2;width:100%}
}
@media(max-width:460px){
 .variants-heading{grid-template-columns:minmax(0,1fr)}
 .variants-title{grid-column:1;grid-row:1}
 .variants-heading>#rerollBtn{grid-column:1;grid-row:2;justify-self:start}
 .journey-state-strip{grid-column:1;grid-row:3}
}
@media(max-width:380px){
 .sidebar .pm-field:not(.pm-field-compact),.sidebar .pm-field.pm-field-has-random,.sidebar .pm-field-compact,.sidebar .pm-field-compact.pm-field-has-random{grid-template-columns:minmax(0,1fr) 96px 30px 55px}
 .sidebar .pm-field>label,.sidebar .pm-field-compact>label{grid-column:1;grid-row:1}
 .sidebar .pm-field>.pm-control-number,.sidebar .pm-field-compact>.pm-control-number,.sidebar .pm-field-compact.pm-field-has-random>.pm-control-number{grid-column:2;grid-row:1}
 .sidebar .pm-field>.pm-unit,.sidebar .pm-field-compact>.pm-unit,.sidebar .pm-field-compact.pm-field-has-random>.pm-unit{grid-column:3;grid-row:1}
 .sidebar .pm-field>.prism-lane-random,.sidebar .pm-field-compact.pm-field-has-random>.prism-lane-random{grid-column:4;grid-row:1}
 .sidebar .pm-field input.pm-control-range,.sidebar .pm-field-compact>input.pm-control-range,.sidebar .pm-field-compact.pm-field-has-random>input.pm-control-range{grid-column:1/-1;grid-row:2;width:100%}
}
.artwork-motion-timeline{background:#202d29;border-color:#46634e}
.artwork-motion-timeline input[type=range]{min-width:80px}
@media(max-width:1000px){.artwork-motion-timeline{flex-wrap:wrap}.artwork-motion-timeline input[type=range]{flex:1 1 120px}.artwork-motion-timeline .phase-label{white-space:nowrap}}
.auto-random-section{border:1px solid #586345;border-radius:5px;background:#283022;margin-top:4px}
.auto-random-section>.control-head{display:flex;align-items:center;justify-content:space-between;gap:4px}
.auto-random-toggle{font-size:20px;font-weight:600}.auto-random-toggle[aria-pressed=true]{background:#435b31;border-color:#aad76f}
.auto-power-control .control-head{flex-wrap:wrap}.auto-power-control input[type=number]{width:96px;font-size:20px}
/* Fixed Journey and Artwork playheads, with readable controls and less padding. */
.workspace{padding:6px;container-name:artwork-workspace;container-type:inline-size}
.app-header{padding:4px 6px;gap:6px}
.brand{gap:6px;min-width:0}
.header-actions{gap:3px;min-width:0}
.header-actions button{padding:2px 4px;gap:4px;white-space:nowrap}
.header-actions .badge{padding:2px 5px}
.preview-info{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);align-items:center;gap:4px;padding:2px 0;font-size:20px}
.preview-source-group{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap;color:var(--muted);line-height:1.2}
.preview-info .preview-source{min-height:35px;height:35px;margin:0;padding:2px 20px 2px 4px;font-size:20px;line-height:1.2}
.preview-info .preview-actions{display:flex;align-items:center;gap:3px;min-width:0;margin:0}
.preview-info .preview-actions button{min-height:35px;height:35px;padding:2px 4px;gap:4px;font-size:20px;line-height:1.2;white-space:nowrap}
.preview-info .preview-actions .journey-quick-add{width:35px;min-width:35px;padding:0;font-size:27.5px}
.preview-info .quality-select{justify-self:end;width:205px;max-width:100%;min-height:35px;height:35px;margin:0;padding:2px 20px 2px 4px;font-size:20px;line-height:1.2}
.workspace>.playback{display:grid;grid-template-columns:114px 35px minmax(80px,1fr) max-content max-content 35px;align-items:center;gap:4px;padding:2px 4px;margin-top:2px;border-radius:5px;min-width:0}
.workspace>.playback .playhead-label{font-size:20px;font-weight:600;line-height:1.2;white-space:nowrap}
.workspace>.playback>button{width:35px;min-width:35px;min-height:35px;height:35px;padding:2px;gap:0}
.workspace>.playback>input[type=range]{width:100%;min-width:0;height:35px;margin:0}
.workspace>.playback .phase-label{min-width:0;font-size:20px;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.workspace>.playback .loop-label{display:block;font-size:20px;line-height:1.2;white-space:nowrap}
@media(min-width:761px){.app-header{height:62px;flex-basis:62px}}
@media(max-width:1120px){.app-header .brand-sub{display:none}}
@container artwork-workspace (max-width:820px){
 .workspace>.playback{grid-template-columns:114px 35px minmax(80px,1fr) max-content 35px}
 .workspace>.playback .loop-label{display:none}
}
@container artwork-workspace (max-width:600px){
 .preview-info{grid-template-columns:minmax(0,1fr) max-content}
 .preview-source-group{grid-column:1;grid-row:1}
 .preview-info .quality-select{grid-column:2;grid-row:1}
 .preview-info .preview-actions{grid-column:1/-1;grid-row:2;justify-self:end}
}
@container artwork-workspace (max-width:430px){
 .preview-source-group>span{display:none}
 .workspace>.playback{grid-template-columns:35px minmax(0,1fr) max-content 35px;row-gap:0}
 .workspace>.playback .playhead-label{grid-column:1/3;grid-row:1}
 .workspace>.playback .phase-label{grid-column:3/5;grid-row:1;justify-self:end}
 .workspace>.playback>button:first-of-type{grid-column:1;grid-row:2}
 .workspace>.playback>input[type=range]{grid-column:2/4;grid-row:2}
 .workspace>.playback>button:last-of-type{grid-column:4;grid-row:2}
}
@container artwork-workspace (max-width:340px){
 .preview-info{grid-template-columns:minmax(0,1fr)}
 .preview-source-group{grid-column:1;grid-row:1}
 .preview-info .quality-select{grid-column:1;grid-row:2}
 .preview-info .preview-actions{grid-column:1;grid-row:3}
}
/* One compact slider card layout; section randomizers stay visible. */
.sidebar .prism-slider-box{
 margin:3px 0;padding:3px 4px;min-width:0;border:1px solid #2c3d4b;border-left:2px solid var(--section-border,#4e7187);border-radius:5px;
 background:var(--control-tone,var(--prism-section-a))
}
.sidebar .prism-slider-box:nth-of-type(even){background:var(--control-alt-tone,var(--prism-section-b))}
.sidebar .prism-slider-box>.control-head{display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-height:35px;margin:0}
.sidebar .prism-slider-box>.control-head>label{flex:1 1 90px;min-width:0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
.prism-value-controls{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:3px;flex:0 0 auto;min-width:0;max-width:100%;margin-left:auto;white-space:nowrap}
.sidebar .prism-value-controls>.row{display:inline-flex;align-items:center;gap:3px;flex:none}
.sidebar .prism-value-controls input[type=number]{width:84px;min-width:76px;max-width:none;flex:0 0 84px;height:35px;min-height:35px;margin:0;padding:3px 4px;font-size:20px;line-height:1.2;text-align:right;font-variant-numeric:tabular-nums;border-radius:5px}
.sidebar .prism-value-controls>.prism-range-buttons{display:inline-flex;align-items:center;gap:3px;margin:0;flex:none}
.sidebar .prism-value-controls .prism-range-scale{width:35px;height:35px;min-height:35px;padding:2px 1px;font-size:20px;line-height:1;flex:none}
.sidebar .prism-value-controls>span{font-size:20px;line-height:1.2}
.sidebar .prism-slider-box[data-genome-key=seed] .prism-value-controls input[type=number]{width:126px;flex-basis:126px}
.sidebar .prism-slider-box>.pm-toolbar{gap:4px;min-height:35px;margin:0;padding:0}
.sidebar .prism-slider-box>.pm-range-wrap,.sidebar .prism-slider-box>.journey-slider-row{min-height:35px}
.sidebar .prism-slider-box>input[type=range],.sidebar .prism-slider-box>.journey-slider-row>input[type=range]{display:block;height:6px;min-width:0;width:100%;margin:14px 0;padding:0}
.sidebar .prism-slider-box>.prism-range-bounds,.sidebar .prism-slider-box>.range-limits{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:25px;margin:0;font-size:20px;line-height:1.25;font-variant-numeric:tabular-nums}
.sidebar .prism-slider-box>.prism-range-bounds>:empty{display:none}
.prism-mod-master .jm-master{--control-tone:#202b22;--control-alt-tone:#263329;--section-border:#64764b}
.sidebar .jm-range-field.prism-slider-box{display:flex;align-items:center;flex-wrap:wrap;gap:0 3px}
.sidebar .jm-range-field.prism-slider-box>label:not(.jm-curve){flex:1 1 90px;min-width:0;margin:0;font-size:20px;line-height:1.25}
.sidebar .jm-range-field.prism-slider-box>.jm-range-controls{flex:0 0 auto;margin-left:auto;min-height:35px}
.sidebar .jm-range-field.prism-slider-box>.jm-range-row{flex:1 1 100%;width:100%;min-height:35px}
.sidebar .jm-range-field.prism-slider-box>.prism-range-bounds{flex:1 1 100%;width:100%}
.sidebar .jm-range-field.prism-slider-box>.jm-curve{flex:1 1 100%;width:100%;margin-top:2px}
.sidebar .jm-slew.prism-slider-box{--control-tone:#292431;--control-alt-tone:#302938;--section-border:#81648d}
.sidebar .jm-tempo.prism-random-scope{gap:3px;min-height:35px}
.sidebar .jm-tempo.prism-random-scope>.prism-value-controls{gap:3px}
button.prism-individual-random,.sidebar button.prism-individual-random,.sidebar.jing-modulation button.prism-individual-random{
 opacity:calc(var(--prism-rnd-visible,1)*var(--prism-rnd-enabled,1));
 width:48px;min-width:48px;max-width:48px;height:35px;min-height:35px;flex:0 0 48px;padding:2px 4px;font-size:20px;line-height:1.2;transition:opacity .12s
}
button.prism-individual-random:disabled{--prism-rnd-enabled:.45}
/* Keeping the button in the layout avoids shifting a value or range control. */
@media(hover:hover) and (pointer:fine){
 button.prism-individual-random{--prism-rnd-visible:0;pointer-events:none}
 .prism-slider-box:is(:hover,:focus-within)>.control-head>.prism-value-controls>.prism-individual-random,
 .prism-slider-box:is(:hover,:focus-within)>.control-head>.prism-value-controls>.prism-range-buttons>.prism-individual-random,
 .prism-random-scope:is(:hover,:focus-within)>.prism-individual-random,
 .prism-random-scope:is(:hover,:focus-within)>.prism-value-controls>.prism-individual-random,
 .prism-random-scope:is(:hover,:focus-within)>.row>.prism-individual-random,
 .prism-random-scope:is(:hover,:focus-within)>:is(.selection-slew-range-buttons,.variation-strength-range-buttons)>.prism-individual-random,
 button.prism-individual-random:focus-visible{--prism-rnd-visible:1;pointer-events:auto}
}
@media(any-pointer:coarse),(hover:none){
 button.prism-individual-random{--prism-rnd-visible:1;pointer-events:auto}
}
/* Polish layer, shared with JingPrism 1.5.22. Loaded last, so each rule here refines one above.
   Visible type keeps the 20px minimum used throughout the app. */

/* Stage: the preview and its rows share the artwork's own 16:9 width, so the
   picture no longer sits between black side bars on wide windows. */
.workspace{--viewer-h:56vh;--stage-w:calc(var(--viewer-h) * 16 / 9 + 2px)}
@media(min-width:1600px){.workspace{--viewer-h:57vh}}
@media(max-width:1100px){.workspace{--viewer-h:48vh}}
.viewer canvas{max-height:var(--viewer-h)}
@media(max-width:760px){.viewer canvas{max-height:none}}
@media(min-width:761px){
 /* One centered column: every workspace section shares the stage's left and right edges. */
 .workspace>*{max-width:var(--stage-w);margin-left:auto;margin-right:auto}
}
.viewer:fullscreen{max-width:none;margin:0}

/* The controls pane takes the width the stage leaves free (420–520px), so labels
   and modulation sliders have room without shrinking the artwork. */
@media(min-width:1200px){.app-layout{grid-template-columns:clamp(420px,calc(100vw - 56vh * 16 / 9 - 34px),500px) minmax(0,1fr)}}
@media(min-width:1600px){.app-layout{grid-template-columns:clamp(420px,calc(100vw - 57vh * 16 / 9 - 34px),520px) minmax(0,1fr)}}

/* Collapsible modulation panel. The bar stays visible on every tab with the
   transport status and a quick Run / Pause; the full master folds away. Its
   lime band keeps the modulation section apart from the tab content below. */
#modulationBar{display:flex;align-items:stretch;gap:4px;margin:0 0 10px}
#modulationBar .mod-toggle{flex:1 1 auto;min-width:0;min-height:40px;justify-content:flex-start;gap:7px;padding:4px 8px;background:linear-gradient(90deg,#36501f,#2b3d1c 62%,#25331a);border:1px solid #6f8d44;border-left:4px solid var(--accent);border-radius:6px;color:#f1fbe3;font-weight:700;text-align:left}
#modulationBar .mod-toggle:hover:not(:disabled){background:linear-gradient(90deg,#3f5c24,#31461f 62%,#2a3a1d);border-color:#93b55e}
#modulationBar .mod-chevron{width:20px;height:20px;transition:transform .15s}
#modulationBar .mod-toggle[aria-expanded=true] .mod-chevron{transform:rotate(90deg)}
#modulationBar .mod-title{white-space:nowrap}
#modulationBar .mod-status,#modulationBar .mod-auto{display:inline-flex;align-items:center;gap:6px;padding:1px 8px;border:1px solid #7d9150;border-radius:15px;background:#1d2815;font-size:20px;font-weight:500;line-height:1.3;white-space:nowrap;color:#e3efcf}
#modulationBar .mod-status{margin-left:auto}
#modulationBar .mod-status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;opacity:.5}
#modulationBar .mod-status[data-status=running]{color:#efffc4;background:#3b5528;border-color:#a6c66a}
#modulationBar .mod-status[data-status=running]::before{opacity:1;animation:pulse 1.4s ease-in-out infinite}
#modulationBar .mod-status[data-status=paused]{color:#ffda9c;border-color:#8a7240}
#modulationBar .mod-auto{color:#bce9df;border-color:#476a70;background:#203a40}
#modulationBar .mod-auto[hidden]{display:none}
#modulationBar .mod-play{flex:none;min-width:88px;min-height:40px;padding:4px 10px;background:#3d5629;border:1px solid #86a856;border-radius:6px;color:#f1fcd6;font-weight:650}
#modulationBar .mod-play:hover:not(:disabled){background:#4a6731;border-color:#a8c972}
#modulationMaster .jm-heading>.jm-status{display:none}

/* Section headings contain their floated Rnd button, so the first slider of a
   section keeps its full width instead of wrapping beside the float. */
.sidebar .genome-group>summary::after{content:"";display:block;clear:both}

/* Sticky tabs also cover the sidebar padding above them while the pane scrolls. */
.side-tabs{box-shadow:0 -10px 0 #101922,0 5px 0 #101922}

/* Small layout fixes. */
.canvas-subtitle{flex-wrap:wrap;column-gap:9px;row-gap:0}
.canvas-subtitle>span{white-space:nowrap}
.canvas-subtitle>span:not([id]){display:none}
#generationLabel::before{content:"·";margin-right:9px}
.preview-info .preview-source{width:136px}
.glass-pill{text-transform:none;letter-spacing:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.viewer-overlay{max-width:calc(100% - 28px)}
@container artwork-workspace (max-width:480px){.viewer-overlay{display:none}}

/* Links in dialogs use the app's palette. */
dialog a{color:var(--accent2);text-underline-offset:3px}
dialog a:hover{color:var(--accent)}

/* Dialogs get a little more breathing room on larger screens. */
@media(min-width:761px){
 .dialog-head{padding:12px 18px}
 .dialog-body{padding:14px 18px}
 .dialog-foot{padding:12px 18px;gap:8px}
 .export-types{gap:6px;margin-bottom:12px}
 .export-settings{gap:8px 14px}
}
/* The app title takes the logo's accent green, the color of the Export button. */
.brand-name{color:var(--accent)}
/* Streamlined layout. A slider takes two rows: name, value and buttons, then
   modulation buttons with the track between its bounds. Workspace rows and
   the starting style field are tighter, so more fits on screen. */
.prism-slider-box.pm-param,.prism-slider-box.control:not(.pm-param){display:flex;flex-wrap:wrap;align-items:center;column-gap:6px;row-gap:2px}
.prism-slider-box.pm-param>*,.prism-slider-box.control:not(.pm-param)>*{order:9;flex:1 1 100%;min-width:0}
.prism-slider-box.pm-param>.control-head,.prism-slider-box.control:not(.pm-param)>.control-head{order:1}
.prism-slider-box.pm-param>.pm-toolbar{order:2;flex:0 0 auto;margin:0}
.prism-slider-box.pm-param>.prism-range-bounds,.prism-slider-box.control:not(.pm-param)>.prism-range-bounds{display:contents}
.prism-slider-box.pm-param>.prism-range-bounds>span,.prism-slider-box.control:not(.pm-param)>.prism-range-bounds>span{order:3;flex:0 0 auto}
.prism-slider-box.pm-param>.prism-range-bounds>span:last-child,.prism-slider-box.control:not(.pm-param)>.prism-range-bounds>span:last-child{order:5}
.prism-slider-box.pm-param>.pm-range-wrap,.prism-slider-box.control:not(.pm-param)>input[type=range],.prism-slider-box.control:not(.pm-param)>.journey-slider-row{order:4;flex:1 1 60px}
.prism-slider-box.pm-param>.pm-panel{order:6}
/* Name row: a little narrower value box and buttons leave the name one line. */
@media(min-width:1200px){.sidebar .prism-value-controls input[type=number]{width:86px;flex-basis:86px}}
.sidebar .prism-value-controls{gap:3px}
.sidebar .control-head{column-gap:5px}
.sidebar .prism-value-controls .prism-individual-random{width:44px;min-width:44px;max-width:44px}
.sidebar .prism-value-controls .prism-range-scale{padding-left:5px;padding-right:5px;min-width:0}
/* Starting style stands out most in the sidebar: a glowing accent card with a
   large label, a bold menu and Browse styles as the primary button. The menu
   wraps under the label when the sidebar is narrow. */
/* Workspace rows. */
.canvas-heading .art-title{padding-top:0;padding-bottom:0;line-height:1.2}
.canvas-subtitle{line-height:1.2}
.selection-slew-control{padding-top:2px;padding-bottom:2px;margin-bottom:5px}
.selection-slew-control .number-box{height:35px;min-height:35px}
.journey-state-strip{min-height:52px}
.journey-state-card{flex-basis:86px;width:86px;height:48px}
/* Phones: modulation buttons get their own line, so wide bounds stay beside the track. */
@media(max-width:760px){.prism-slider-box.pm-param>.pm-toolbar{flex-basis:100%}}
/* A defined line, in the title's accent green, along the top and sides of the
   panel boxes (sliders, groups, notes, modulation sections, headings, Journey
   and saved cards, the tab bar) and of the playhead, slider and state rows on
   the right. */
.prism-slider-box,.genome-group,.info-box,.jm-master,.auto-random-section,.jm-help,.motion-toggle,.random-section-heading,.journey-card,.favorite-card,.playback,.selection-slew-control,.shader-variation-heading,.journey-state-strip,.side-tabs{border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-right:2px solid var(--accent)}
#mirrorControl,.selection-slew-control.variation-strength-control{border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-right:2px solid var(--accent)}
/* The kit styles some of these boxes with more specific rules; these match them. */
.sidebar :is(.prism-slider-box,.control,.genome-group,.random-section-heading),.sidebar .control:nth-of-type(even),.jing-modulation :is(.jm-master,.jm-help,.jm-slew),.prism-mod-master :is(.jm-master,.jm-help,.jm-slew),#panel-motion .motion-toggle,#panel-journey .random-section-heading{border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-right:2px solid var(--accent)}
/* The second More variations button shares the status line's row under the choices. */
.variants-footer{display:flex;align-items:center;gap:10px;margin-top:4px}
.variants-footer>.status-line{flex:1;min-width:0;margin-top:0}
.variants-footer>#rerollBtnBottom{flex:0 0 auto;white-space:nowrap;min-height:30px;padding:5px 7px}
/* A keyframe's Fade toggle: off glides the sliders in, on dissolves. */
.journey-tools .journey-fade[aria-pressed="true"]{background:#33481f;border-color:var(--accent);color:#f1fcd6}
/* Journey frame tools stay on one row with the Fade toggle. */
.journey-tools{gap:3px}
.journey-tools button{padding:4px 6px}
.journey-tools .journey-position{width:54px;min-width:54px;padding-left:4px;padding-right:2px}

/* ZzArt Studio 2.4.0 layer. Loaded last. Classic choices, then JingFractals 1.0.1 polish. */
/* Classic instruction choices read as a full-width line inside their slider card. */
.sidebar .prism-slider-box>.genome-choice{display:block;max-width:none;text-align:left;line-height:1.25;margin:0}
/* The playing transport is lit, so the preview shows what is moving. */
.viewer.is-playing #quickPlayBtn{color:var(--accent);border-color:#79985a}
/* Variation tiles: one-line captions, a quiet lift on hover, loading tiles at their final size. */
.variant-caption{flex-wrap:nowrap;gap:6px}
.variant-caption .variant-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.variant-caption .arrow{flex:none}
.variant{transition:border-color .15s,box-shadow .15s,transform .15s}
.variant:hover:not(:disabled){box-shadow:0 6px 18px #0007;transform:translateY(-1px)}
.variant:active:not(:disabled){transform:none}
.variant.skeleton{min-height:0}
.variant.skeleton::before{content:"";display:block;aspect-ratio:16/9}
.variant.skeleton::after{content:"";display:block;height:var(--variant-caption-height,30px)}
/* Thin scrollbars in the app's palette. */
.sidebar,.workspace,.dialog-body,.journey-list,.history-list,textarea{scrollbar-width:thin;scrollbar-color:#3d4c5e transparent}
/* Long lists skip layout and painting for cards scrolled out of view. */
.journey-list>.journey-card{content-visibility:auto;contain-intrinsic-size:auto 170px}
.collection-list>.favorite-card{content-visibility:auto;contain-intrinsic-size:auto 220px}
/* Gentle entrances; the reduced-motion rule above turns them off. */
@keyframes zz-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes zz-fade{from{opacity:0}to{opacity:1}}
.toast{animation:zz-rise .18s ease-out}
dialog[open]{animation:zz-rise .16s ease-out}
dialog[open]::backdrop{animation:zz-fade .16s ease-out}
::selection{background:#b5f17c4d}
/* 2.4.0: the "How ZzArt draws" list in Help. */
.help-list{margin:6px 0 12px;padding-left:20px}
.help-list li{margin:5px 0;line-height:1.45}
/* Web edition: page links in the controls footer. */
.side-footer .web-links{display:block;margin-top:2px}
.side-footer .web-links a{color:var(--accent2);text-underline-offset:3px}
.side-footer .web-links a:hover{color:var(--accent)}
