.shape-sound-editor{box-sizing:border-box;min-height:0;padding:10px;overflow-y:auto;background:var(--panel,#202d3d);color:var(--text,#eaf0fa);border:1px solid #927fb1;border-radius:9px;font:13px/1.4 "Segoe UI",sans-serif}
.shape-sound-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.shape-sound-editor-head h2{display:block!important;margin:0;font-size:14px!important;line-height:1.3}.shape-sound-editor-head button{flex:none}
.shape-sound-editor label{display:flex;flex-direction:column;gap:4px;min-width:0}.shape-sound-editor select{box-sizing:border-box;width:100%;min-width:0;min-height:34px;padding:5px;border:1px solid #8299b6;border-radius:6px;background:#24354a;color:#edf3fb;font:13px "Segoe UI",sans-serif}
.shape-sound-editor button{box-sizing:border-box;min-height:30px;padding:4px 8px;border:1px solid #9c88bb;border-radius:6px;background:#49395f;color:#f0e9fc;font:12px "Segoe UI",sans-serif;cursor:pointer}.shape-sound-editor button:focus-visible,.shape-sound-editor select:focus-visible{outline:2px solid #bca0ea;outline-offset:2px}
.shape-sound-editor .shape-sound-preview{margin-top:7px;background:#087b56;border-color:#46cba0}.shape-sound-status:empty{display:none}.shape-sound-status{margin:6px 0;font-size:12px;color:#e6ce9d}
.shape-sound-editor details{margin-top:9px;border-top:1px solid #58667d;padding-top:7px}.shape-sound-editor summary{cursor:pointer;color:#cfb7ef;font-weight:600}.shape-sound-editor details p{font-size:12px;color:#b6c5d8;margin:6px 0}
.shape-sound-note-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:8px 0;direction:ltr}.shape-sound-note-grid button{min-width:0;min-height:30px;padding:3px 0;background:#263b4d;border-color:#657e99;font-size:11px}.shape-sound-note-grid button[aria-pressed=true]{background:#66528d;border-color:#c3a9ee}.shape-sound-note-grid button.has-sound{text-decoration:underline;text-underline-offset:3px;color:#b3f0da}.shape-sound-editor .shape-sound-clear{margin-top:8px;font-size:11px}
body[data-play-wheel=shapes] .panel[data-shape-tab=sound]>.shape-panel-tabs,body[data-play-wheel=shapes] .panel[data-shape-tab=sound]>.panel-block{display:none!important}body[data-play-wheel=shapes] .panel>.shape-sound-editor{flex:1;min-height:0}
body[data-play-wheel=shapes] button.shape-sound-button{width:24px;min-width:24px;height:24px;min-height:24px;padding:0!important;background:#433652!important;border:1px solid #b09ac9!important;color:#e5d6fa;font:16px/1 "Segoe UI Symbol",sans-serif;flex:none}
.engine-circle-sounds-button{position:absolute;left:30px;top:5px;z-index:2;width:24px;height:22px;min-height:22px;padding:0;border:1px solid #a893c4;border-radius:6px;background:#49395f;color:#f0e9fc;cursor:pointer;font:16px/1 "Segoe UI Symbol",sans-serif}
.engine-shape-sound-panel{position:fixed;z-index:2147483000;inset:calc(var(--studio-shell-height,54px) + 12px) 12px auto auto;width:min(350px,calc(100vw - 24px));max-height:calc(100dvh - var(--studio-shell-height,54px) - 24px);box-shadow:0 8px 24px #10182788;direction:inherit}.engine-shape-sound-panel[hidden]{display:none}

.engine-live-circle>.engine-circle-sounds-button{grid-area:auto!important;inset:5px auto auto 31px}

/* The sound button opens the picture menu directly. */
.shape-sound-editor{display:flex;flex-direction:column;gap:7px;overflow:hidden}
.shape-sound-editor-head{margin:0;flex:none}.shape-sound-editor-head h2{flex:1;min-width:0}.shape-sound-editor-head .shape-sound-preview{margin:0;font-size:11px;padding:4px 6px}
.shape-sound-context{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1px 8px;flex:none;font-size:12px;line-height:1.3}.shape-sound-context strong,.shape-sound-context>span{grid-column:1;min-width:0}.shape-sound-context>span{color:#bccde2;font-size:11px}.shape-sound-context button{grid-column:2;grid-row:1/3;min-height:28px;font-size:11px}.shape-sound-context button[hidden]{display:none!important}
.shape-sound-editor details{margin:0;padding-top:5px;flex:none}.shape-sound-editor details p{margin:4px 0}.shape-sound-editor .shape-sound-note-grid{margin:4px 0;gap:3px}.shape-sound-editor .shape-sound-clear{margin:0;min-height:25px;padding:3px 7px}
.shape-sound-browser{display:flex;flex-direction:column;gap:5px;flex:1;min-height:0}
.shape-sound-filters{display:flex;gap:4px;flex:none}.shape-sound-filters button{flex:1;min-width:0;min-height:29px;padding:4px;font-size:12px;background:#293a50;border-color:#738aa8}.shape-sound-filters button[aria-pressed=true]{background:#584574;border-color:#bba2da;color:#f3ecfc}
.shape-sound-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:86px;align-content:start;gap:5px;overflow-y:auto;min-height:0;max-height:280px;padding:2px;scrollbar-gutter:stable}
.shape-sound-gallery .shape-sound-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:86px;max-width:100%;padding:4px;border:1px solid #617a98;background:#243449;color:#e9f1fb;overflow:hidden;position:relative}
.shape-sound-gallery .shape-sound-choice:hover{background:#334b66;border-color:#a7bfdb}
.shape-sound-gallery .shape-sound-choice[aria-pressed=true]{background:#3e5369;border:2px solid #85d7c5;box-shadow:inset 0 0 0 1px #85d7c533}
.shape-sound-choice[aria-pressed=true]::after{content:'✓';position:absolute;inset:3px 4px auto auto;background:#225a4b;color:#d6fff1;border-radius:50%;width:17px;height:17px;font:700 12px/17px "Segoe UI",sans-serif;text-align:center}
.shape-sound-art{display:flex;align-items:center;justify-content:center;width:100%;height:52px;min-height:52px;flex:none;color:#bba9e9}.shape-sound-art img{display:block;width:100%;height:100%;object-fit:contain;border-radius:4px}.shape-sound-art svg{display:block;width:48px;height:48px}
.shape-sound-choice-label{font:11px/1.15 "Segoe UI",sans-serif;max-width:100%;min-width:0;overflow-wrap:anywhere;text-align:center}
.engine-shape-sound-panel{width:min(370px,calc(100vw - 24px))}
@media(max-width:560px){
 body[data-play-wheel=shapes] .panel>.shape-sound-editor{position:fixed;inset:5px;z-index:100;height:auto;max-height:none}
}
@media(max-height:400px) and (min-width:561px){
 body[data-play-wheel=shapes] .panel>.shape-sound-editor{position:fixed;inset:4px;z-index:100;margin:0;height:auto;max-height:none;padding:7px;gap:4px}
 .shape-sound-editor-head h2{font-size:13px!important}.shape-sound-gallery{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:70px;max-height:200px}.shape-sound-gallery .shape-sound-choice{min-height:70px;gap:2px;padding:2px}.shape-sound-art{height:42px;min-height:42px}.shape-sound-art svg{width:38px;height:38px}
 .shape-sound-context{grid-template-columns:auto minmax(0,1fr) auto;gap:7px;align-items:center}.shape-sound-context strong{grid-column:1;white-space:nowrap}.shape-sound-context>span{grid-column:2;grid-row:1}.shape-sound-context button{grid-column:3;grid-row:1}
 .engine-shape-sound-panel{width:min(620px,calc(100vw - 24px));padding:7px;gap:4px}
}

.shape-sound-browser[hidden],.shape-sound-gallery>[hidden]{display:none!important}
.shape-sound-gallery{grid-template-columns:repeat(var(--sound-columns,4),minmax(0,1fr));grid-auto-rows:var(--sound-tile-height,86px);overflow:hidden!important;max-height:none;flex:1;scrollbar-gutter:auto}
.shape-sound-gallery .shape-sound-choice{height:var(--sound-tile-height,86px);min-height:0}
.shape-sound-gallery .shape-sound-art{height:min(70px,calc(var(--sound-tile-height,86px) - 30px));min-height:0}
.shape-sound-gallery .shape-sound-art svg{height:100%;max-height:48px}
.shape-sound-pages{display:flex;align-items:center;justify-content:center;gap:12px;height:25px;min-height:25px;flex:none;direction:ltr}
.shape-sound-pages button{width:30px;min-height:23px;height:23px;padding:0;font:19px/1 "Segoe UI",sans-serif}.shape-sound-pages span{font-size:11px}
.engine-shape-sound-panel{height:min(510px,calc(100dvh - var(--studio-shell-height,54px) - 24px))}
.shape-sound-filters button{display:inline-flex;align-items:center;justify-content:center;gap:4px}.shape-sound-filters svg{width:16px;height:16px;flex:none}
.shape-sound-button svg,.engine-circle-sounds-button svg{display:block;width:17px;height:17px;margin:auto}
.engine-live-circle>select.engine-fifths-choice[hidden]{display:none!important}
/* The same waveform keeps its colour in the gallery and on instrument buttons. */
:is([data-sound-choice="wave:sine"],[data-wave="sine"]){--wave-hue:210}
:is([data-sound-choice="wave:triangle"],[data-wave="triangle"]){--wave-hue:155}
:is([data-sound-choice="wave:sawtooth"],[data-wave="sawtooth"]){--wave-hue:80}
:is([data-sound-choice="wave:square"],[data-wave="square"]){--wave-hue:25}
.shape-sound-gallery .shape-sound-choice[data-sound-choice^="wave:"]{background:oklch(28% .035 var(--wave-hue));border-color:oklch(56% .075 var(--wave-hue));color:oklch(90% .065 var(--wave-hue))}
.shape-sound-gallery .shape-sound-choice[data-sound-choice^="wave:"]:hover{background:oklch(34% .055 var(--wave-hue));border-color:oklch(78% .11 var(--wave-hue))}
.shape-sound-gallery .shape-sound-choice[data-sound-choice^="wave:"][aria-pressed=true]{background:oklch(37% .065 var(--wave-hue));border-color:oklch(82% .11 var(--wave-hue));box-shadow:inset 0 0 0 1px oklch(82% .11 var(--wave-hue) / .2)}
:is(.shape-sound-art,.shape-sound-button,.loopo-synth-art) svg[data-wave]{color:oklch(83% .13 var(--wave-hue))}
.shape-sound-breadcrumb{display:flex;align-items:center;gap:8px;min-height:30px;flex:none;min-width:0}.shape-sound-breadcrumb>span{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shape-sound-breadcrumb button{font-size:11px;min-height:28px;padding:3px 6px;flex:none;background:oklch(29% .025 260);border-color:oklch(52% .035 260)}
.shape-sound-breadcrumb[hidden],.shape-sound-filters[hidden]{display:none!important}.shape-sound-gallery .shape-sound-folder{gap:3px;color:oklch(86% .09 85);background:oklch(26% .02 260);border-color:oklch(51% .045 85)}.shape-sound-folder>svg{width:38px;height:32px;flex:none}.shape-sound-folder>strong{font-size:11px;line-height:1.2;font-weight:600;max-width:100%;text-align:center}.shape-sound-folder>small{font-size:10px;color:oklch(76% .025 260)}
.shape-sound-editor[data-folders=true] .shape-sound-art{height:min(62px,calc(var(--sound-tile-height,100px) - 51px))}.shape-sound-source{font:10px/1.15 "Segoe UI",sans-serif;color:oklch(78% .035 260);max-width:100%;text-align:center}.shape-sound-editor[data-folders=true] .shape-sound-choice-label{line-height:1.2}
.shape-sound-gallery .shape-sound-folder .shape-sound-folder-art{height:calc(var(--sound-tile-height,100px) - 56px);max-height:60px;gap:3px}.shape-sound-folder-art>*{min-width:0;flex:1}.shape-sound-folder-art img{width:0;max-width:100%}.shape-sound-folder>strong{min-height:26px;display:flex;align-items:center;justify-content:center;line-height:13px}.shape-sound-folder-art svg{color:oklch(83% .13 210)}
