/* Shared actions use one visual grammar; colour is scoped to its meaning. */
.quiet-transport .history-actions { display: inline-flex; }
.quiet-transport .history-actions > button { display: inline-flex; min-width: 59px; }
.quiet-transport .history-actions > button:first-child .icon { display: block; }
.quiet-transport .history-actions .icon { width: 14px; height: 14px; }
.pattern-actions { display: flex; align-items: center; gap: 3px; padding-left: 7px; border-left: 1px solid var(--border); }
.editor-panel .pattern-actions button { min-height: 32px; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
.pattern-actions .icon { width: 14px; height: 14px; }
.editor-heading { flex-wrap: wrap; row-gap: 7px; }
.colour-mode { white-space: nowrap; font-size: 10px; gap: 5px; }
.colour-mode .icon { width: 13px; height: 13px; }
.workflow-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.workflow-fields input,.workflow-fields select { width: 100%; }
.workflow-choice { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.workflow-choice button { flex: 1; min-width: 120px; min-height: 42px; border: 1px solid var(--border); }
.workflow-choice button[aria-pressed=true] { background: var(--selection-bg); color: var(--selection); border-color: var(--selection); }
.workflow-result { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font: 12px/1.6 var(--sans); }
.workflow-result:empty { display: none; }
.workflow-result .error { margin: 0; }
.workflow-result ul { padding-left: 18px; color: var(--muted); margin: 10px 0 0; }
.pattern-path { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.pattern-path span { padding: 10px 13px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); font: 12px var(--mono); }
.pattern-path .icon { color: var(--selection); }
.strum-rhythm-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.strum-rhythm-card { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: left; padding: 13px; border: 1px solid var(--border); background: var(--bg); border-radius: 8px; }
.strum-rhythm-card[aria-pressed=true] { border-color: var(--selection); background: var(--selection-bg); }
.strum-rhythm-card strong { font-size: 12px; }
.strum-rhythm-slots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.strum-rhythm-slots span { display: flex; align-items: center; flex-direction: column; gap: 3px; font: 600 19px var(--sans); color: var(--selection); }
.strum-rhythm-slots small { font: 9px var(--mono); color: var(--muted); }
.strum-rhythm-slots .rest { color: var(--muted); opacity: .45; }
.sound-feel-panel .rhythm-entry { margin-top: 9px; font-size: 11px; }
.colour-examples { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 16px 0; }
.colour-examples span { display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--border); border-radius: 7px; padding: 11px; font-size: 11px; color: var(--muted); }
.colour-examples strong { color: var(--note-color,var(--ink)); font: 600 18px var(--mono); }
.colour-key-hint { font-size: 12px; }
.home-activity-piano { fill: var(--piano); }
@media(max-width:1100px) { .editor-panel .pattern-actions button { font-size: 10px; padding-inline: 5px; } .editor-heading .pill { display: none; } }
@media(max-width:700px) { .workflow-fields { grid-template-columns: 1fr; gap: 0; } .strum-rhythm-list { grid-template-columns: 1fr; } .pattern-actions { order: 5; padding-left: 0; border: 0; } .quiet-transport .history-actions > button { min-width: 32px; font-size: 0; } .quiet-transport .history-actions > button .icon { display: block; } .colour-examples { gap: 5px; } }

/* Project and export choices share a compact, scannable action row. */
#dialog .dialog-choice-list { display:grid; gap:8px; }
#dialog .dialog-choice { display:flex; align-items:center; gap:13px; width:100%; padding:13px 15px; border:1px solid var(--border); border-radius:8px; background:var(--canvas); text-align:left; white-space:normal; }
#dialog .dialog-choice:hover { border-color:var(--accent); background:var(--surface); }
#dialog .dialog-choice:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.dialog-choice-icon { display:grid; place-items:center; width:35px; height:35px; flex-shrink:0; border-radius:8px; background:var(--surface); color:var(--accent); }
.dialog-choice-icon .icon { width:19px; height:19px; }
.dialog-choice-copy { display:flex; flex-direction:column; gap:4px; flex:1; min-width:0; }
.dialog-choice-copy strong { font-size:13px; font-weight:600; }
.dialog-choice-copy small { color:var(--muted); font-size:11px; line-height:1.5; }
.dialog-choice > .icon { width:14px; color:var(--muted); flex-shrink:0; }
.format-badge { font:10px var(--mono); color:var(--muted); padding:5px 7px; border:1px solid var(--border); border-radius:5px; flex-shrink:0; }
#dialog .dialog-disclosure { margin-top:17px; border-top:1px solid var(--border); padding-top:13px; }
#dialog .dialog-disclosure > summary { color:var(--muted); font-size:11px; cursor:pointer; }
.dialog-disclosure > .dialog-choice-list { margin-top:12px; }
#dialog p.project-storage-hint,#dialog p.export-mix-note { display:flex; align-items:flex-start; gap:8px; margin:15px 0 0; font-size:11px; }
.project-storage-hint .icon,.export-mix-note .icon { flex-shrink:0; width:14px; height:14px; margin-top:2px; }
#dialog p.export-scope { font:11px var(--mono); margin-bottom:13px; }
.format-details { display:grid; grid-template-columns:54px 1fr; gap:9px 12px; color:var(--muted); font-size:11px; line-height:1.6; margin:13px 0 0; }
.format-details dt { color:var(--ink); font-weight:600; }
.format-details dd { margin:0; }
#dialog .pitch-key.lane-key { grid-template-columns:repeat(3,1fr); }
@media(max-width:480px) { #dialog .dialog-choice { padding:11px; gap:9px; } .format-badge { font-size:9px; padding:4px; } .dialog-choice-icon { width:30px; height:32px; } }

#dialog .note-colour-options label { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

/* Selected-note actions are named; deeper timing spans the full toolbar. */
.editor-panel .compose-controls .selection-actions { gap:6px; }
.editor-panel .compose-controls .selection-actions .selection-done { width:auto; min-width:44px; padding-inline:7px; color:var(--muted); font-size:11px; }
.editor-panel .compose-controls #context-length { width:108px; }
.note-actions { position:relative; font-size:11px; }
.note-actions > summary { display:flex; align-items:center; gap:6px; list-style:none; min-height:34px; padding:6px 9px; border:1px solid var(--border); border-radius:6px; color:var(--ink); cursor:pointer; }
.note-actions > summary::-webkit-details-marker { display:none; }
.note-actions > summary .icon { width:12px; height:12px; }
.note-actions[open] > summary { background:var(--surface); }
.note-actions-list { position:absolute; right:0; top:calc(100% + 5px); z-index:10; width:220px; max-width:calc(100vw - 48px); padding:5px; border:1px solid var(--border); border-radius:8px; background:var(--panel); box-shadow:var(--shadow); }
.editor-panel .compose-controls .note-actions-list .note-action-item { display:flex; align-items:center; gap:9px; width:100%; height:auto; min-height:36px; padding:8px; text-align:left; color:var(--ink); font-size:12px; }
.note-actions-list kbd { margin-left:auto; color:var(--muted); font:10px var(--mono); }
.editor-panel .compose-controls .note-actions-list .note-action-item:last-child { margin-top:4px; border-top:1px solid var(--border); border-radius:0 0 5px 5px; }
.editor-panel .compose-controls .note-actions-list .note-action-item:disabled { opacity:.4; }
.editor-panel .compose-controls .mixed-toggle { border:1px dashed var(--muted); color:var(--ink); }
.editor-panel .compose-controls .mixed-toggle::before { content:'−'; font-size:12px; }
.compose-controls .note-advanced-body input::placeholder { color:var(--muted); font-size:11px; opacity:1; }

/* The pattern preview distinguishes scope from replacement consequences. */
.pattern-path>.pattern-range{display:flex;flex:1;flex-direction:column;gap:4px;padding:10px 13px;border:1px solid var(--border);border-radius:7px;background:var(--bg);min-width:0}
.pattern-range small{font-size:10px;color:var(--muted)}
.pattern-range strong{font:600 14px var(--mono);overflow-wrap:anywhere}
.pattern-path>.icon{flex-shrink:0}
.pattern-replace{padding:8px 10px;border-left:3px solid var(--playing-caution,var(--selection));background:color-mix(in srgb,var(--playing-caution,var(--selection)) 9%,transparent);border-radius:3px;font-weight:600}
.pattern-empty{color:var(--muted)}
.pattern-summary .pattern-effect{font-size:11px;margin:8px 0 0;color:var(--muted)}
.pattern-other-parts{display:block;color:var(--muted);font-size:10px;margin-top:8px}
.workflow-fields input[aria-invalid=true]{border-color:var(--playing-clash,#bc5064)}

/* Explain transformations before selection; keep the rhythm key beside its choices. */
.meter-choices button{flex-direction:column;align-items:flex-start;text-align:left;gap:4px;padding:10px 12px}
.meter-choices strong{font-size:12px;font-weight:600}
.meter-choices small{font-size:10px;color:var(--muted);font-weight:400}
.strum-stroke-key{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:10px 0;color:var(--muted);font-size:11px}
.strum-stroke-key>span{display:inline-flex;align-items:center;gap:6px}
.strum-stroke-key strong{font:600 18px var(--sans);color:var(--ink);line-height:1}

/* The same download surface serves quick music copies and complete song transfers. */
.save-copy-title { margin:0 0 14px; color:var(--ink); font-weight:600; overflow-wrap:anywhere; }
#dialog .save-copy-complete { border-color:var(--accent); }
.save-copy-complete .dialog-choice-icon { color:var(--accent); }
.save-copy-recommended { display:inline-block; margin-left:8px; font-size:10px; font-weight:500; color:var(--muted); }
.save-copy-status { margin:14px 0 0; min-height:1.5em; }
.save-copy .dialog-disclosure { margin-top:16px; }
