.chord-library-subtabs,.chord-picker-tabs{display:flex;gap:3px;padding:4px;background:#eee;border-radius:13px;margin:0 0 15px}
.chord-library-subtabs button,.chord-picker-tabs button{flex:1;min-width:0;padding:7px 6px;min-height:36px;border:1px solid transparent;border-radius:10px;background:transparent;color:#777;font-size:13px;line-height:20px;white-space:nowrap;box-shadow:none}
.chord-library-subtabs button.active,.chord-picker-tabs button.active{background:#fff;color:#111;box-shadow:0 2px 7px #00000008;border-color:#e9e9e9}
.chord-design-card{position:relative;border:1px solid #e5e5e5;border-radius:18px;background:#fff;padding:10px 12px 12px;box-shadow:0 3px 12px #00000003}
.chord-design{--chord-action-size:35px;--chord-actions-width:var(--chord-action-size)}
.chord-design.has-confirm{--chord-actions-width:calc(var(--chord-action-size)*2 + 6px)}
.chord-name-row{display:grid;grid-template-columns:var(--chord-actions-width) minmax(0,1fr) var(--chord-actions-width);align-items:center;column-gap:6px}
.chord-name-row .chord-design-name{grid-column:2;min-width:0;padding-left:4px;padding-right:4px}
.chord-name-actions{grid-column:3;display:flex;justify-content:flex-end;align-items:center;gap:6px}
.chord-name-actions .chord-circle{width:var(--chord-action-size);height:var(--chord-action-size);min-width:var(--chord-action-size);min-height:var(--chord-action-size)!important;padding:7px}
.chord-design .chord-confirm:not(:disabled){background:#171717;color:#fff;border-color:#171717}
.chord-design .chord-confirm:not(:disabled):hover{background:#343434;border-color:#343434}
.chord-design .chord-design-name{display:block;width:100%;max-width:100%;margin:0;padding:7px 12px;text-align:center;font-size:18px;font-weight:650;border:1px solid transparent;border-radius:9px;background:transparent;color:#111;box-shadow:none}
.chord-design .chord-design-name:hover{background:#fafafa;border-color:#eee}
.chord-design .chord-design-name:focus{border-color:#bbb;background:#fff;box-shadow:0 0 0 3px #11111105;outline:none}
.chord-design-name::placeholder{font-weight:400;color:#aaa;font-size:14px}
.chord-design .chord-design-name[aria-invalid=true]{border-color:#bc3b37!important;box-shadow:0 0 0 3px #bc3b370d!important}
.chord-name-error{margin:6px 4px 0;color:#b32e2a;font-size:12px;text-align:center}
.chord-add-feedback{margin:6px 4px 0;font-size:12px;color:#555;line-height:1.4;text-align:center}.chord-add-feedback.error{color:#b32e2a}
.chord-name-error[hidden],.chord-add-feedback[hidden]{display:none!important}
.chord-design-diagram{max-width:300px;margin:8px auto 0;touch-action:none;user-select:none;-webkit-user-select:none}
.chord-design-svg{display:block;width:100%;height:auto;overflow:visible}
.chord-grid-line{stroke:#777;stroke-width:1.2}.chord-grid-line.chord-nut{stroke:#111;stroke-width:3}
.chord-fret-number{fill:#111;font-size:25px;font-weight:700}.chord-string-number{fill:#777;font-size:14px}.chord-offscreen-fret{fill:#777;font-size:13px}
.chord-finger{fill:#111}.chord-barre{stroke:#111;stroke-width:13;stroke-linecap:round}.chord-barre-preview{stroke:#777;stroke-width:17;stroke-linecap:round;stroke-opacity:.5;pointer-events:none}
.chord-fret-target{fill:transparent;cursor:pointer;outline:none;rx:6}.chord-fret-target:hover{fill:#00000006}.chord-fret-target:focus-visible{stroke:#666;stroke-width:1.5;fill:#00000008}
.chord-mute-target{cursor:pointer;outline:none}.chord-mute-target rect{fill:transparent;stroke:transparent}.chord-mute-target text{fill:#111;font-size:26px;opacity:0;pointer-events:none}.chord-mute-target.muted text{opacity:1}.chord-mute-target:not(.muted):hover text{opacity:.3}.chord-mute-target:hover rect{fill:#f7f7f7}.chord-mute-target:focus-visible rect{stroke:#777;stroke-width:1.5}.chord-mute-target:focus-visible:not(.muted) text{opacity:.3}
.chord-view-step{cursor:pointer;outline:none}.chord-view-step rect{fill:transparent;stroke:transparent}.chord-view-step path{fill:none;stroke:#555;stroke-width:1.8;stroke-linecap:round;pointer-events:none}.chord-view-step:hover rect{fill:#f7f7f7;stroke:#ddd}.chord-view-step:focus-visible rect{stroke:#777;stroke-width:1.5}.chord-view-step.disabled{opacity:.2;cursor:default}
.chord-circle{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:35px;height:35px;min-height:35px!important;padding:7px;border:1px solid #e5e5e5;border-radius:50%;background:#fafafa;color:#222;box-shadow:0 1px 4px #00000004;cursor:pointer}
.chord-circle svg{display:block;width:18px;height:18px;flex:none}.chord-circle:hover:not(:disabled){background:#eee;border-color:#ccc;transform:translateY(-1px)}.chord-circle:active:not(:disabled){transform:scale(.94)}.chord-circle:disabled{opacity:.4;cursor:default}
.chord-design .chord-add-library{background:#171717;color:#fff;border-color:#171717;opacity:1;box-shadow:0 2px 6px #00000010}
.chord-design .chord-add-library:hover{background:#343434;border-color:#343434}
.chord-design .chord-add-library:focus-visible{outline:2px solid #777;outline-offset:3px}
.chord-design .chord-add-library[aria-busy=true]{cursor:progress}
.chord-design .chord-add-library .chord-add-plus{background:#171717;box-shadow:0 0 0 1px #fff}
.chord-design .chord-add-library[aria-disabled=true],.chord-design .chord-add-library[aria-disabled=true]:hover,.chord-design .chord-add-library[aria-disabled=true]:active{background:#f0f0f0;color:#aaa;border-color:#e8e8e8;box-shadow:none;transform:none;cursor:default}
.chord-design .chord-add-library[aria-disabled=true] .chord-add-plus{background:#f0f0f0;box-shadow:0 0 0 1px white}
.chord-add-plus{position:absolute;right:0;bottom:0;font:bold 12px/13px sans-serif;background:#fff;width:13px;height:13px;border-radius:50%;text-align:center;box-shadow:0 0 0 1px #e5e5e5}
.chord-recognition{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0 0}
.chord-match{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;min-height:31px!important;padding:6px 9px;border:1px solid #e4e4e4;border-radius:10px;background:#fff;color:#222;box-shadow:none;text-align:left;white-space:normal;overflow-wrap:anywhere}
.chord-match strong{min-width:0}.chord-match small{min-width:0}
.chord-match:hover{border-color:#aaa;background:#f5f5f5}.chord-match strong{font-size:12px}.chord-match small{font-size:10px;font-weight:400;color:#777}.chord-match-exact{display:inline-flex;color:#888}.chord-match-exact svg{width:13px;height:13px}
.chord-library-search{position:relative;display:flex!important;align-items:center!important;gap:7px;min-width:0;border:1px solid #e3e3e3;border-radius:12px;background:#fff;padding:0 10px!important;margin:0 0 10px!important;box-shadow:none}
.chord-library-search>svg{display:block;flex:none;color:#777;width:16px;height:16px}
.chord-library-search input{appearance:none;-webkit-appearance:none;flex:1;min-width:0!important;width:100%;height:38px;padding:7px 0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;outline:none!important;background:transparent!important;font-size:13px!important;line-height:20px}
.chord-library-search:focus-within{border-color:#aaa;box-shadow:0 0 0 3px #11111104}.chord-library-search input::-webkit-search-cancel-button,.chord-library-search input::-webkit-search-decoration{appearance:none;-webkit-appearance:none}
.chord-library-search[hidden],.chord-category-tabs[hidden]{display:none!important}
.chord-category-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0;overflow:visible;padding:2px 0 8px;margin:0 0 6px}
.chord-category-tabs button{flex:none;min-height:29px!important;padding:5px 9px;border:1px solid #e6e6e6;border-radius:20px;background:#fff;color:#777;font-size:11px;line-height:1.4;white-space:nowrap;box-shadow:none}
.chord-category-tabs button.active{background:#222;border-color:#222;color:white}.chord-category-tabs button:hover:not(.active){border-color:#aaa;color:#222}
.chord-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:440px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ddd transparent;padding:1px}
.chord-library-grid .chord-library-item{display:block;min-width:0;padding:9px 4px 5px;border:1px solid #e3e3e3;border-radius:12px;background:#fff;color:#111;box-shadow:0 2px 6px #00000002;transition:background .12s,border-color .12s,transform .12s}
.chord-library-item:hover{border-color:#aaa!important;background:#fafafa!important;transform:translateY(-1px)}.chord-library-item:active{transform:scale(.97)}
.chord-library-item strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650;text-align:center}
.chord-library-item>svg{display:block;width:100%;height:auto;margin:4px auto 0;max-height:150px}
.chord-library-empty{grid-column:1/-1;padding:25px 12px;text-align:center;color:#999;font-size:12px}
#score-popover[data-kind=chord]{width:350px;max-width:calc(100vw - 16px);padding:12px;max-height:calc(var(--visible-height,100dvh) - 16px);overflow:auto;scrollbar-width:thin}
#score-popover[data-kind=chord] .compact-toolbar{margin-bottom:10px}
#score-popover .chord-picker-tabs{margin-bottom:12px;gap:2px}
#score-popover .chord-picker-tabs button{font-size:12px;padding:8px 5px}
#score-popover .chord-design-card{padding:8px 12px 10px;box-shadow:none}
#score-popover .chord-design-diagram{max-width:248px}
#score-popover .chord-library-grid{max-height:330px}
#score-popover .chord-library-item>svg{max-height:135px}
#score-popover .chord-picker-editor[hidden],.chord-create-panel[hidden],.chord-presets-panel[hidden],.chord-recognition[hidden]{display:none!important}
@media(max-width:760px){.chord-library-subtabs button,.chord-picker-tabs button{min-height:40px}.chord-design .chord-design-name{font-size:18px!important}.chord-library-search input{height:42px;font-size:16px!important}.chord-circle{width:39px;height:39px;min-height:39px!important}.chord-category-tabs button{min-height:33px!important}.chord-library-grid{max-height:none}.chord-design-diagram{max-width:280px}#score-popover .chord-library-grid{max-height:35dvh}#score-popover .chord-design-diagram{max-width:245px}}
@media(prefers-reduced-motion:reduce){.chord-circle,.chord-library-item{transition:none;transform:none!important}}
@media(max-width:760px){.chord-design{--chord-action-size:39px}#score-popover[data-kind=chord]{max-height:calc(var(--visible-height,100dvh) - 16px - env(safe-area-inset-bottom))}}
