html body.bird-v1 .compact-melody{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--panel);margin:14px 0}
html body.bird-v1 .compact-melody #chords{display:flex;gap:6px;overflow-x:auto;margin:10px 0;padding:0 0 6px}
html body.bird-v1 .compact-melody #chords .chord{flex:0 0 auto;width:96px;min-height:70px;padding:7px 9px;border-radius:9px}
html body.bird-v1 .compact-melody #chords .chord strong{font-size:17px;line-height:1.3}
html body.bird-v1 .compact-melody #chords .root{font-size:12px;margin-top:3px}
.compact-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.compact-toolbar label{display:flex;gap:7px;align-items:center;margin:0;font-size:14px}.compact-toolbar select{width:auto;max-width:190px;margin:0;padding:7px}.compact-spacer{flex:1}.compact-toolbar button{min-width:36px;padding:6px 10px}
html body.bird-v1 .compact-melody #roll{height:220px!important;overflow-x:auto;overflow-y:hidden;margin:8px 0;background:#121c28;border:1px solid #54738b;border-radius:7px;touch-action:pan-x}
html body.bird-v1 .compact-melody #roll svg{height:200px;width:100%;display:block;cursor:pointer}
.compact-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px;align-items:end}.compact-fields label{display:grid;gap:5px;margin:0;font-size:14px;color:var(--white)}.compact-fields input{width:100%;min-width:0;margin:0;padding:8px 10px;min-height:40px;font-size:16px}.compact-fields button{min-height:40px;padding:8px 12px;font-size:14px}.compact-help,.compact-status{font-size:14px;line-height:1.5;margin:7px 0;color:var(--muted)}.compact-status{color:var(--white);min-height:21px}.compact-melody .roll-head{margin:8px 0}.compact-melody .keys-bar-buttons{display:none}
@media(max-width:600px){.compact-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-fields button{grid-column:1/-1}.compact-toolbar label{flex:1}.compact-toolbar select{max-width:160px}.compact-melody .roll-head .legend{display:none}}

.quick-chord-panel{display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;margin:4px 0 10px}.quick-chord-panel[hidden]{display:none}.quick-chord-panel>strong{align-self:center;font-size:14px}.quick-chord-panel label{display:grid;gap:4px;margin:0;flex:1;min-width:115px;font-size:14px}.quick-chord-panel select{width:100%;padding:7px;margin:0}.quick-chord-panel button{padding:8px 12px}.quick-chord-panel p{width:100%;font-size:14px;margin:0;line-height:1.5;color:var(--muted)}.compact-melody #chords .quick-selected{outline:2px solid var(--lime);outline-offset:-2px}

/* Keep a single scroll viewport even for long songs and on narrow screens. */
html body.bird-v1 .compact-melody{overflow-x:visible;min-width:0}
html body.bird-v1 .compact-melody>summary,html body.bird-v1 .compact-melody>.roll-head,html body.bird-v1 .compact-melody>#roll{min-width:0!important}

/* Shared non-Studio harmonic choices; inherit all twenty theme palettes. */
html body.bird-v1 dialog.melody-chord-popover{position:fixed;inset:0;width:min(660px,calc(100vw - 24px));max-height:min(720px,calc(100dvh - 24px));margin:auto;padding:18px;overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--white);box-shadow:0 20px 70px #0009}
.melody-chord-popover::backdrop{background:#0009}.melody-chord-popover header{display:flex!important;position:static;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px;padding:0;background:none;border:0}.melody-chord-popover header strong{font-size:18px}.melody-chord-popover label{display:flex;align-items:center;gap:10px;font-size:14px}.melody-chord-popover select{width:auto;margin:0;padding:8px}.melody-chord-context,.melody-chord-message{font-size:14px;line-height:1.6;color:var(--muted);margin:12px 0}.melody-chord-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.melody-chord-options button{display:flex;flex-direction:column;gap:5px;text-align:left;white-space:normal;padding:12px;min-width:0;background:var(--bg);color:var(--white);border:1px solid var(--line);border-radius:9px}.melody-chord-options b{font-size:18px}.melody-chord-options small{font-size:14px;line-height:1.5;color:inherit;overflow-wrap:anywhere}.melody-chord-popover footer{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding:0;border:0}.melody-chord-popover button:focus-visible{outline:3px solid var(--lime);outline-offset:2px}.melody-chord-popover button:hover{border-color:var(--lime)}
html body.bird-v1 .recommendation-only :is(.edit-fields,.inline-check,.chord-half-picker,#root-compatibility){display:none!important}.recommendation-hint{font-size:14px;line-height:1.6}.local-chord-bars button{min-height:44px}.local-chord-help{font-size:14px;line-height:1.6}[data-melody-chord-bar]{cursor:pointer}[data-melody-chord-bar]:focus{outline:none}[data-melody-chord-bar]:focus rect,[data-melody-chord-bar]:hover rect{fill:#ffffff24}
@media(max-width:480px){.melody-chord-options{grid-template-columns:1fr}html body.bird-v1 dialog.melody-chord-popover{padding:14px}}
