/* Working sample A. Scope restricted to the selection panel; no note geometry changes. */
.drums-workshop #quick-selection-panel {width:max-content;max-width:calc(100vw - 16px);min-width:0;padding:4px;gap:4px;background:var(--workshop-paper);color:var(--site-ink);font-size:13px}
.drums-workshop #quick-selection-panel .quick-selection-heading {padding:4px;max-width:32ch}
.drums-workshop #quick-selection-panel .quick-group-actions {display:grid;gap:8px;width:100%;padding:8px 4px;box-sizing:border-box;justify-items:stretch}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-row {display:grid;grid-template-columns:minmax(76px,max-content) minmax(0,1fr);gap:8px;align-items:center}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-heading {display:grid;gap:2px;font-size:12px}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-mixed {font-weight:400;color:var(--site-muted);font-size:11px}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices {display:flex;gap:4px;flex-wrap:wrap;min-width:0}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option {display:grid;justify-items:center;gap:3px;max-width:64px}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice {display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:none;width:32px;min-width:32px;max-width:32px;height:32px;min-height:32px;padding:3px;border:1px solid var(--site-line);border-radius:5px;background:var(--interaction-surface,var(--workshop-paper));color:var(--site-ink);font:inherit;box-shadow:none}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice[aria-pressed=true] {background:var(--selection-empty);border-color:var(--selection-border);box-shadow:inset 0 0 0 1px var(--selection-border)}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice:disabled {opacity:.45;cursor:default}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-symbol {display:block;width:24px;height:24px;pointer-events:none;line-height:0}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-symbol svg {display:block;color:var(--site-ink);fill:var(--site-ink);stroke:var(--site-ink);overflow:visible}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-symbol svg :is([stroke='#333'],[stroke=black],[stroke='#000'],[stroke='#000000']){stroke:var(--site-ink)}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-symbol svg :is([fill='#333'],[fill=black],[fill='#000'],[fill='#000000']){fill:var(--site-ink)}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-caption {display:none;font-size:11px;text-align:center;line-height:1.3;overflow-wrap:anywhere}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-help {margin:0;padding:0 4px;font-size:11px;line-height:1.35;color:var(--site-muted);max-width:31ch;overflow-wrap:anywhere}
.drums-workshop #quick-selection-panel :is(.quick-fill-group,.quick-delete-group,.quick-spelling-group) {width:100%;padding:0;margin:0;border:0;box-sizing:border-box}
.drums-workshop #quick-selection-panel :is(.quick-fill-group,.quick-delete-group,.quick-spelling-group)>button {box-sizing:border-box;display:block;width:100%;min-height:32px;padding:5px 8px;text-align:center;border:1px solid var(--site-line);border-radius:5px;background:var(--interaction-surface,var(--workshop-paper));color:var(--site-ink);font:inherit;white-space:normal}
.drums-workshop #quick-selection-panel .quick-fill-settings {display:block;max-width:32ch;font-size:11px;line-height:1.35;padding:3px 4px;color:var(--site-muted);overflow-wrap:anywhere}
.drums-workshop #quick-selection-panel .quick-spelling-group .hint {margin:4px;max-width:30ch;line-height:1.4}
.drums-workshop #quick-selection-panel button:focus-visible {outline:2px solid var(--focus-ring);outline-offset:2px}
@media(pointer:coarse){
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice {width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-caption {display:block}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option {width:60px}
 .drums-workshop #quick-selection-panel :is(.quick-fill-group,.quick-delete-group,.quick-spelling-group)>button {min-height:44px}
}
@media(max-width:360px) and (pointer:coarse){.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-row {grid-template-columns:minmax(0,1fr)}.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-heading{display:flex;gap:8px;flex-wrap:wrap}}
/* v7: property columns alone define intrinsic width. Other text wraps within it. */
.drums-workshop #quick-selection-panel {grid-template-columns:minmax(0,max-content);gap:4px}
.drums-workshop #quick-selection-panel :is(.quick-selection-heading,.quick-selection-operations,.quick-fill-group,.quick-spelling-group,.quick-instrument-commands,.quick-section-title) {contain:inline-size;min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.drums-workshop #quick-selection-panel .quick-selection-heading {padding:0;gap:4px;align-items:flex-start}
.drums-workshop #quick-selection-panel .quick-selection-heading strong {min-width:0;line-height:1.4;overflow-wrap:normal}
.drums-workshop #quick-selection-panel .quick-selection-heading button {flex:none;width:24px;min-width:24px;min-height:24px;padding:0}
.drums-workshop #quick-selection-panel .quick-selection-operations {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.drums-workshop #quick-selection-panel .quick-selection-operations button {width:100%;min-width:0;min-height:32px;padding:4px;font:inherit;white-space:normal;overflow-wrap:anywhere;border:1px solid var(--site-line);border-radius:5px;color:var(--site-ink);background:var(--interaction-surface,var(--workshop-paper))}
.drums-workshop #quick-selection-panel .quick-selection-delete:is(:hover,:focus-visible) {color:var(--danger-fg);border-color:var(--danger-fg);background:var(--danger-hover-bg)}
.drums-workshop #quick-selection-panel .quick-group-actions {grid-template-columns:max-content max-content;gap:4px;padding:0;width:max-content;max-width:100%;align-items:center}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-row {display:contents}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices {gap:4px;flex-wrap:wrap}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option {position:relative;gap:4px}
.drums-workshop #quick-selection-panel :is(hr,.menu-separator){margin:0;border:0;border-top:1px solid var(--site-line);width:100%}
.drums-workshop #quick-selection-panel .quick-fill-group>button {display:grid;gap:4px;white-space:normal}
.drums-workshop #quick-selection-panel .quick-fill-settings {padding:0;max-width:none;font-size:11px;line-height:1.35}
.drums-workshop #quick-selection-panel .quick-spelling-group .hint {margin:4px 0 0;max-width:none;font-size:12px}
@media(pointer:coarse){
 .drums-workshop #quick-selection-panel .quick-selection-operations button {min-height:44px}
 .drums-workshop #quick-selection-panel .quick-selection-heading button {width:44px;min-width:44px;min-height:44px}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option {width:60px}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option::after {display:none}
}
@media(max-width:360px) and (pointer:coarse){.drums-workshop #quick-selection-panel .quick-group-actions{grid-template-columns:minmax(0,1fr);width:100%}.drums-workshop #quick-selection-panel{width:min(280px,calc(100vw - 16px))}}
.drums-workshop #quick-selection-panel .quick-group-actions{grid-template-columns:max-content minmax(0,max-content)}
/* Final spacing: measure from actual header bounds, including its close target. */
.drums-workshop #quick-selection-panel .quick-selection-heading{height:auto;min-height:0;margin:0;padding:0;align-self:start;align-items:center;gap:4px}
.drums-workshop #quick-selection-panel .quick-selection-heading>strong{margin:0;padding:0}
.drums-workshop #quick-selection-panel .quick-selection-heading>button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:32px;min-width:32px;height:32px;min-height:32px;margin:0;padding:0}
.drums-workshop #quick-selection-panel .quick-selection-operations{margin:0}
.drums-workshop #quick-selection-panel .quick-spelling-group{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:0;padding:0}
.drums-workshop #quick-selection-panel .quick-spelling-group>.hint{margin:0;padding:0;flex:none}
@media(pointer:coarse){.drums-workshop #quick-selection-panel .quick-selection-heading>button{width:44px;min-width:44px;height:44px;min-height:44px}}
/* M2: 4/8px are local comparison variants, not saved preferences. */
.drums-workshop #quick-selection-panel :is(.quick-property-current,.quick-touch-symbol-names){display:none}
@media(pointer:coarse){
 .drums-workshop #quick-selection-panel .quick-group-actions{grid-template-columns:minmax(76px,110px) max-content;width:max-content;max-width:100%;gap:var(--selection-touch-gap,8px)}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices{gap:var(--selection-touch-gap,8px);flex-wrap:nowrap}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option{width:44px;max-width:44px;gap:0}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-caption,.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-mixed{display:none}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-current{display:block;font-size:11px;line-height:1.35;font-weight:400;color:var(--site-muted);overflow-wrap:anywhere}
 .drums-workshop #quick-selection-panel .quick-selection-operations{gap:var(--selection-touch-gap,8px)}
 .drums-workshop #quick-selection-panel .quick-touch-symbol-names{display:block;contain:inline-size;min-width:0;width:100%;box-sizing:border-box;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
 .drums-workshop #quick-selection-panel .quick-touch-symbol-names summary{display:flex;align-items:center;min-height:44px;cursor:pointer}
 .drums-workshop #quick-selection-panel .quick-touch-symbol-names p{margin:4px 0}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-option:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
}
@media(max-width:300px) and (pointer:coarse){.drums-workshop #quick-selection-panel .quick-group-actions{grid-template-columns:minmax(0,1fr);width:100%}}

/* Shared property rows: preserve each host's commands and independent semantics. */
.drums-workshop .note-property-menu {display:grid;grid-template-columns:max-content max-content;gap:4px;padding:4px;width:max-content;min-width:0;max-width:calc(100vw - 16px);box-sizing:border-box;overflow:auto;font-size:13px}
.drums-workshop .note-property-menu[hidden]{display:none}
.drums-workshop .note-property-menu .note-properties{display:contents}
.drums-workshop .note-property-menu .quick-property-row{display:contents}
.drums-workshop .note-property-menu .quick-property-choices{flex-wrap:wrap}
.drums-workshop .note-property-menu .quick-property-heading{align-self:center}
.drums-workshop .note-property-menu>button,.drums-workshop .note-property-menu>.note-input-modes,.drums-workshop .note-property-menu>hr{grid-column:1/-1;width:100%;box-sizing:border-box}
.drums-workshop .note-property-menu .note-input-modes{display:grid;gap:4px}
.drums-workshop .note-property-menu .quick-property-current{display:none}
.drums-workshop .note-property-menu button[aria-pressed=true]{background:var(--selection-empty);border-color:var(--selection-border)}
.drums-workshop .note-property-menu button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}
html[data-drums-appearance=experimental2] .drums-workshop .note-property-menu button.quick-property-choice[aria-pressed=true]{
 background:#3B4F69;border-color:var(--site-line);box-shadow:none;
}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-mixed[hidden]{display:none}
@media(pointer:coarse){
 .drums-workshop .note-property-menu{gap:8px}
 .drums-workshop .note-property-menu .quick-property-choices{gap:8px}
 .drums-workshop .note-property-menu .quick-property-option{width:44px;max-width:44px}
 .drums-workshop .note-property-menu .quick-property-current{display:block;font-size:11px;color:var(--site-muted)}
 .drums-workshop .note-property-menu .quick-property-mixed{display:none}
 .drums-workshop .note-property-menu>button,.drums-workshop .note-property-menu .note-input-modes>button{min-height:44px}
}
@media(max-width:320px){.drums-workshop .note-property-menu{grid-template-columns:minmax(0,1fr)}.drums-workshop .note-property-menu .quick-property-row{display:grid;gap:4px}}

.drums-workshop .desktop-local-menu.note-property-menu button.quick-property-choice::before{content:none}
.drums-workshop .note-property-menu>.note-input-modes{min-width:0}

@media (pointer:fine){
 html[data-drums-appearance=experimental2] .drums-workshop[data-mobile-controls=desktop] :is(.note-property-menu,#quick-selection-panel) button.quick-property-choice,
 html[data-drums-appearance=experimental2] .drums-workshop[data-mobile-controls=desktop] #quick-selection-panel .quick-selection-operations button{
  border-radius:8px;
 }
}

.drums-workshop #quick-selection-panel .sticking-tools {
 display:grid;gap:4px;justify-items:start;min-width:0
}
.drums-workshop #quick-selection-panel .sticking-tools .quick-property-choices {gap:4px;flex-wrap:nowrap}
.drums-workshop #quick-selection-panel .sticking-icon {
 --interaction-surface:transparent;
}
.drums-workshop #quick-selection-panel .sticking-icon svg {width:23px;height:23px;flex:none;overflow:visible;pointer-events:none}
.sticking-icon text {font:600 9px Arial,sans-serif;fill:currentColor;stroke:none}
.sticking-icon text[font-size="8.5"] {font-size:8.5px}
html[data-drums-appearance=experimental2] .drums-workshop #quick-selection-panel .sticking-icon:not(:hover,:active) {background:transparent}
@media(pointer:fine){
 html[data-drums-appearance=experimental2] .drums-workshop #quick-selection-panel .sticking-tools button.quick-property-choice {border-radius:8px}
}

.drums-workshop :is(.sticking-manual,.sticking-rules) {
 position:fixed;z-index:1401;box-sizing:border-box;width:max-content;
 color:var(--site-ink);background:var(--workshop-paper);border:1px solid var(--site-line);
 border-radius:6px;overflow:auto;overscroll-behavior:contain;box-shadow:0 5px 12px #0003;
}
.drums-workshop .sticking-manual {
 padding:8px;min-width:min(240px,calc(100vw - 16px));max-width:min(304px,calc(100vw - 16px))
}
.drums-workshop .sticking-rules {padding:4px;max-width:calc(100vw - 16px)}
html[data-drums-appearance=experimental2] .drums-workshop :is(.sticking-manual,.sticking-rules) {background:#25272b;border-color:#59616d}
.drums-workshop .sticking-manual-heading {
 display:block;padding-bottom:6px;margin-bottom:4px;border-bottom:1px solid var(--site-line);font-size:14px;font-weight:600
}
.drums-workshop .sticking-manual-progress,
.drums-workshop .sticking-manual-hint {contain:inline-size;overflow-wrap:anywhere;color:var(--site-muted)}
.drums-workshop .sticking-manual-progress {font-size:13px;min-height:37px;padding:5px 0;margin:0}
.drums-workshop .sticking-manual-hint {font-size:12px;margin:8px 0 0}
.drums-workshop .sticking-manual-hint kbd {font:inherit;color:var(--site-ink)}
.drums-workshop :is(.sticking-manual-buttons,.sticking-manual-footer) {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.drums-workshop .sticking-manual-footer {justify-content:flex-end;margin-top:8px;padding-top:8px;border-top:1px solid var(--site-line)}
html[data-drums-appearance=experimental2] .drums-workshop :is(.sticking-manual-heading,.sticking-manual-footer) {border-color:#414750}
.drums-workshop .sticking-manual button {
 box-sizing:border-box;min-height:32px;padding:0 8px;border:1px solid var(--site-line);border-radius:8px;font:inherit;font-size:14px
}
.drums-workshop .sticking-manual button.sticking-side {width:32px;min-width:32px;height:32px;padding:0;font-weight:600}
html[data-drums-appearance=experimental2] .drums-workshop .sticking-manual-done {--interaction-surface:#3b4f69;border-color:#59616d}
.drums-workshop .sticking-rules button {
 --interaction-surface:transparent;display:block;box-sizing:border-box;min-height:32px;width:100%;
 padding:4px 8px;border:0;border-radius:6px;font:inherit;font-size:14px;text-align:start
}
.drums-workshop .sticking-rules button:hover {--interaction-surface:var(--interaction-hover-bg)}
.drums-workshop :is(.sticking-manual,.sticking-rules) button:focus-visible {outline:2px solid #a8caff;outline-offset:-2px}
.drums-workshop .editor .cell[data-sticking-current=true][data-quick-selected=true]::after {
 inset:0;border:2px solid #a8caff;box-shadow:inset 0 0 0 1px #202226
}
@media(pointer:coarse){
 .drums-workshop .sticking-manual button {min-height:44px;border-radius:10px}
 .drums-workshop .sticking-manual button.sticking-side {width:44px;min-width:44px;height:44px}
 .drums-workshop .sticking-rules button {min-height:44px}
}
.drums-workshop .editor .cell[data-sticking-draft=true]>.sticking-cell-label:not(.sticking-draft-label) {visibility:hidden}
.drums-workshop #editor-panel .cell>.sticking-draft-label {visibility:visible;color:inherit}

.drums-workshop :is(#quick-selection-panel,.note-property-menu) [data-property-group="diddle-placement"] .quick-property-choices {
 flex-wrap: wrap;
}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) [data-property-group="diddle-placement"] button.quick-property-choice {
 width: auto;
 max-width: 100%;
 min-height: 32px;
 height: auto;
 padding: 4px 8px;
}
@media (pointer:coarse) {
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) [data-property-group="diddle-placement"] button.quick-property-choice {
  min-height: 44px;
 }
}

/* Ornament choices use the established note-menu cells and do not size the parent. */
.drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice.note-ornament-duration {
 width:68px;min-width:68px;max-width:68px;gap:4px;
}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .note-ornament-duration-option {max-width:none;width:auto}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .note-ornament-glyph {font-size:19px;line-height:1}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices.note-ornament-duration-choices {
 position:fixed;z-index:1;box-sizing:border-box;display:flex;flex-wrap:nowrap;gap:4px;padding:4px;
 overflow:auto;background:var(--workshop-paper);border:1px solid var(--site-line);border-radius:7px;
 box-shadow:0 5px 24px #252a2720;
}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices.note-ornament-duration-choices[hidden]{display:none}
.drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices.note-ornament-duration-choices[data-axis=vertical]{flex-direction:column}
@media(pointer:coarse){
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) button.quick-property-choice.note-ornament-duration {width:96px;min-width:96px;max-width:96px}
 .drums-workshop :is(#quick-selection-panel,.note-property-menu) .quick-property-choices.note-ornament-duration-choices{gap:8px}
}
