/* All changes stay inside contextual UI; the canonical page/theme remain intact. */
.context-reserve[hidden]{display:none!important}
.context-nav{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px 16px;padding:16px 20px 12px;min-width:0}
.context-nav-actions{display:flex;flex-wrap:wrap;gap:6px}
.context-nav-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);font:inherit;font-size:11px;line-height:1.5;text-align:center}
.context-nav-button[aria-expanded=true]{border-color:var(--selected);background:var(--raised);color:var(--green)}
.context-count{display:inline-grid;place-items:center;min-width:19px;min-height:19px;padding:1px 5px;border-radius:12px;background:var(--panel);color:var(--muted);font-size:9px}
.context-current{margin:0;color:var(--muted);font-size:10px;line-height:1.7;overflow-wrap:anywhere}
/* Contain the panel margin so its top gap collapses with the shared slot. */
.context-shared-slot{display:flow-root;min-width:0;margin:0 20px}
.context-shared-slot:empty{display:none}
.context-panel{min-width:0;margin:0 0 20px;border:1px solid var(--selected);border-radius:17px;background:var(--surface);color:var(--ink);overflow:hidden;scroll-margin-block:16px}
.context-shared-slot>.context-panel{margin-top:20px}
.context-panel[hidden]{display:none!important}
.context-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:57px;padding:7px 12px 7px 18px;border-bottom:1px solid var(--line);background:var(--panel)}
.context-panel-title{min-width:0;margin:0;font-family:inherit;font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0;overflow-wrap:anywhere}
.context-panel-close{display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;padding:6px;border-radius:50%;background:none;color:var(--muted);font:inherit;font-size:27px;line-height:1}
.context-content{min-width:0;padding:20px}
.context-content>.context-tool{min-width:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none}
.context-content>.context-tool+.context-tool{margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
.context-content>#jam-tray.inline-keyboard,.context-content>#save-section.inline-save{position:static;inset:auto;transform:none;width:auto;max-width:none;max-height:none;overflow:visible;padding:0;margin:0;border:0;border-radius:0;box-shadow:none;background:none}
.context-content>#save-section.inline-save:not(:first-child){margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
.context-panel .context-tool>.section-intro{margin-bottom:17px}
.context-panel .context-tool>.section-intro>h2{font-size:25px;margin-top:5px}
.context-panel .shelf-heading{flex-wrap:wrap;align-items:flex-start;gap:12px}
.context-panel .shelf-heading h2{font-size:25px}
.context-panel .pin-bench{padding:0;border:0}
.context-panel .sound-layout{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:16px}
.context-panel .sound-card{min-width:0}
.context-panel .launch-cards,.context-panel .pocket-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
.context-panel .creation-layout{grid-template-columns:minmax(140px,220px) minmax(0,1fr);gap:22px}
.context-panel .creation-cover svg{max-width:220px}
.context-panel .context-content .touch-editor{display:block;min-width:0;padding:0;margin:0;border:0;background:none}
.context-panel .touch-editor>summary{display:none}
.context-card-slot .context-panel .context-content .mutation-control{display:block;min-width:0;padding:0;margin:0;border:0}
.context-panel :is(button,select,input:not([type=checkbox]):not([type=radio]),summary){min-height:44px}
.context-panel :is(input,select,textarea){max-width:100%;min-width:0}
.context-panel :is(button,a,input,select,textarea,summary):focus-visible,.context-nav-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.context-card-slot{container-type:inline-size;container-name:context-card;min-width:0;padding:0 14px 14px}
.context-card-slot>.context-panel{margin:0;border-radius:12px;scroll-margin-block:12px}
.context-card-slot .context-panel-heading{padding:5px 7px 5px 12px;min-height:54px}
.context-card-slot .context-content{padding:14px}
.context-card-slot .context-panel-title{font-size:13px}
.context-card-slot #jam-tray .play-pads{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.context-card-slot #jam-tray .play-pads button{min-height:88px;padding:10px 8px}
.context-card-slot #jam-tray .tray-heading{gap:8px;flex-wrap:wrap;margin-bottom:12px}
.context-card-slot #jam-tray .tray-heading h2{font-size:24px}
.context-card-slot #jam-tray .tray-heading .eyebrow{font-size:7px}
.context-card-slot #jam-tray .bench-target{align-items:stretch;flex-direction:column;gap:8px}
.context-card-slot #jam-tray .bench-target select{width:100%;flex:auto}
.context-card-slot #jam-tray .pad-controls{grid-template-columns:minmax(0,1fr);gap:12px}
.context-card-slot #jam-tray .pad-hold-actions,.context-card-slot #jam-tray .bench-actions{flex-wrap:wrap;gap:8px}
.context-card-slot #jam-tray .bench-actions>button{min-width:0;flex:1 1 120px;white-space:normal}
.context-card-slot #jam-tray .trick-buttons,.context-card-slot .connection-tools,.context-card-slot .reaction-modes{grid-template-columns:minmax(0,1fr)}
.context-card-slot .reaction-selects{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:7px}
.context-card-slot .reaction-actions,.context-card-slot .molecule-controls{flex-wrap:wrap}
.context-card-slot .reaction-actions>button{flex:1 1 130px}
.context-card-slot .reaction-preview{padding:10px 7px}
.context-card-slot .reaction-preview>div{grid-template-columns:42px minmax(0,1fr);gap:6px}
.context-card-slot .reaction-preview>div>div{gap:3px}
.context-card-slot .tool-heading{padding:14px 12px;gap:8px;flex-wrap:wrap}
.context-card-slot .tool-heading h3{font-size:15px}
.context-card-slot .inline-tool .reaction-body,.context-card-slot .inline-tool .molecule-body{padding:0 12px 14px}
.context-card-slot .molecule-members{grid-template-columns:minmax(0,1fr)}
.context-card-slot .touch-editor .touch-step-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.context-card-slot .touch-editor .editor-rings{grid-template-columns:repeat(2,minmax(0,1fr))}
.context-panel #journey-panel .journey-body{padding:0}
.context-panel #journey-panel .journey-sections{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.context-panel #journey-panel .song-playback,.context-panel #journey-panel .journey-title-row,.context-panel #journey-panel .song-capture{flex-wrap:wrap}
@container context-card (min-width:640px){.context-card-slot #jam-tray .play-pads{grid-template-columns:repeat(4,minmax(0,1fr))}.context-card-slot #jam-tray .pad-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .context-nav{padding:12px 12px 10px;gap:7px}.context-nav-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:6px}.context-nav-button{padding:8px 9px;font-size:10px}
 .context-shared-slot{margin:0 12px}.context-panel{border-radius:13px;margin-bottom:14px}.context-shared-slot>.context-panel{margin-top:12px}.context-panel-heading{padding-left:13px}.context-content{padding:14px}
 .context-card-slot{padding:0 9px 10px}.context-card-slot .context-content{padding:11px}.context-card-slot .context-panel-heading{padding-left:10px}
 .context-panel .creation-layout{grid-template-columns:minmax(0,1fr);gap:18px}.context-panel .creation-preview .creation-cover{max-width:180px}
 .context-panel #journey-panel .journey-moment{grid-template-columns:24px minmax(0,1fr) 57px;gap:8px}.context-panel #journey-panel .moment-actions{grid-column:2/-1;flex-wrap:wrap}
}
@media(max-width:360px){.context-card-slot .reaction-selects{grid-template-columns:minmax(0,1fr)}.context-card-slot .reaction-selects>button{justify-self:center}.context-card-slot .context-panel-title{font-size:12px}}
