:root {
    --accent: #43dfe7;
    --accent-soft: rgba(67, 223, 231, 0.16);
    --accent-warm: #ffb366;
    --accent-warm-soft: rgba(255, 179, 102, 0.16);
    --border-subtle: #ececf71f;
    --editable-text-surface-bg: transparent;
    --editable-text-surface-hover-bg: color-mix(in srgb, var(--text-primary) 3%, transparent);
    --editable-text-surface-focus-bg: transparent;
    --editable-text-surface-border: transparent;
    --editable-text-surface-hover-border: color-mix(in srgb, var(--text-primary) 8%, transparent);
    --editable-text-surface-focus-border: #43dfe7;
    --editable-text-surface-hover-shadow: none;
    --editable-text-surface-focus-shadow: none;
    --editable-text-surface-transition:
        background-color 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        color 150ms ease;
    --chord-action-button-icon-size: calc(2rem * 2 / 3);
    --chord-action-button-size: 44px;
    --chord-hover-button-size: 36px;
    --chord-card-height-u: 10;
    --chord-card-width-u: 6.2;
    --chord-edit-scale: 1;
    --chords-gutter: clamp(0rem, 0.6vw, 0.35rem);
    --chords-max: 100%;
    --color-bg: #2a282d;
    --color-fg: #efeffc;
    --delete-btn-nudge-up: 1em;
    --delete-btn-nudge-x: 1em;
    --diagram-dot-size: .5;
    --diagram-footer-offset: .05;
    --diagram-footer-row-h: .2;
    --diagram-fret-label-col-w: .37;
    --diagram-fret-label-font-scale: .45;
    --diagram-fret-label-translate-x: -.1;
    --diagram-fret-label-translate-y: .0;
    --diagram-fretline-width: .1;
    --diagram-header-font-scale: .5;
    --diagram-header-gap: .5em;
    --diagram-header-offset: .2;
    --diagram-header-row-h: .2;
    --diagram-interval-font-scale: .72;
    --diagram-interval-max-scale: 1.36;
    --diagram-nut-bump: .1;
    --diagram-nutline-width: .2;
    --diagram-row1-h: 1;
    --diagram-row2-h: 1.07;
    --diagram-row3-h: 1.09;
    --diagram-row4-h: 1.09;
    --diagram-row5-h: 1.09;
    --diagram-string-gap: .7;
    --diagram-string-width: .1;
    --diagram-base-u: 1.75rem;
    --diagram-u: var(--diagram-base-u);
    --main-surface-chord-scale: 1.2;
    --focus-ring: #43dfe78c;
    --font-base: var(--font-ui, 'Inter', sans-serif);
    --font-inter: var(--font-ui, 'Inter', sans-serif);
    --font-label: 'Roboto Condensed', sans-serif;
    --font-chord: NunitoChord, var(--font-base);
    --font-weight-medium: 500;
    --font-weight-regular: 400;
    --fz-12: .75rem;
    --fz-14: .875rem;
    --fz-15: .9375rem;
    --fz-16: 1rem;
    --fz-18: 1.125rem;
    --fz-20: 1.25rem;
    --fz-22: 1.375rem;
    --fz-28: 1.75rem;
    --fz-17: 1.0625rem;
    --lh-tight: 1.2;
    --lh-snug: 1.3;
    --lh-normal: 1.55;
    --lh-relaxed: 1.65;
    --radius-component: 8px;
    --radius-card: 12px;
    --radius-m: 12px;
    --radius-pill: 999px;
    --radius-xs: .5rem;
    --radius-xxs: .25rem;
    --root-dot-color: #43dfe7;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-micro: 0.25rem;
    --space-xs: 0.5rem;
    --space-s: 0.75rem;
    --space-m: 1rem;
    --space-l: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --surface-elevated: #2a282d;
    --bs-link-color: #00B499;
    --tooltip-gap: 0.65rem;
    --tooltip-max-ch: 36;
    --tooltip-offset-x: 0px;
    --tooltip-offset-y: 0px;
    --tooltip-caret-x: 0px;
    --text-on-accent: #0e1b1b;
    --text-primary: #f5f4ee;
    --text-secondary: #ececf7;
    --chord-grid-max-columns: 8;
    --workspace-chord-grid-gap: calc(0.12rem * var(--space-C));
    --workspace-chord-grid-gap-max: calc(var(--workspace-chord-grid-gap) * 2);
    /* Shadows */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-standard: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.35);
    /* Spacing */
    /* Surface */
    --surface: #2a282d;
}

/* Horizontal spacing map (A–E)
A: body>.row padding-inline clamp(0.5rem, 1vw, 1.25rem) -> calc(clamp(0.5rem, 1vw, 1.25rem) * var(--space-AandE)); main.container/.container max-width 98% (plus translateX(0.4em) nudge) -> calc(98% + (2% * (1 - var(--space-AandE)))); .row max-width 99% -> calc(99% + (1% * (1 - var(--space-AandE)))).
B: .group padding-inline defaults to 0.5em with .group.group.mb-4 overriding left/right to var(--space-4) (1rem) and @media (min-width:768px) padding 1.25rem -> padding-inline scaled by var(--space-BandD).
C: #groups-root .chord-grid column-gap 0.12rem -> calc(0.12rem * var(--space-C)); grid justify-content:center and grid-template-columns repeat(auto-fill, minmax(min(calc(var(--diagram-u) * var(--chord-card-width-u)), 100%), 1fr)) keep cards centered with auto-fill column sizing.
D: Mirrors B trailing edge via the same group padding-inline calc(... * var(--space-BandD)).
E: Mirrors A via body>.row/container width controls -> same var(--space-AandE) calcs.
*/

/* Chord Grid Width Variables A–E Modifiers
A: Viewport edge → group outer border (page/container paddings and any group margins).
B: Group inner border → outer edge of the first chord card in the first row (group padding, grid container padding, leading gaps).
C: Gaps between adjacent chord cards within a row (grid column-gap or card horizontal margins).
D: Outer edge of the last chord card → group inner border (trailing gaps symmetrical to B).
E: Group outer border → viewport edge (symmetrical to A).
Total width = A + B + (N × C) + D + E
*/

/* Horizontal space multipliers */
:root {
    --space-AandE: .2;
    /* Horizontal space between A: Viewport edge → group outer border */
    --space-BandD: .2;
    /* Horizontal space between B: Group inner border → outer edge of the first chord card and D: Outer edge of the last chord card → group inner border */
    --space-C: .5;
    /* Horizontal space between C: Gaps between adjacent chord cards within a row */
}

/* Vertical spacing map (V1–V7)
V1: .group padding-block-end 0.5em (>=768px var(--space-5)=1.25rem) -> calc(0.5em * var(--spaceV-1)) / calc(var(--space-5) * var(--spaceV-1)).
V2: .chord-card padding-block-end 0.12rem -> calc(0.12rem * var(--spaceV-2)).
V3: header row .position-relative.mb-1 margin-bottom 0.25rem (Bootstrap mb-1) -> calc(0.25rem * var(--spaceV-3)).
V4: .chord-title padding-top 2em plus chord-card padding-block-start 0.12rem -> calc(2em * var(--spaceV-4)) and calc(0.12rem * var(--spaceV-4)).
V5: .group-header gap 2em and .group-buttons controls height 32px/padding var(--space-1) -> gap/height/padding scaled by var(--spaceV-5).
V6: .group padding-block-start 0.5em (>=768px var(--space-5)=1.25rem) -> calc(0.5em * var(--spaceV-6)) / calc(var(--space-5) * var(--spaceV-6)).
V7: .group.mb-4 margin-bottom 1.5rem (Bootstrap mb-4) -> calc(1.5rem * var(--spaceV-7)).
*/

/* Chord Grid Height Variables V1–V7 Modifiers
V1: group inner bottom → card bottom
V2: card bottom → diagram bottom
V3: diagram top-of-nut → title bottom
V4: title top → card top
V5: .group-header.mb-2 height (via padding/gaps)
V6: group inner top → header top
V7: vertical gap between adjacent groups
*/
:root {
    --spaceV-1: .6;
    /* group inner bottom padding (or wrapper) */
    --spaceV-2: .8;
    /* under-diagram spacing inside card */
    --spaceV-3: .8;
    /* title↔diagram spacing */
    --spaceV-4: .8;
    /* card top interior spacing */
    --spaceV-5: 1;
    /* header vertical padding/gap */
    --spaceV-6: .1;
    /* group inner top padding (or header top margin) */
    --spaceV-7: .05;
    /* inter-group vertical gap */
    --min-height-multiplier: .76;
}

.editable-text-surface {
    background: var(--editable-text-surface-bg);
    border: 1px solid var(--editable-text-surface-border);
    box-shadow: none;
    transition: var(--editable-text-surface-transition);
}

.editable-text-surface:hover {
    background: var(--editable-text-surface-hover-bg);
    border-color: var(--editable-text-surface-hover-border);
    box-shadow: var(--editable-text-surface-hover-shadow);
}

.editable-text-surface:focus,
.editable-text-surface:focus-visible,
.edit-in-place-text.is-edit-in-place-focused .editable-text-surface {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    border-color: var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    outline: none;
}

.collection-workspace-body[data-route-surface-visible="false"] .page-title-group,
.collection-workspace-body[data-route-surface-visible="false"] .collection-sidebar-shell,
.collection-workspace-body[data-route-surface-visible="false"] #groups-root,
.collection-workspace-body[data-route-surface-visible="false"] #import-chords-area,
.collection-workspace-body[data-route-surface-visible="false"] #empty-msg {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.collection-workspace-body[data-route-surface-visible="true"] .page-title-group,
.collection-workspace-body[data-route-surface-visible="true"] .collection-sidebar-shell,
.collection-workspace-body[data-route-surface-visible="true"] #groups-root,
.collection-workspace-body[data-route-surface-visible="true"] #import-chords-area,
.collection-workspace-body[data-route-surface-visible="true"] #empty-msg {
    opacity: 1;
    visibility: visible;
}

.collection-workspace-body[data-collection-load-settled="false"] #empty-msg {
    display: none !important;
}

.collection-workspace-body .group-header {
    margin-top: 0.8em;
}

.collection-workspace-body .app-shell-main.container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.collection-workspace-body .app-shell-main>.row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
}

.collection-workspace-body .app-shell-main>.row>* {
    padding-left: 0;
    padding-right: 0;
}

.collection-workspace-layout {
    align-items: start;
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(232px, var(--collection-sidebar-width, 280px)) minmax(0, 1fr);
    margin-inline: 0;
    max-width: none;
    transition: grid-template-columns 180ms ease;
    width: 100%;
}

.collection-workspace-layout.is-sidebar-collapsed {
    gap: 0;
    grid-template-columns: minmax(0, 0px) minmax(0, 1fr);
}

.collection-workspace-main {
    min-width: 0;
    padding-right: clamp(0.85rem, 1.5vw, 1.25rem);
}

.collection-workspace-layout.is-sidebar-collapsed .collection-workspace-main {
    padding-left: clamp(0.85rem, 1.5vw, 1.25rem);
}

.collection-sidebar-shell {
    --collection-sidebar-sticky-top: calc(4.45rem + var(--space-s));
    align-self: start;
    bottom: 0;
    height: calc(100vh - var(--collection-sidebar-sticky-top) - 1px);
    min-height: min(360px, calc(100vh - var(--collection-sidebar-sticky-top) - 1px));
    position: sticky;
    top: var(--collection-sidebar-sticky-top);
    z-index: 4;
}

.collection-workspace-layout.is-sidebar-collapsed .collection-sidebar-shell {
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

.collection-sidebar-root,
.collection-sidebar-panel {
    height: 100%;
    min-height: 0;
}

.collection-sidebar-panel {
    background:
        radial-gradient(125% 70% at 0% 108%, color-mix(in srgb, var(--accent, #43dfe7) 34%, transparent), transparent 66%),
        radial-gradient(120% 72% at 100% 112%, color-mix(in srgb, var(--accent-warm, #ffb366) 30%, transparent), transparent 68%),
        linear-gradient(180deg, var(--surface, #2a282d) 0%, color-mix(in srgb, var(--surface, #2a282d) 94%, var(--accent, #43dfe7) 6%) 48%, color-mix(in srgb, var(--surface, #2a282d) 82%, var(--accent-warm, #ffb366) 18%) 100%);
    background-clip: padding-box;
    border: 1px solid var(--border-subtle);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    box-shadow: var(--shadow-subtle);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.collection-sidebar-panel__header {
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-s);
    justify-content: flex-start;
    min-height: 48px;
    padding: var(--space-s);
}

.collection-sidebar-panel__header-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: var(--space-1);
    margin-left: 0;
    width: 100%;
}

.collection-sidebar-panel__icon-action {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    box-sizing: border-box;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 32px;
    justify-content: center;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: relative;
    transition: background-color .15s ease, color .15s ease, transform .1s ease, border-color .15s ease, opacity .15s ease;
    width: 32px;
}

.collection-sidebar-shell:hover .collection-sidebar-panel__icon-action,
.collection-sidebar-shell:focus-within .collection-sidebar-panel__icon-action {
    opacity: 1;
    pointer-events: auto;
}

.collection-sidebar-panel__icon-action--add {
    color: #43dfe7;
}

.collection-sidebar-panel__icon-action--folder {
    margin-right: 0;
}

.collection-sidebar-panel__icon-action--folder-toggle {
    margin-left: 2em;
    margin-right: auto;
}

.collection-sidebar-panel__icon-action--delete {
    color: #d0a097;
}

.collection-sidebar-panel__icon-action--add:hover,
.collection-sidebar-panel__icon-action--add:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.collection-sidebar-panel__icon-action--delete:hover,
.collection-sidebar-panel__icon-action--delete:focus-visible,
.collection-sidebar-panel__icon-action--delete[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #ff6b6b;
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.collection-sidebar-panel__icon-action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.collection-sidebar-panel__icon-action .material-icons-outlined {
    font-size: 26px;
    line-height: 1;
}

.collection-sidebar-panel__title {
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: var(--fz-15);
    font-weight: 600;
    line-height: var(--lh-tight);
    margin: 0;
}

.collection-sidebar-panel__status {
    color: var(--text-secondary);
    font-size: var(--fz-12);
    line-height: var(--lh-normal);
    margin: 0;
    padding: var(--space-s);
}

.collection-sidebar-panel__status--guest-share {
    font-size: calc(var(--fz-12) * 2);
    line-height: 1.35;
}

.collection-sidebar-panel__status-action {
    background: none;
    border: 0;
    color: var(--accent-strong, var(--accent));
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    margin: 0;
    padding: 0;
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.14em;
}

.collection-sidebar-panel__status-action:hover,
.collection-sidebar-panel__status-action:focus-visible {
    color: var(--text-primary);
}

.collection-sidebar-panel__actions {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: 1fr;
    padding: var(--space-s);
}

.collection-sidebar-panel__action {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    font-size: var(--fz-14);
    gap: var(--space-2);
    min-height: 34px;
    padding: 0 var(--space-s);
    text-align: left;
}

.collection-sidebar-panel__action:hover,
.collection-sidebar-panel__action:focus-visible {
    background: rgba(67, 223, 231, 0.14);
    outline: none;
}

.collection-sidebar-panel__action .material-icons-outlined {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.collection-sidebar-panel__tree {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-top: 1em;
}

.collection-sidebar-node {
    align-items: center;
    box-sizing: border-box;
    color: var(--text-primary);
    display: flex;
    gap: 2px;
    height: 100%;
    min-width: 0;
    padding: 0 var(--space-2);
    position: relative;
}

.collection-sidebar-node.has-section-gap {
    padding-top: 14px;
}

.collection-sidebar-node__button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    min-width: 20px;
    padding: 0;
    width: 20px;
}

.collection-sidebar-node__button--copy {
    color: color-mix(in srgb, var(--accent, #43dfe7) 86%, white 14%);
}

.collection-sidebar-node__button--copy:hover,
.collection-sidebar-node__button--copy:focus-visible {
    background: rgba(67, 223, 231, 0.14);
    color: var(--text-primary);
    outline: none;
}

.collection-sidebar-node.is-folder .collection-sidebar-node__button {
    padding-left: 4px;
}

.collection-sidebar-node__label-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex: 1 1 auto;
    height: 28px;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    padding: 0 1.75rem 0 0.35em;
    text-align: left;
}

.collection-sidebar-node__rename {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--focus-ring);
    border-radius: 6px;
    color: var(--text-primary);
    flex: 1 1 auto;
    font-size: var(--fz-14);
    height: 28px;
    min-width: 0;
    padding: 0 var(--space-2);
}

.collection-sidebar-node__rename:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 1px;
}

.collection-sidebar-node:hover .collection-sidebar-node__label-button,
.collection-sidebar-node:focus-within .collection-sidebar-node__label-button,
.collection-sidebar-node.is-selected .collection-sidebar-node__label-button {
    background: rgba(67, 223, 231, 0.14);
    outline: none;
}

.collection-sidebar-node:hover .collection-sidebar-node__label-button,
.collection-sidebar-node:focus-within .collection-sidebar-node__label-button {
    border-color: rgba(67, 223, 231, 0.42);
    box-shadow: 0 0 0 1px rgba(67, 223, 231, 0.14);
}

.collection-sidebar-node.is-folder:hover .collection-sidebar-node__label-button,
.collection-sidebar-node.is-folder:focus-within .collection-sidebar-node__label-button {
    background: rgba(255, 255, 255, 0.07);
}

.collection-sidebar-node__icon {
    color: var(--text-secondary);
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.collection-sidebar-node.is-folder .collection-sidebar-node__label {
    color: burlywood;
}

.collection-sidebar-node__icon--bullet {
    font-family: var(--font-inter);
    font-size: 1.45rem;
    line-height: 1;
}

.collection-sidebar-node__icon--copy {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.collection-sidebar-node__label {
    display: block;
    flex: 1 1 auto;
    font-size: var(--fz-14);
    line-height: var(--lh-snug);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-sidebar-node__drag {
    align-items: center;
    color: var(--text-secondary);
    cursor: grab;
    display: inline-flex;
    font-size: 1rem;
    height: 28px;
    justify-content: center;
    opacity: 0;
    padding-inline: var(--space-1);
    position: absolute;
    right: var(--space-2);
    transition: opacity 120ms ease, color 120ms ease;
    width: 1.4rem;
    z-index: 2;
}

.collection-workspace-body .collection-sidebar-node .collection-sidebar-node__drag {
    bottom: auto;
    left: auto;
    right: var(--space-2);
    scale: 1;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.collection-workspace-body .collection-sidebar-node.has-section-gap .collection-sidebar-node__drag {
    top: calc(50% + 7px);
}

.collection-sidebar-node:hover .collection-sidebar-node__drag,
.collection-sidebar-node:focus-within .collection-sidebar-node__drag {
    color: var(--text-primary);
    opacity: 1;
}

.collection-sidebar-node__drag:hover {
    color: var(--text-primary);
}

.collection-sidebar-node__drag:active {
    cursor: grabbing;
}

.collection-sidebar-node.deletable {
    animation: chord-shake 0.3s infinite linear alternate;
}

.collection-sidebar-node__delete {
    background: #dc3545;
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 1.1em;
    height: 1.7em;
    line-height: 1.7em;
    margin-left: var(--space-1);
    padding: 0;
    text-align: center;
    transition: background 0.2s;
    width: 1.7em;
    z-index: 3;
}

.collection-sidebar-node__delete--folder {
    margin-left: 0;
    margin-right: var(--space-1);
}

.collection-sidebar-node__delete:hover,
.collection-sidebar-node__delete:focus-visible {
    background: #b52f3a;
    outline: none;
}

.collection-sidebar-panel__empty {
    color: var(--text-secondary);
    font-size: var(--fz-14);
    line-height: var(--lh-normal);
    margin: 0;
    padding: var(--space-m);
}

:root[data-bs-theme="light"] .collection-sidebar-panel {
    border-color: rgba(0, 0, 0, 0.1);
}

.collection-sidebar-delete-modal {
    align-items: center;
    background: rgba(15, 16, 20, 0.58);
    backdrop-filter: blur(8px);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: var(--space-m);
    position: fixed;
    z-index: 80;
}

.collection-sidebar-delete-modal__panel {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: var(--shadow-modal, 0 22px 70px rgba(0, 0, 0, 0.34));
    color: var(--text-primary);
    max-width: min(380px, calc(100vw - 2rem));
    padding: var(--space-m);
    width: 100%;
}

.collection-sidebar-delete-modal__panel h3 {
    font-family: var(--font-inter);
    font-size: var(--fz-18);
    line-height: var(--lh-tight);
    margin: 0 0 var(--space-s);
}

.collection-sidebar-delete-modal__panel p {
    color: var(--text-secondary);
    font-size: var(--fz-14);
    line-height: var(--lh-normal);
    margin: 0 0 var(--space-s);
}

.collection-sidebar-delete-modal__input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: var(--fz-14);
    min-height: 36px;
    padding: 0 var(--space-s);
    width: 100%;
}

.collection-sidebar-delete-modal__input:focus {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus-ring) 28%, transparent);
    outline: none;
}

.collection-sidebar-delete-modal__actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
    margin-top: var(--space-m);
}

@media (max-width: 900px) {
    .collection-workspace-layout {
        display: block;
    }

    .collection-sidebar-shell {
        height: min(42vh, 360px);
        margin-bottom: var(--space-m);
        min-height: 220px;
        position: static;
    }
}

@media (max-width: 900px) {
    .collection-workspace-body[data-workspace-layout-route="true"] {
        --collection-workspace-phone-drawer-top: calc(3.9rem + env(safe-area-inset-top, 0px));
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-main {
        padding-left: clamp(0.75rem, 3vw, 1rem);
        padding-right: clamp(0.75rem, 3vw, 1rem);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-group {
        margin: 0.15rem 0 0;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-row {
        align-items: center;
        gap: var(--space-s);
        margin-bottom: var(--space-s);
        padding-bottom: var(--space-xs);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline {
        align-items: center;
        column-gap: var(--space-xs);
        row-gap: 0;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline .page-breadcrumb {
        font-size: 0.68rem;
        margin-right: 0.15rem;
        opacity: 0.72;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline .page-breadcrumb .breadcrumb-icon,
    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline .page-breadcrumb .breadcrumb-separator {
        display: none;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title {
        font-size: clamp(1rem, 0.92rem + 0.6vw, 1.1rem);
    }

    .collection-workspace-body[data-workspace-layout-route="true"].collection-sidebar-drawer-open {
        overflow: hidden;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode {
        position: relative;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-shell {
        align-self: stretch;
        background: transparent;
        bottom: 0;
        height: auto;
        inset: var(--collection-workspace-phone-drawer-top) 0 0 0;
        margin: 0;
        min-height: 0;
        pointer-events: none;
        position: fixed;
        visibility: hidden;
        width: auto;
        z-index: 48;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-shell::before {
        background: rgba(12, 16, 24, 0.62);
        content: '';
        inset: 0;
        opacity: 0;
        position: absolute;
        transition: opacity 180ms ease;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-root,
    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-panel {
        height: 100%;
        max-height: 100%;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-root {
        position: relative;
        width: min(86vw, 320px);
        z-index: 1;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode .collection-sidebar-panel {
        border-radius: 0 18px 18px 0;
        box-shadow: var(--shadow-modal);
        transform: translateX(calc(-100% - 1.5rem));
        transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode.is-phone-sidebar-open .collection-sidebar-shell {
        pointer-events: auto;
        visibility: visible;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode.is-phone-sidebar-open .collection-sidebar-shell::before {
        opacity: 1;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode.is-phone-sidebar-open .collection-sidebar-panel {
        transform: translateX(0);
    }
}


:root[data-bs-theme="light"] {
    --accent: #555555;
    --accent-soft: rgba(85, 85, 85, 0.16);
    --accent-warm: #c26a25;
    --accent-warm-soft: rgba(194, 106, 37, 0.16);
    --border-subtle: #c8c8c8;
    --color-bg: #ffffff;
    --color-fg: #000000;
    --focus-ring: #7a7a7a;
    --root-dot-color: #555555;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-standard: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-modal: 0 10px 32px rgba(0, 0, 0, 0.14);
    --surface-elevated: #f5f5f5;
    --surface: #ffffff;
    --text-on-accent: #ffffff;
    --text-primary: #000000;
    --text-secondary: #2f2f2f;
}

:root[data-bs-theme="light"] #add-group,
:root[data-bs-theme="light"] .btn-primary {
    background: transparent !important;
    border-color: #c8c8c8 !important;
    color: #000000 !important;
}

:root[data-bs-theme="light"] .btn {
    background: transparent !important;
    border-color: #c8c8c8 !important;
    color: #000000 !important;
}

:root[data-bs-theme="light"] .btn-outline-danger,
:root[data-bs-theme="light"] .remove-group {
    background: transparent !important;
    border-color: #c8c8c8 !important;
    color: #2f2f2f !important;
}

:root[data-bs-theme="light"] .btn-success {
    background: transparent !important;
    border-color: #4f4f4f !important;
    color: #4f4f4f !important;
}

:root[data-bs-theme="light"] .btn-success:hover {
    background: transparent !important;
    color: #3a3a3a !important;
}

:root[data-bs-theme="light"] .btn:hover {
    background: transparent !important;
}

:root[data-bs-theme="light"] .chord-card {
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
}

:root[data-bs-theme="light"] .chord-card .delete-chord-btn,
:root[data-bs-theme="light"] .chord-card .delete-chord-btn:hover,
:root[data-bs-theme="light"] .collection-card .delete-collection-btn,
:root[data-bs-theme="light"] .collection-card .delete-collection-btn:hover {
    background: #555555;
    color: #ffffff;
}

:root[data-bs-theme="light"] .chord-dot-filled,
:root[data-bs-theme="light"] .chord-dot.root-played {
    background: #555555 !important;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost .chord-dot-mini {
    background: #ffffff !important;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost {
    background: #ffffff !important;
    border-color: transparent !important;
    color: #000000;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost .chord-dot-mini {
    display: none;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost.root-ghost--with-note-label .chord-dot-mini {
    background: var(--root-dot-color) !important;
    display: block;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost.root-ghost--with-note-label::after {
    content: none;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost::after {
    content: "filter_tilt_shift";
    font-family: "Material Icons Outlined";
    font-size: 1.05em;
    color: #000000;
    inset: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

:root[data-bs-theme="light"] .chord-dot-label {
    color: #ffffff;
}

:root[data-bs-theme="light"] .chord-dot.root-ghost {
    border-color: #000000;
}

:root[data-bs-theme="light"] .chord-footer-label,
:root[data-bs-theme="light"] .chord-fret-label,
:root[data-bs-theme="light"] .chord-header-fret,
:root[data-bs-theme="light"] .chord-header-muted,
:root[data-bs-theme="light"] .chord-header-open {
    color: #000000;
}

:root[data-bs-theme="light"] .chord-title {
    color: #000000;
}

:root[data-bs-theme="light"] .group {
    background: #ffffff;
    border-color: #c8c8c8;
    box-shadow: var(--shadow-standard);
}

:root[data-bs-theme="light"] .group-handle {
    color: #000000;
}

:root[data-bs-theme="light"] body {
    background: #ffffff;
    color: #000000;
    text-shadow: none;
}

:root[data-bs-theme="light"] #groups-root,
:root[data-bs-theme="light"] #groups-root .chord-grid {
    background: #ffffff;
}

:root[data-bs-theme="light"] #import-chords-input.import-chords-textarea {
    background: #ffffff;
    color: #000000;
}

:root[data-bs-theme="light"] .chord-card::before {
    background: transparent;
}

:root[data-bs-theme="light"] .chord-card.collection-text-card {
    border-color: rgba(0, 0, 0, 0.08);
    opacity: 0.9;
}

:root[data-bs-theme="light"] .page-breadcrumb {
    opacity: 0.6;
}

:root[data-bs-theme="light"] .page-breadcrumb a {
    color: #666666;
}

:root[data-bs-theme="light"] .page-breadcrumb a:hover {
    color: #000000;
}

:root[data-bs-theme="light"] .group-buttons .add-chord::after,
:root[data-bs-theme="light"] .group-buttons .delete-chords::after {
    z-index: 15;
}

:root[data-bs-theme="light"] .group-buttons .add-chord::before,
:root[data-bs-theme="light"] .group-buttons .delete-chords::before {
    z-index: 14;
}

:root[data-bs-theme="light"] h2.mb-3::after {
    background: linear-gradient(90deg, #7a7a7a, #7a7a7a 55%);
}

@font-face {
    font-family: 'NunitoChord';
    font-style: normal;
    font-weight: 400;
    src: url(/static/Nunito-VariableFont_wght.ttf) format("truetype");
}

/* Button changes */
.btn {
    -webkit-appearance: none;
    appearance: none;
    background: #ffffff05 !important;
    border-radius: var(--radius-component) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-family: var(--font-inter) !important;
    font-size: var(--fz-14) !important;
    font-weight: 500 !important;
    letter-spacing: 0em;
    line-height: 1 !important;
    padding: .5rem .9rem !important;
    transition: background-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Delete button reveal */
.remove-group {
    border-radius: var(--radius-pill) !important;
    display: inline-grid !important;
    height: 28px !important;
    opacity: 0;
    padding: 0 !important;
    place-items: center !important;
    pointer-events: none;
    transition: opacity .18s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
    width: 28px !important;
}

/* Editable section header */
.collection-workspace-body .group-name.form-control {
    background: var(--editable-text-surface-bg) !important;
    border-radius: var(--radius-component) !important;
    border: 1px solid var(--editable-text-surface-border) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-size: clamp(var(--fz-16), .95rem + .3vw, var(--fz-18)) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    padding: .35rem 0rem !important;
    transition: var(--editable-text-surface-transition);
}

/* Focus ring */
.btn:focus {
    outline: 2px solid var(--focus-ring) !important;
    outline-offset: 2px !important;
}

/* Group divider */
.collection-workspace-body .group>hr.border {
    background: linear-gradient(90deg, #ffffff0f, #fff0 40%, #ffffff0f 100%);
    border: 0 !important;
    height: 1px !important;
    margin: var(--space-4) 0 var(--space-2) !important;
}

/* Group header row */
.collection-workspace-body .group>.d-flex.align-items-center {
    gap: var(--space-2);
    margin-bottom: var(--space-3) !important;
}

/* Page header layout */
.collection-workspace-body .page-title-group {
    margin: 0.35em 0.1em 0 0.1em;
}

.collection-workspace-body .page-title-meta {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.collection-workspace-body .page-title-headline {
    align-items: baseline;
    column-gap: var(--space-s);
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    row-gap: var(--space-1);
}

.collection-workspace-body .page-title-meta .page-breadcrumb,
.collection-workspace-body .page-title-headline .page-title {
    margin-bottom: 0;
}

.collection-workspace-body .page-title-headline .page-breadcrumb {
    flex: 0 1 auto;
    min-width: 0;
}

.collection-workspace-body .page-title-row {
    align-items: flex-end;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-m);
    justify-content: space-between;
    margin-bottom: var(--space-m);
    padding-bottom: var(--space-s);
}

:root[data-bs-theme="light"] .collection-workspace-body .page-title-row {
    border-color: rgba(0, 0, 0, 0.08);
}

.collection-workspace-body .page-title {
    color: var(--text-primary);
    flex-shrink: 1;
    font-family: var(--font-inter);
    font-size: var(--fz-20);
    font-weight: 600;
    letter-spacing: 0;
    line-height: var(--lh-tight);
    margin: 0;
}

.collection-workspace-body .page-title::after {
    content: none;
}

/* --- Empty State Message --- */
.collection-workspace-body #empty-msg {
    color: var(--text-secondary);
    font-size: var(--fz-14);
    font-style: italic;
    margin: var(--space-xl) 0;
    opacity: 0.7;
    text-align: center;
}

.collection-workspace-body .title-import-btn {
    margin-right: clamp(1.5rem, 4vw, 4em);
}


body {
    background: radial-gradient(120% 200% at 50% -80%, #3a3840 0%, var(--surface) 58%), var(--surface);
    background: var(--color-bg);
    color: var(--color-fg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: var(--fz-14);
    letter-spacing: 0em;
    line-height: 1.6;
    margin: 0;
}

body>.row {
    margin-inline: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: clamp(0.5rem, 1vw, 1.25rem) clamp(0.5rem, 1vw, 1.25rem) 1.5rem;
}

.my-chords-link {
    margin-right: 40px;
}

.nav-item {
    margin-right: 0;
}

code {
    font-size: 1rem;
}

div.form-text {
    font-size: 1rem;
}

h2.mb-3::after {
    background: linear-gradient(90deg, #43dfe759, #43dfe700 55%);
    border-radius: 1px;
    content: "";
    display: block;
    height: 1px;
    margin-top: .45rem;
}

label.form-label {
    font-size: 1.15rem;
}

main.container,
.container {
    width: 100%;

    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;

}

.container>.row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.container>.row>* {
    padding-left: 0;
    padding-right: 0;
}


pre {
    display: inline-block;
}

#cancel-import-chords {
    margin-left: 1em !important;
}

/* --- Delete Group Modal Overlay (backdrop blur) --- */
#delete-group-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transition: opacity 180ms cubic-bezier(0.0, 0.0, 0.2, 1);
    will-change: opacity;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #delete-group-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.40);
    }
}

#delete-group-modal.micromodal-slide[aria-hidden="true"] .modal__overlay {
    transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
}

#delete-group-modal h5,
#delete-group-modal p {
    color: var(--color-fg);
}

#delete-group-modal .delete-group-modal-container {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(67, 223, 231, 0.04), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(255, 179, 102, 0.03), transparent 62%),
        var(--surface-elevated, var(--color-bg));
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    color: var(--color-fg);
    padding: 2em;
    will-change: transform, opacity;
}

#delete-group-modal.micromodal-slide[aria-hidden="false"] .delete-group-modal-container {
    animation: mclEditModalIn 220ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

#delete-group-modal.micromodal-slide[aria-hidden="true"] .delete-group-modal-container {
    animation: mclEditModalOut 180ms cubic-bezier(0.4, 0.0, 1, 1);
}

/* --- Delete Group Modal Light Theme --- */
:root[data-bs-theme="light"] #delete-group-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.24);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root[data-bs-theme="light"] #delete-group-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.38);
    }
}

:root[data-bs-theme="light"] #delete-group-modal .delete-group-modal-container {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(85, 85, 85, 0.03), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(194, 106, 37, 0.025), transparent 62%),
        var(--surface-elevated);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

h5#delete-group-modal-title {
    margin-bottom: 0.5em;
    line-height: 2;
}

.modal-button-text {
    font-size: 1.2em;
}

#groups-root {
    margin-top: var(--space-2);
}

.collection-workspace-body #groups-root {
    --diagram-u: calc(var(--diagram-base-u) * var(--main-surface-chord-scale));
}

.collection-workspace-body #groups-root .chord-grid {
    align-items: start;
    column-gap: var(--space-s);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--diagram-u) * var(--chord-card-width-u)), 100%), 1fr));
    justify-content: center;
    row-gap: var(--space-s);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}



/* --- Import Area Styling --- */
.import-chords-hint {
    font-size: var(--fz-14);
    margin-bottom: 0;
}

.import-chords-hint-secondary {
    margin-top: -0.25em;
    margin-bottom: var(--space-xs);
}

#import-chords-area code {
    color: var(--accent, #6ea8fe);
    font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
}

#import-chords-area code.import-chords-example {
    color: var(--text-secondary);
    margin-left: 1em;
}

:root[data-bs-theme="light"] #import-chords-area code {
    color: var(--accent, #0d6efd);
}

:root[data-bs-theme="light"] #import-chords-area code.import-chords-example {
    color: var(--text-secondary);
}

#import-chords-input.import-chords-textarea {
    background: #23222a;
    border-radius: var(--radius-s, 10px);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    color: var(--text-primary);
    display: block;
    font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: var(--fz-14, 0.875rem);
    line-height: 1.5;
    max-height: 15em;
    min-height: 5em;
    outline: none;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    resize: vertical;
    width: 100%;
}

#import-chords-input.import-chords-textarea:focus,
#import-chords-input.import-chords-textarea:focus-visible {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 1px #0009, 0 0 0 3px var(--focus-ring);
    outline: none;
}

#redo-history-btn[disabled],
#undo-history-btn[disabled] {
    opacity: .5;
    pointer-events: none;
}

.btn-outline-danger,
.remove-group {
    background: transparent !important;
    border-color: var(--border-subtle) !important;
    color: #ececf7bf !important;
}

.btn-sm {
    font-size: var(--fz-12) !important;
    padding: .45rem .75rem !important;
}

.btn-success:active {
    background: #1bcad5 !important;
}

.btn-success:hover {
    background: #56e3ea !important;
}

.btn:active {
    transform: translateY(0.5px);
}

.btn:disabled,
.btn[disabled] {
    cursor: not-allowed !important;
    opacity: .55 !important;
}

.btn:focus-visible,
.remove-group:focus-visible {
    box-shadow: 0 0 0 2px #0009 0 0 0 4px var(--focus-ring) !important;
    outline: none !important;
}

.btn:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent) !important;
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent) !important;
    transform: translateY(-1px);
}

.chord-card {
    --chord-card-corner-inset-block: var(--space-3);
    --chord-card-corner-inset-inline-start: var(--space-4);
    --chord-card-corner-inset-inline-end: 0;
    border-radius: var(--radius-card);

    box-sizing: border-box;
    max-width: 100%;
    min-height: calc(var(--diagram-u) * var(--chord-card-height-u) * var(--min-height-multiplier) * var(--chord-edit-scale));
    /* min-height: calc(var(--diagram-u) * var(--chord-card-height-u) * var(--chord-edit-scale)); */
    min-width: calc(var(--diagram-u) * var(--chord-card-width-u));
    padding: var(--space-s);
    position: relative;
    width: 100%;
    z-index: 0;
    transition: transform 140ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1), background-color 140ms ease, opacity 140ms ease;
}

#groups-root .chord-card.mb-3 {
    margin-bottom: var(--space-s);
}

.chord-card .chord-diagram {
    height: auto;
    max-height: 100%;
    max-width: 100%;
}

.chord-card:not(.collection-text-card)>.chord-header-row,
.chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title) {
    --chord-title-fret-label-w: calc(var(--diagram-u) * var(--chord-edit-scale, 1) * var(--diagram-fret-label-col-w));
    --chord-title-neck-w: calc(var(--diagram-u) * var(--chord-edit-scale, 1) * var(--diagram-string-gap) * 6);
    align-items: start !important;
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        var(--chord-title-fret-label-w)
        minmax(0, var(--chord-title-neck-w))
        minmax(0, 1fr);
    justify-content: stretch;
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: 100%;
}

.chord-card-root-action-row {
    --chord-edit-settings-control-height: calc(32px * var(--chord-card-root-action-scale));
    --chord-title-fret-label-w: calc(var(--diagram-u) * var(--chord-edit-scale, 1) * var(--diagram-fret-label-col-w));
    --chord-title-neck-w: calc(var(--diagram-u) * var(--chord-edit-scale, 1) * var(--diagram-string-gap) * 6);
    --chord-card-root-action-gap: clamp(10px, 0.75rem, 14px);
    --chord-card-root-action-scale: 0.96;
    --chord-settings-toggle-inline-offset: 2em;
    align-items: center;
    display: grid;
    gap: 0;
    grid-template-columns:
        minmax(0, 1fr)
        var(--chord-title-fret-label-w)
        minmax(0, var(--chord-title-neck-w))
        minmax(0, 1fr);
    inset: auto;
    justify-content: stretch;
    justify-items: center;
    margin-top: calc(4px + 2em);
    min-height: var(--chord-edit-settings-control-height);
    overflow: visible;
    pointer-events: auto;
    position: static;
    width: 100%;
    z-index: auto;
}

.chord-card-root-action,
.chord-card-note-label-mode-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    gap: calc(0.35rem * var(--chord-card-root-action-scale));
    height: calc(32px * var(--chord-card-root-action-scale));
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: background-color .15s ease, color .15s ease, transform .1s ease, border-color .15s ease, box-shadow .15s ease, opacity 120ms ease-in-out;
    white-space: nowrap;
}

.chord-card-root-action {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin-left: 0;
    margin-top: 1.4em;
    padding: calc(0.28rem * var(--chord-card-root-action-scale)) calc(0.78rem * var(--chord-card-root-action-scale));
}

.chord-card-note-label-mode-toggle {
    font-size: calc(0.95rem * var(--chord-card-root-action-scale));
    font-weight: 700;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    line-height: 1;
    margin-left: 0;
    margin-right: var(--chord-settings-toggle-inline-offset);
    margin-top: 1.4em;
    padding: 0;
    width: calc(32px * var(--chord-card-root-action-scale));
}

.chord-card-root-action .group-root-action-label {
    font-family: var(--font-inter);
    font-size: calc(var(--fz-12) * var(--chord-card-root-action-scale));
    font-weight: 600;
    letter-spacing: 0.02em;
}

.chord-card-root-action .material-icons-outlined {
    font-size: calc(1rem * var(--chord-card-root-action-scale));
}

.chord-card:hover .chord-card-root-action,
.chord-card:focus-within .chord-card-root-action,
.chord-card:hover .chord-card-note-label-mode-toggle,
.chord-card:focus-within .chord-card-note-label-mode-toggle,
.chord-card-root-action.is-active,
.chord-card-note-label-mode-toggle.is-active,
.chord-card-root-action.is-shortcut-preview {
    opacity: 1;
    pointer-events: auto;
}

.chord-card-root-action:hover,
.chord-card-root-action:focus-visible,
.chord-card-note-label-mode-toggle:hover,
.chord-card-note-label-mode-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

.chord-card-root-action.is-active {
    background:
        linear-gradient(135deg, color-mix(in srgb, #29c26a 24%, transparent), transparent),
        color-mix(in srgb, var(--surface-elevated) 82%, transparent);
    border-color: color-mix(in srgb, #29c26a 42%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, #29c26a 22%, transparent);
    color: var(--text-primary);
}

.chord-card-root-action[disabled] {
    cursor: not-allowed;
}

.chord-card:hover .chord-card-root-action[disabled],
.chord-card:focus-within .chord-card-root-action[disabled] {
    opacity: 0.5;
}

.chord-card .chord-edit-section {
    display: none;
    margin-top: 1rem;
    position: relative;
    width: 100%;
}

.collection-workspace-body #groups-root .chord-card:not(.collection-text-card)>.chord-header-row {
    transform: translateY(-1.7em);
}

.chord-card .chord-handle {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: grab;
    display: inline-flex;
    justify-content: center;
    left: var(--chord-card-corner-inset-inline-start);
    margin: 0;
    padding: 0;
    position: absolute;
    top: var(--chord-card-corner-inset-block);
    z-index: 2;
}

.chord-card .chord-title {
    --chord-title-pill-pad-block: 0.16em;
    --chord-title-pill-pad-inline: 0.5em;
    --chord-title-padding-top: 2em;
    flex: 0 0 auto;
    font-family: var(--font-inter);
    font-size: var(--fz-17);
    font-weight: 500;
    grid-column: 3;
    letter-spacing: 0.02em;
    line-height: 1;
    left: auto !important;
    max-width: 100%;
    padding-top: var(--chord-title-padding-top);
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: 0;
    text-align: center;
    overflow: visible;
    position: relative;
    right: auto !important;
    transform: none !important;
    isolation: isolate;

}

.collection-workspace-body #groups-root .chord-card:not(.collection-text-card) .chord-title:hover::before,
.collection-workspace-body #groups-root .chord-card.is-inline-name-editing:not(.collection-text-card) .chord-title::before {
    background: var(--editable-text-surface-hover-bg);
    border-radius: 999px;
    box-shadow: 0 0 0 1px var(--editable-text-surface-hover-border);
    content: "";
    height: calc(1em + (2 * var(--chord-title-pill-pad-block)));
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(var(--chord-title-padding-top) - var(--chord-title-pill-pad-block));
    z-index: -1;
}

.collection-workspace-body #groups-root .chord-card:not(.collection-text-card) .chord-title {
    width: 100%;
}

.chord-title-edit-in-place {
    display: none;
}

@media screen {
    .chord-card:not(.collection-text-card)>.chord-header-row:has(>.chord-title-edit-in-place) .chord-title,
    .chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title-edit-in-place) .chord-title {
        display: none;
    }

    .chord-card:not(.collection-text-card)>.chord-header-row .chord-title-edit-in-place,
    .chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title) .chord-title-edit-in-place {
        --chord-title-pill-pad-block: 0.5em;
        --chord-title-pill-pad-inline: 0.5em;
        --chord-title-padding-top: 2em;
        color: var(--accent);
        display: block;
        font-family: var(--font-inter);
        font-size: var(--fz-17);
        font-weight: 500;
        grid-column: 3;
        letter-spacing: 0.02em;
        line-height: 1;
        margin: 0;
        min-width: 0;
        padding-top: var(--chord-title-padding-top);
        position: relative;
        text-align: center;
        width: 100%;
    }

    .chord-title-edit-input {
        appearance: none;
        background: var(--editable-text-surface-bg);
        border: 1px solid var(--editable-text-surface-border);
        border-radius: 999px;
        box-shadow: none;
        box-sizing: border-box;
        color: inherit;
        cursor: text;
        display: block;
        font: inherit;
        height: calc(1em + (2 * var(--chord-title-pill-pad-block)));
        letter-spacing: inherit;
        line-height: 1;
        margin: 0;
        min-height: calc(1em + (2 * var(--chord-title-pill-pad-block)));
        outline: none;
        overflow: hidden;
        padding:
            var(--chord-title-pill-pad-block)
            var(--chord-title-pill-pad-inline);
        resize: none;
        text-align: center;
        white-space: nowrap;
        width: 100%;
        scrollbar-width: none;
        transition: var(--editable-text-surface-transition);
        touch-action: manipulation;
        user-select: text;
        -webkit-touch-callout: default;
        -webkit-user-select: text;
    }

    .chord-title-edit-input::-webkit-scrollbar {
        display: none;
    }

    .edit-in-place-text:not(.is-edit-in-place-readonly) .chord-title-edit-input:hover {
        background: var(--editable-text-surface-hover-bg);
        border-color: var(--editable-text-surface-hover-border);
        box-shadow: var(--editable-text-surface-hover-shadow);
    }

    .edit-in-place-text.is-edit-in-place-focused .chord-title-edit-input,
    .edit-in-place-text.is-edit-in-place-focused .chord-title-edit-input:hover,
    .chord-title-edit-input:focus,
    .chord-title-edit-input:focus-visible {
        background: var(--editable-text-surface-focus-bg);
        border: 1px solid var(--editable-text-surface-focus-border);
        border-color: var(--editable-text-surface-focus-border);
        box-shadow: var(--editable-text-surface-focus-shadow);
        outline: none;
    }

    .edit-in-place-text.is-edit-in-place-readonly .chord-title-edit-input {
        cursor: default;
    }
}

.chord-card.collection-text-card {
    --text-card-action-gap-block: 1.5em;
    --text-card-action-row-alignment-trim: calc(var(--text-card-action-gap-block) + 0.2em);
    --text-card-align-extra-block-size: 0px;
    --text-card-align-offset-block-start: 14px;
    --text-card-edit-inset-block-end: calc(var(--space-s) + var(--text-card-align-extra-block-size));
    --text-card-edit-inset-block-start: var(--space-s);
    --text-card-edit-inset-inline: var(--space-s);
    align-self: start;
    box-sizing: border-box;
    cursor: text;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 50%, transparent);
    border-radius: var(--radius-card);
    margin-inline: 4px;
    margin-block-start: var(--text-card-align-offset-block-start);
    max-width: calc(100% - 24px);
    min-height: calc(
        var(--diagram-u) * var(--chord-card-height-u) * var(--min-height-multiplier) * var(--chord-edit-scale)
        - var(--text-card-action-row-alignment-trim)
    );
    min-width: 0;
    opacity: 0.85;
    padding:
        var(--text-card-edit-inset-block-start)
        var(--text-card-edit-inset-inline)
        var(--text-card-edit-inset-block-end);
    transform: none;
    width: calc(100% - 24px);
}

.chord-card.collection-text-card .chord-card-root-action-row {
    margin-top: 0;
    min-height: var(--chord-edit-settings-control-height);
    position: absolute;
    top: calc(100% + var(--text-card-action-gap-block) - 1px);
    width: 100%;
}

.chord-card.collection-text-card .chord-card-root-action-cluster {
    grid-column: 3;
}

.chord-card.collection-text-card:hover::after,
.chord-card.collection-text-card:focus-within::after,
.chord-card.collection-text-card.is-inline-name-editing::after {
    border-radius: var(--radius-card);
    box-shadow: 0 0 0 1px var(--editable-text-surface-focus-border);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.chord-card.collection-text-card.is-editing {
    justify-content: flex-start;
}

.chord-card.collection-text-card>.chord-header-row,
.chord-card.collection-text-card>.position-relative.mb-1:has(>.chord-title) {
    align-items: flex-start;
    display: block;
    gap: 0;
    justify-content: initial;
    margin-bottom: 0;
    padding: 0;
    position: static !important;
    width: 100%;
}

.chord-card .chord-edit {
    appearance: none;
    align-self: flex-start;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    position: absolute;
    right: var(--chord-card-corner-inset-inline-end);
    top: var(--chord-card-corner-inset-block);
    transform: none;
}

.chord-card.collection-text-card .chord-title {
    --note-card-line-clamp: 10;
    --note-card-line-height: 1.4;
    color: var(--text-primary);
    cursor: text;
    display: -webkit-box;
    font-size: 0.9rem;
    font-weight: 400;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--note-card-line-clamp);
    letter-spacing: 0.02em;
    line-height: var(--note-card-line-height);
    margin: 0 auto;
    max-height: calc(var(--note-card-line-clamp) * var(--note-card-line-height) * 1em);
    max-width: 100%;
    opacity: 0.9;
    overflow: hidden;
    padding-top: 0;
    text-align: center;
    transform: none;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
}

@media screen {
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-title {
        display: none;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-edit-section {
        display: block;
        flex: 1 1 auto;
        margin: 0;
        min-height: 0;
        position: relative;
        width: 100%;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-edit-fields {
        display: block;
        height: 100%;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input {
        --note-card-line-clamp: 10;
        --note-card-line-height: 1.4;
        background: transparent !important;
        border: 1px solid transparent !important;
        border-radius: var(--radius-component);
        box-shadow: none !important;
        color: var(--text-primary);
        cursor: text;
        display: block;
        font-family: var(--font-inter);
        font-size: 0.9rem;
        font-weight: 400;
        height: 100%;
        letter-spacing: 0.02em;
        line-height: var(--note-card-line-height);
        margin: 0 auto;
        max-height: calc(var(--note-card-line-clamp) * var(--note-card-line-height) * 1em);
        min-height: calc(var(--note-card-line-clamp) * var(--note-card-line-height) * 1em);
        opacity: 0.9;
        outline: none;
        overflow: hidden;
        padding: 0;
        resize: none;
        text-align: center;
        white-space: pre-wrap;
        width: 100%;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus-visible {
        background: var(--editable-text-surface-focus-bg) !important;
        border: 1px solid transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:hover {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus:hover,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus-visible:hover {
        background: var(--editable-text-surface-focus-bg) !important;
        border: 1px solid transparent !important;
        box-shadow: var(--editable-text-surface-focus-shadow) !important;
        outline: none !important;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-shape-input,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-symbols-toolbar {
        display: none !important;
    }
}

.chord-card.collection-text-card .chord-diagram {
    display: none !important;
}

.chord-card .delete-chord-btn {
    background: #dc3545;
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    color: white;
    cursor: pointer;
    display: none;
    font-size: 1.1em;
    height: 1.7em;
    left: 0rem;
    line-height: 1.7em;
    position: absolute;
    text-align: center;
    top: 0rem;
    transition: background 0.2s;
    width: 1.7em;
    z-index: 3;
}

.collection-workspace-body .collection-card .delete-collection-btn {
    background: #dc3545;
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    color: white;
    cursor: pointer;
    display: none;
    font-size: 1.1em;
    height: 1.7em;
    left: 0;
    line-height: 1.7em;
    position: absolute;
    text-align: center;
    top: 0;
    transform: translate(-0.6em, -0.7em);
    transition: background 0.2s;
    width: 1.7em;
    z-index: 3;
}




.chord-card .delete-chord-btn:hover {
    background: #b52f3a;

}

.chord-card.is-inline-name-editing .chord-handle,
.chord-card.is-inline-name-editing .chord-edit {
    visibility: hidden;
    pointer-events: none;
}

.chord-card .chord-edit .material-icons-outlined {
    font-size: 1.2em !important;
}

.chord-card .chord-edit .material-icons-outlined,
.chord-card .chord-handle .material-icons-outlined {
    font-size: 1.44em;
    line-height: 1;
    opacity: 0.82;
    pointer-events: auto;
    transition: opacity .18s, transform .18s;

}

.chord-card .chord-handle {
    align-self: flex-start;
    transform: none;
}

.chord-card .chord-hover-button .material-icons-outlined {
    font-size: var(--chord-action-button-icon-size) !important;
}

.chord-card.deletable {
    animation: chord-shake 0.3s infinite linear alternate;
}

.chord-card.deletable .delete-chord-btn {
    display: block;
    transform: translate(var(--delete-btn-nudge-x), calc(-1 * var(--delete-btn-nudge-up)));
}

.chord-card.collection-text-card.deletable .delete-chord-btn {
    transform: translate(-2em, -2em) !important;
}

.collection-workspace-body .collection-card.deletable .delete-collection-btn {
    display: block;
}

.chord-card.is-editing .chord-edit-section {
    display: block;
}

.chord-card::before {
    background: inherit;
    border-radius: inherit;
    content: "";
    inset: -0.5rem;
    position: absolute;
    z-index: -1;
}

.chord-card.chord-drag-ghost {
    background: var(--surface-elevated, var(--color-bg));
    background-image: linear-gradient(135deg, var(--accent-warm-soft, rgba(255, 179, 102, 0.07)), rgba(255, 179, 102, 0.03));
    background-clip: padding-box;
    box-shadow: 0 0 0 1px var(--accent-warm-soft, rgba(255, 179, 102, 0.16));
    outline: 1px dashed var(--accent-warm, #ffb366);
    outline-offset: 0;
    opacity: 1;
    transform: none;
}

.chord-card.chord-drag-item {
    background: linear-gradient(135deg, var(--accent-soft, rgba(67, 223, 231, 0.08)), transparent), var(--surface-elevated, var(--color-bg));
    box-shadow: var(--shadow-elevated), 0 0 0 1px var(--accent-soft, rgba(67, 223, 231, 0.08));
    opacity: 0.92;
    transform: scale(1.01);
    z-index: 10;
}

.chord-card.chord-drag-chosen {
    background: linear-gradient(135deg, var(--accent-soft, rgba(67, 223, 231, 0.06)), transparent), var(--surface-elevated, var(--color-bg));
    box-shadow: 0 0 0 1px var(--border-subtle);
}

:root[data-bs-theme="light"] .chord-card.chord-drag-ghost {
    background-image: linear-gradient(135deg, var(--accent-warm-soft, rgba(194, 106, 37, 0.07)), rgba(194, 106, 37, 0.03));
    box-shadow: 0 0 0 1px var(--accent-warm-soft, rgba(194, 106, 37, 0.08));
    outline-color: var(--accent-warm, #c26a25);
}

.chord-dup-drag-active .chord-drag-ghost {
    background: var(--surface-elevated, var(--color-bg));
    background-image: linear-gradient(135deg, var(--accent-soft, rgba(67, 223, 231, 0.07)), rgba(67, 223, 231, 0.04));
    background-clip: padding-box;
    box-shadow: 0 0 0 1px var(--accent-soft, rgba(67, 223, 231, 0.25));
    outline-color: var(--accent, #43dfe7);
}

:root[data-bs-theme="light"] .chord-dup-drag-active .chord-drag-ghost {
    background-image: linear-gradient(135deg, var(--accent-soft, rgba(85, 85, 85, 0.06)), rgba(85, 85, 85, 0.04));
    box-shadow: 0 0 0 1px var(--accent-soft, rgba(85, 85, 85, 0.12));
    outline-color: var(--accent, #555555);
}

:root[data-bs-theme="light"] .chord-card.chord-drag-item {
    background: linear-gradient(135deg, var(--accent-soft, rgba(85, 85, 85, 0.08)), transparent), var(--surface-elevated, #ffffff);
    box-shadow: var(--shadow-elevated), 0 0 0 1px var(--accent-soft, rgba(85, 85, 85, 0.08));
}

:root[data-bs-theme="light"] .chord-card.chord-drag-chosen {
    background: linear-gradient(135deg, var(--accent-soft, rgba(85, 85, 85, 0.06)), transparent), var(--surface-elevated, #ffffff);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.chord-card.chord-drag-ghost>* {
    visibility: hidden;
}

.chord-card.chord-drag-ghost .chord-card-placeholder {
    visibility: visible;
}

.chord-card.chord-drag-ghost .chord-diagram,
.chord-card.chord-drag-ghost .chord-edit-section,
.chord-card.chord-drag-ghost .chord-title,
.chord-card.chord-drag-ghost .chord-header-row {
    visibility: hidden;
}

.chord-card.chord-drag-ghost .chord-card-placeholder {
    visibility: visible;
}

.chord-dup-source-placeholder {
    pointer-events: none;
    opacity: 0.98;
}

.chord-card.chord-dnd-drag-source {
    opacity: 0.55;
}

.chord-dnd-overlay {
    box-sizing: border-box;
    left: 0;
    opacity: 0.96;
    pointer-events: none;
    position: fixed;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
    z-index: 5000;
}

.chord-card.chord-dnd-drop-before::after,
.chord-card.chord-dnd-drop-after::after {
    background: var(--accent, #43dfe7);
    border-radius: 999px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface-elevated, #111820) 45%, transparent), 0 0 18px color-mix(in srgb, var(--accent, #43dfe7) 55%, transparent);
    content: "";
    inset-block: -0.35rem;
    pointer-events: none;
    position: absolute;
    width: 3px;
    z-index: 20;
}

.chord-card.chord-dnd-drop-before::after {
    left: -0.35rem;
}

.chord-card.chord-dnd-drop-after::after {
    right: -0.35rem;
}

.group.group-dnd-drag-source {
    opacity: 0.55;
}

.group.group-dnd-drop-before::before,
.group.group-dnd-drop-after::after {
    background: var(--accent, #43dfe7);
    border-radius: 999px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface-elevated, #111820) 45%, transparent), 0 0 18px color-mix(in srgb, var(--accent, #43dfe7) 55%, transparent);
    content: "";
    height: 3px;
    inset-inline: 1rem;
    pointer-events: none;
    position: absolute;
    z-index: 20;
}

.group.group-dnd-drop-before::before {
    top: -0.35rem;
}

.group.group-dnd-drop-after::after {
    bottom: -0.35rem;
}

.chord-card:hover .chord-edit,
.chord-card:hover .chord-handle,
.chord-card:focus-within .chord-hover-button,
.chord-card .chord-hover-button:focus-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.chord-card .chord-hover-button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.chord-card .chord-hover-button:hover,
.chord-card .chord-hover-button:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 18%, transparent);
    color: var(--text-primary);
    filter: none !important;
}

.chord-card .chord-hover-button--edit:hover,
.chord-card .chord-hover-button--edit:focus-visible {
    background: color-mix(in srgb, #00d3dc 26%, var(--surface-elevated));
    border-color: color-mix(in srgb, #00d3dc 62%, var(--border-subtle));
    color: #00d3dc;
}

.chord-card:hover .chord-edit .material-icons-outlined,
.chord-card:hover .chord-handle .material-icons-outlined,
.chord-card:focus-within .chord-hover-button .material-icons-outlined {
    opacity: 1;
}

body.chord-drag-intent-active #groups-root .chord-card-root-action,
body.chord-drag-intent-active #groups-root .chord-card:hover .chord-card-root-action,
body.chord-drag-intent-active #groups-root .chord-card:focus-within .chord-card-root-action,
body.chord-drag-intent-active #groups-root .chord-card:hover .chord-edit,
body.chord-drag-intent-active #groups-root .chord-card:hover .chord-handle,
body.chord-drag-intent-active #groups-root .chord-card:hover .chord-edit .material-icons-outlined,
body.chord-drag-intent-active #groups-root .chord-card:hover .chord-handle .material-icons-outlined,
body.chord-drag-intent-active #groups-root .group-header:hover .group-handle,
body.chord-drag-intent-active #groups-root .group-header:focus-within .group-handle {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.chord-drag-intent-active #groups-root .chord-card.chord-drag-chosen .chord-handle,
body.chord-drag-intent-active #groups-root .chord-card.chord-drag-item .chord-handle {
    opacity: 1 !important;
}

body.chord-drag-intent-active #groups-root .chord-card:hover .chord-hover-button--drag,
body.chord-drag-intent-active #groups-root .chord-card .chord-hover-button--drag:active,
body.chord-drag-intent-active #groups-root .chord-card.chord-drag-chosen .chord-hover-button--drag,
body.chord-drag-intent-active #groups-root .chord-card.chord-drag-item .chord-hover-button--drag {
    background: color-mix(in srgb, #00d3dc 26%, var(--surface-elevated));
    border-color: color-mix(in srgb, #00d3dc 62%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 18%, transparent);
    color: #00d3dc;
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.chord-drag-intent-active #groups-root .chord-card:hover .chord-hover-button--drag .material-icons-outlined,
body.chord-drag-intent-active #groups-root .chord-card.chord-drag-chosen .chord-hover-button--drag .material-icons-outlined,
body.chord-drag-intent-active #groups-root .chord-card.chord-drag-item .chord-hover-button--drag .material-icons-outlined {
    opacity: 1 !important;
}

body.chord-drag-intent-active #groups-root .chord-diagram,
body.chord-drag-intent-active #groups-root .chord-diagram *,
body.chord-drag-intent-active #groups-root .chord-card-root-action,
body.chord-drag-intent-active #groups-root .chord-edit {
    pointer-events: none !important;
}

body.chord-drag-intent-active #groups-root .chord-card-root-action,
body.chord-drag-intent-active #groups-root .chord-edit,
body.chord-drag-intent-active #groups-root .chord-diagram-cell .chord-dot-wrap::before,
body.chord-drag-intent-active #groups-root .chord-diagram-cell .chord-dot-wrap::after {
    animation: none !important;
    transition: none !important;
}

.chord-diagram {
    --dot-size: var(--diagram-dot-size);
    --footer-row-h: var(--diagram-footer-row-h);
    --fret-label-col-w: var(--diagram-fret-label-col-w);
    --fret-label-font-scale: var(--diagram-fret-label-font-scale);
    --fret-label-tx: var(--diagram-fret-label-translate-x);
    --fret-label-ty: var(--diagram-fret-label-translate-y);
    --fretline-width: var(--diagram-fretline-width);
    --header-font-scale: var(--diagram-header-font-scale);
    --header-gap: var(--diagram-header-gap);
    --header-row-h: var(--diagram-header-row-h);
    --nutline-width: var(--diagram-nutline-width);
    --row1-h: var(--diagram-row1-h);
    --row2-h: var(--diagram-row2-h);
    --row3-h: var(--diagram-row3-h);
    --row4-h: var(--diagram-row4-h);
    --row5-h: var(--diagram-row5-h);
    --string-gap: var(--diagram-string-gap);
    --string-width: var(--diagram-string-width);
    --interval-u: calc(var(--diagram-u) * min(var(--chord-edit-scale), var(--diagram-interval-max-scale)));
    --u: calc(var(--diagram-u) * var(--chord-edit-scale));
    background: var(--color-bg);
    border-collapse: collapse;
    color: var(--color-fg);
    display: inline-table;
    font-family: var(--font-chord);
    margin: 0 auto;
    max-width: none;
    table-layout: fixed;
    touch-action: manipulation;
    width: auto;
    user-select: none;
}

.chord-diagram tbody td.chord-fret-label,
.chord-diagram thead th:first-child {
    width: calc(var(--u) * var(--fret-label-col-w));
}

.chord-diagram tbody td.chord-string-cell,
.chord-diagram thead th:not(:first-child) {
    width: calc(var(--u) * var(--string-gap));
}

.chord-diagram tbody tr:last-child .chord-string-cell::before {
    display: block;
}

.chord-diagram tbody tr[data-fret]:nth-child(1) {
    height: calc(var(--u) * var(--row1-h));
}

.chord-diagram tbody tr[data-fret]:nth-child(2) {
    height: calc(var(--u) * var(--row2-h));
}

.chord-diagram tbody tr[data-fret]:nth-child(3) {
    height: calc(var(--u) * var(--row3-h));
}

.chord-diagram tbody tr[data-fret]:nth-child(4) {
    height: calc(var(--u) * var(--row4-h));
}

.chord-diagram tbody tr[data-fret]:nth-child(5) {
    height: calc(var(--u) * var(--row5-h));
}

.chord-diagram td,
.chord-diagram th {
    box-sizing: border-box;
}

.chord-diagram thead th {
    border: 0;
    font-size: calc(var(--u) * var(--header-font-scale));
    font-weight: var(--font-weight-medium);
    height: calc(var(--u) * var(--header-row-h) + var(--header-gap));
    line-height: calc(var(--u) * var(--header-row-h) + var(--header-gap));
    overflow: visible;
    padding: 0;
    position: relative;
    text-align: center;
    vertical-align: bottom;
    user-select: none;
}

.chord-diagram thead th .chord-header-label,
.chord-diagram thead th .chord-header-placeholder {
    bottom: calc(var(--header-gap) + var(--u) * var(--diagram-header-offset));
    display: inline-block;
    left: 50%;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: auto;
    transform: translate(-50%, 2px);
}

.chord-diagram thead th.chord-header-string:hover .chord-header-label,
.chord-diagram thead th.chord-header-string:focus-within .chord-header-label {
    opacity: 0;
}

.chord-diagram thead th.chord-header-string.chord-remove-preview-suppressed:hover .chord-header-label,
.chord-diagram thead th.chord-header-string.chord-remove-preview-suppressed:focus-within .chord-header-label {
    opacity: 1;
}

.chord-diagram thead th.chord-header-string .chord-dot-wrap {
    bottom: calc(var(--header-gap) + var(--u) * var(--diagram-header-offset));
    height: calc(var(--u) * var(--dot-size));
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: auto;
    transform: translate(-50%, 1px);
    width: calc(var(--u) * var(--dot-size));
    z-index: 2;
}

/* Expand header click hit area upward so X/0 region is easier to tap */
.chord-diagram thead th.chord-header-string::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1em);
    height: 1em;
    pointer-events: auto;
}

.chord-diagram thead th:not(.chord-header-spacer) {
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.chord-diagram thead {
    position: relative;
}

.chord-diagram thead tr {
    height: calc(var(--u) * var(--header-row-h) + var(--header-gap));
}

.chord-dot {
    border-radius: var(--radius-pill);
    box-sizing: border-box;
    display: grid;
    height: calc(var(--u) * var(--dot-size));
    left: 50%;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size));
    z-index: 2;
}

.chord-dot-filled {
    background: var(--color-fg);
}

.chord-dot-label {
    align-items: center;
    color: var(--text-on-accent, #0e1b1b);
    display: inline-flex;
    font-family: var(--font-label);
    font-size: calc(var(--u) * var(--dot-size) * 0.92);
    font-synthesis: none;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    position: static;
    text-align: center;
}

.collection-workspace-body .group-header {
    margin-bottom: 38px !important;
}

.chord-name-inline-input {
background: #2a282d!important;
}

.shared-link-read-only-modal-copy {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

.shared-link-read-only-modal-copy a {
    color: var(--accent, #43dfe7);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.14em;
}

.shared-link-read-only-modal-copy a:hover,
.shared-link-read-only-modal-copy a:focus-visible {
    color: var(--text-primary);
}


.chord-dot-interval-label {
    align-items: center;
    display: inline-flex;
    font-family: var(--font-label);
    font-size: calc(var(--interval-u) * var(--dot-size) * var(--diagram-interval-font-scale));
    font-synthesis: none;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    justify-content: center;
    letter-spacing: -0.01em;
    will-change: auto;
}

.chord-dot-interval-label--compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.6);
}

.chord-dot-note-label {
    align-items: center;
    display: inline-flex;
    font-family: var(--font-label);
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.72);
    font-synthesis: none;
    font-weight: 700;
    justify-content: center;
    letter-spacing: -0.01em;
    transform: translateY(0.03em);
    will-change: auto;
}

.chord-dot-note-label--compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.62);
}

.chord-dot-note-label--extra-compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.54);
}

.chord-dot.root-ghost.root-ghost--with-note-label .chord-dot-note-label--ghost-root {
    color: #000000 !important;
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.46 + 2pt);
    font-weight: 800;
    left: 50%;
    letter-spacing: -0.02em;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -48%);
    z-index: 4;
}

.chord-dot.root-ghost.root-ghost--with-note-label .chord-dot-note-label--ghost-root.chord-dot-note-label--compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.4 + 2pt);
}

.chord-dot.root-ghost.root-ghost--with-note-label .chord-dot-note-label--ghost-root.chord-dot-note-label--extra-compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.34 + 2pt);
}

.chord-edit-modal-slot .chord-dot-label.chord-dot-interval-label {
    transform: none;
}

.chord-edit-modal-slot .chord-dot-label.chord-dot-note-label {
    transform: none;
}

.chord-dot-mini {
    background: var(--root-dot-color);
    border-radius: var(--radius-pill);
    height: calc(var(--u) * var(--dot-size) * 0.624);
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size) * 0.624);
    z-index: 3;
}

.chord-dot-wrap {
    height: 100%;
    position: relative;
    width: 100%;
}

.chord-diagram-cell .chord-dot-wrap::before {
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: calc(var(--u) * 0.032) solid color-mix(in srgb, white 62%, var(--border-subtle));
    border-radius: var(--radius-pill);
    box-sizing: border-box;
    color: var(--text-on-accent, #0e1b1b);
    content: attr(data-hover-label);
    display: grid;
    font-family: var(--font-label);
    font-size: calc(var(--interval-u) * var(--dot-size) * var(--diagram-interval-font-scale));
    font-synthesis: none;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    height: calc(var(--u) * var(--dot-size));
    justify-content: center;
    left: 50%;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(var(--u) * var(--dot-size));
    z-index: 1;
}

.chord-diagram-cell .chord-dot-wrap--hover-label-compact::before {
    font-size: calc(var(--interval-u) * var(--dot-size) * var(--diagram-interval-font-scale));
}

.chord-diagram-cell:hover .chord-dot-wrap::before,
.chord-diagram-cell:focus-within .chord-dot-wrap::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-header-label {
    opacity: 0 !important;
    visibility: hidden !important;
}

.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot-wrap,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot-wrap::before,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot-wrap::after,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot-label,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-hide-label .chord-dot-mini {
    opacity: 0 !important;
    visibility: hidden !important;
}

.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target .chord-header-label,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:hover .chord-header-label,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:focus-within .chord-header-label {
    opacity: 0 !important;
}

.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target .chord-dot-wrap::before,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:hover .chord-dot-wrap::before,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:focus-within .chord-dot-wrap::before {
    background: rgba(255, 255, 255, 0.5);
    border: calc(var(--u) * 0.032) solid color-mix(in srgb, white 62%, var(--border-subtle));
    border-radius: var(--radius-pill);
    color: var(--text-on-accent, #0e1b1b);
    content: attr(data-hover-label);
    opacity: 0.72 !important;
    transform: translate(-50%, -50%) scale(1);
    z-index: 5;
}

.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target .chord-dot-wrap::after,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:hover .chord-dot-wrap::after,
.chord-diagram.chord-note-preview-mode thead th.chord-header-string.chord-note-preview-target:focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0 !important;
}

.chord-diagram-cell:has(.chord-dot-filled):hover .chord-dot-wrap::before,
.chord-diagram-cell:has(.chord-dot-filled):focus-within .chord-dot-wrap::before,
.chord-diagram-cell:has(.root-ghost):hover .chord-dot-wrap::before,
.chord-diagram-cell:has(.root-ghost):focus-within .chord-dot-wrap::before {
    background: rgba(255, 76, 76, 0.54);
    border-color: rgba(255, 104, 104, 0.58);
    color: transparent;
    content: "";
    opacity: 1;
    z-index: 5;
}

.chord-diagram-cell:has(.chord-dot-filled):hover .chord-dot-wrap::after,
.chord-diagram-cell:has(.chord-dot-filled):focus-within .chord-dot-wrap::after,
.chord-diagram-cell:has(.root-ghost):hover .chord-dot-wrap::after,
.chord-diagram-cell:has(.root-ghost):focus-within .chord-dot-wrap::after {
    align-items: center;
    color: #050505;
    content: "";
    display: grid;
    font-family: var(--font-label);
    font-size: calc(var(--u) * var(--dot-size) * 0.5);
    font-weight: 900;
    height: calc(var(--u) * var(--dot-size));
    justify-content: center;
    left: 50%;
    line-height: 1;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size));
    z-index: 6;
}

.chord-diagram-cell.chord-remove-preview-suppressed:hover .chord-dot-wrap::before,
.chord-diagram-cell.chord-remove-preview-suppressed:focus-within .chord-dot-wrap::before,
.chord-diagram-cell.chord-remove-preview-suppressed:hover .chord-dot-wrap::after,
.chord-diagram-cell.chord-remove-preview-suppressed:focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0;
}

.chord-diagram-cell.chord-ghost-overlay-only:hover .chord-dot-wrap::before,
.chord-diagram-cell.chord-ghost-overlay-only:focus-within .chord-dot-wrap::before,
.chord-diagram-cell.chord-ghost-overlay-only:hover .chord-dot-wrap::after,
.chord-diagram-cell.chord-ghost-overlay-only:focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0;
}

.chord-diagram.chord-note-preview-mode .chord-diagram-cell.chord-note-preview-hidden .chord-dot {
    opacity: 0;
}

.chord-diagram-cell.chord-preview-remove-target .chord-dot-wrap::before,
.chord-diagram-cell.chord-preview-remove-target:hover .chord-dot-wrap::before,
.chord-diagram-cell.chord-preview-remove-target:focus-within .chord-dot-wrap::before {
    background: rgba(255, 76, 76, 0.54);
    border-color: rgba(255, 104, 104, 0.58);
    color: transparent;
    content: "";
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 5;
}

.chord-diagram-cell.chord-preview-remove-target .chord-dot-wrap::after,
.chord-diagram-cell.chord-preview-remove-target:hover .chord-dot-wrap::after,
.chord-diagram-cell.chord-preview-remove-target:focus-within .chord-dot-wrap::after {
    align-items: center;
    color: #050505;
    content: "";
    display: grid;
    font-family: var(--font-label);
    font-size: calc(var(--u) * var(--dot-size) * 0.5);
    font-weight: 900;
    height: calc(var(--u) * var(--dot-size));
    justify-content: center;
    left: 50%;
    line-height: 1;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size));
    z-index: 6;
}

.chord-diagram-cell.chord-preview-remove-target.chord-preview-remove-target--root-same-string .chord-dot-wrap::after,
.chord-diagram-cell.chord-preview-remove-target.chord-preview-remove-target--root-same-string:hover .chord-dot-wrap::after,
.chord-diagram-cell.chord-preview-remove-target.chord-preview-remove-target--root-same-string:focus-within .chord-dot-wrap::after {
    color: var(--text-on-accent, #0e1b1b);
    content: "R";
    font-size: calc(var(--u) * var(--dot-size) * 0.92);
}

.chord-diagram-cell.chord-root-preview-target .chord-dot-wrap::after {
    align-items: center;
    background: var(--root-dot-color);
    border: 0;
    border-radius: var(--radius-pill);
    color: var(--text-on-accent, #0e1b1b);
    content: "R";
    display: grid;
    font-family: var(--font-label);
    font-size: calc(var(--u) * var(--dot-size) * 0.92);
    font-weight: 800;
    height: calc(var(--u) * var(--dot-size));
    left: 50%;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size));
    z-index: 5;
}

.chord-dot.root-played .chord-dot-label,
.chord-diagram-cell.chord-root-preview-target .chord-dot-wrap::after {
    font-size: calc(var(--u) * var(--dot-size) * 0.92);
}

.chord-dot.root-played .chord-dot-note-label {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.72);
}

.chord-dot.root-played .chord-dot-note-label.chord-dot-note-label--compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.62);
}

.chord-dot.root-played .chord-dot-note-label.chord-dot-note-label--extra-compact {
    font-size: calc(var(--interval-u) * var(--dot-size) * 0.54);
}

.collections-route-body--poster-active .landing-poster-host--official .chord-diagram-cell.chord-root-preview-target .chord-dot-wrap::after {
    font-size: calc(var(--u) * var(--dot-size) * 0.74);
}

.chord-diagram-cell.chord-root-preview-target .chord-dot-wrap::before {
    opacity: 0;
}

.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.chord-dot-filled):hover .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.chord-dot-filled):focus-within .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.chord-dot-filled):hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.chord-dot-filled):focus-within .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.root-ghost):hover .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.root-ghost):focus-within .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.root-ghost):hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell:has(.root-ghost):focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0;
}

.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):focus-within .chord-dot-wrap::after {
    background: var(--root-dot-color);
    border: 0;
    color: var(--text-on-accent, #0e1b1b);
    content: "R";
    font-size: calc(var(--u) * var(--dot-size) * 0.92);
    opacity: 1;
    z-index: 5;
}

.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):hover .chord-dot-wrap::after,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):focus-within .chord-dot-wrap::after {
    background: #2a282d;
    border: calc(var(--u) * 0.04) solid var(--color-fg);
    color: transparent;
    content: "";
    opacity: 1;
    z-index: 5;
}

.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):hover .chord-dot-wrap::before,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-root-preview-target:not(.chord-root-preview-target--current-root):focus-within .chord-dot-wrap::before {
    background: var(--root-dot-color);
    border: 0;
    border-radius: var(--radius-pill);
    content: "";
    display: block;
    height: calc(var(--u) * var(--dot-size) * 0.572);
    left: 50%;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--u) * var(--dot-size) * 0.572);
    z-index: 6;
}

.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.chord-dot-filled):hover .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.chord-dot-filled):focus-within .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.root-ghost):hover .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.root-ghost):focus-within .chord-dot-wrap::before {
    background: rgba(255, 76, 76, 0.54);
    border-color: rgba(255, 104, 104, 0.58);
    color: transparent;
    content: "";
    opacity: 1;
    z-index: 5;
}

.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.chord-dot-filled):hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.chord-dot-filled):focus-within .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.root-ghost):hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-root-preview-target--current-root:has(.root-ghost):focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0;
}

.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:hover .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:focus-within .chord-dot-wrap::before,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:hover .chord-dot-wrap::after,
.chord-diagram.chord-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:focus-within .chord-dot-wrap::after,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:hover .chord-dot-wrap::before,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:focus-within .chord-dot-wrap::before,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:hover .chord-dot-wrap::after,
.chord-diagram.chord-ghost-root-preview-mode .chord-diagram-cell.chord-remove-preview-suppressed.chord-root-preview-target:focus-within .chord-dot-wrap::after,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target .chord-dot-wrap::before,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target .chord-dot-wrap::after,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target:hover .chord-dot-wrap::before,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target:hover .chord-dot-wrap::after,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target:focus-within .chord-dot-wrap::before,
.chord-diagram-cell.chord-remove-preview-suppressed.chord-preview-remove-target:focus-within .chord-dot-wrap::after {
    content: "";
    opacity: 0;
}

.chord-dot.root-ghost {
    background: #2a282d !important;
    border: calc(var(--u) * 0.04) solid var(--color-fg);
}

.chord-dot.root-played {
    background: var(--root-dot-color) !important;
    display: grid;
    place-items: center;
}

.chord-edit {
    cursor: pointer;
    cursor: pointer !important;
}

.chord-edit,
.chord-handle {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.12s, color 0.12s, filter 0.12s !important;
}

.chord-edit-fields {
    display: block;
    margin-bottom: var(--space-2);
    padding-top: 2.7rem;
    transform: none;
    width: 100%;
}

.chord-edit-fields .form-control {
    box-sizing: border-box;
    font-size: 1.2em;
    max-width: 100%;
    text-align: center;
    width: 100%;
}

.chord-edit:hover,
.chord-handle:hover {
    filter: brightness(1.4) !important;
}

.chord-footer-cell {
    border: 0;
    height: calc(var(--u) * var(--footer-row-h));
    line-height: calc(var(--u) * var(--footer-row-h));
    overflow: visible;
    padding: 0;
    position: relative;
    text-align: center;
    vertical-align: top;
}

.chord-footer-label {
    color: var(--color-fg);
    font-family: var(--font-chord);
    font-size: calc(var(--u) * var(--header-font-scale));
    font-weight: var(--font-weight-medium);
    left: 50%;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, calc(-50% + var(--u) * var(--diagram-footer-offset)));
}

.chord-footer-row {
    cursor: pointer;
    height: calc(var(--u) * var(--footer-row-h));
    transform: translateY(0.8em);
}

.chord-edit-modal-container .chord-footer-row:hover .chord-footer-label,
.chord-edit-modal-container .chord-footer-row:focus-within .chord-footer-label,
.chord-edit-modal-container .chord-card.is-inline-shape-editing .chord-footer-label {
    color: var(--accent);
}

.chord-footer-spacer {
    border: 0;
    padding: 0;
    width: calc(var(--u) * var(--fret-label-col-w));
}

.chord-fret-label {
    border: 0;
    cursor: text;
    font-family: var(--font-label);
    font-size: calc(var(--u) * var(--fret-label-font-scale));
    font-synthesis: none;
    font-variant-numeric: tabular-nums;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    padding: 0;
    position: relative;
    text-align: right;
    transform: translateX(calc(var(--fret-label-tx) * var(--u))) translateY(calc(var(--fret-label-ty) * var(--u)));
    vertical-align: middle;
}

.chord-fret-label-button {
    align-items: center;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    height: calc(var(--u) * 0.74);
    justify-content: center;
    min-height: calc(var(--u) * 0.74);
    min-width: 0;
    padding: 0;
    position: absolute;
    right: 0;
    text-decoration: none;
    top: 50%;
    transition: color 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-50%);
    width: calc(var(--u) * 0.74);
}

.chord-fret-label-button::after {
    background: color-mix(in srgb, var(--accent-soft) 16%, transparent);
    border: calc(var(--u) * 0.032) solid color-mix(in srgb, var(--accent) 42%, var(--border-subtle));
    border-radius: 999px;
    content: "";
    inset: calc(var(--u) * -0.08);
    opacity: 0;
    position: absolute;
    transform: scale(0.92);
    transition: opacity 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-fret-label-button:hover,
.chord-fret-label-button:focus-visible {
    color: color-mix(in srgb, var(--text-primary) 90%, var(--accent) 10%);
    outline: none;
    transform: translate(-1px, -50%);
}

.chord-fret-label-button:hover::after,
.chord-fret-label-button:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

.chord-fret-label-input {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    box-sizing: border-box;
    caret-color: var(--accent);
    color: inherit;
    cursor: text;
    display: block;
    font: inherit;
    height: calc(var(--u) * 0.74);
    line-height: 1;
    margin: 0;
    max-height: calc(var(--u) * 0.74);
    min-height: calc(var(--u) * 0.74);
    overflow: hidden;
    padding: calc((var(--u) * 0.74 - 1em - 2px) / 2) 0;
    position: absolute;
    right: 0;
    resize: none;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    touch-action: manipulation;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
    width: calc(var(--u) * 0.74);
    z-index: 3;
}

.chord-fret-label-input::-webkit-scrollbar {
    display: none;
}

.edit-in-place-text:not(.is-edit-in-place-readonly) .chord-fret-label-input:hover {
    background: color-mix(in srgb, var(--accent-soft) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border-subtle));
}

.edit-in-place-text.is-edit-in-place-focused .chord-fret-label-input,
.chord-fret-label-input:focus,
.chord-fret-label-input:focus-visible {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    outline: none;
}

.edit-in-place-text.is-edit-in-place-readonly .chord-fret-label-input {
    caret-color: transparent;
    cursor: text;
}

.chord-grid .chord-card.editing-expanded {
    grid-column: span 2;
    max-width: 100%;
}

.chord-handle {
    cursor: grab;
    cursor: grab !important;
}

body.chord-drag-copy-intent-active .chord-handle,
body.chord-drag-copy-intent-active .chord-card .chord-handle,
body.chord-drag-copy-intent-active .chord-card .chord-handle .material-icons-outlined {
    cursor: copy !important;
    color: var(--accent, #43dfe7) !important;
    opacity: 1 !important;
    filter: brightness(1.08) !important;
}

body.chord-drag-copy-intent-active .chord-card .chord-handle .material-icons-outlined,
body.chord-dup-drag-active .chord-card .chord-handle .material-icons-outlined {
    position: relative;
}

body.chord-drag-copy-intent-active .chord-card .chord-handle .material-icons-outlined::after,
body.chord-dup-drag-active .chord-card .chord-handle .material-icons-outlined::after {
    content: "+";
    position: absolute;
    top: -0.38rem;
    right: -0.5rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.12rem;
    border-radius: 999px;
    background: var(--accent, #43dfe7);
    color: var(--surface-elevated, #111820);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1rem;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.24);
    pointer-events: none;
    transform: scale(1.08);
}

.chord-header-fret,
.chord-header-muted,
.chord-header-open {
    color: var(--color-fg);
    font-weight: var(--font-weight-medium);
}

.chord-name {
    margin-left: 1.6em;
}

.chord-name-input {
    font-family: "Roboto Condensed", "Noto Sans", "Noto Sans Symbols 2", system-ui, -apple-system, "Segoe UI", "Segoe UI Symbol", Arial, sans-serif;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    box-sizing: border-box;
    resize: vertical;
    width: 100%;
}

.chord-card:not(.collection-text-card) .chord-name-input {
    height: 1rem;

}

.chord-shape-input {
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chord-string-cell {
    border: 0;
    padding: 0;
    position: relative;
}

.chord-diagram tbody tr[data-fret]:first-child .chord-string-cell {
    border-top: var(--nutline-width-px, calc(var(--u) * var(--nutline-width))) solid var(--color-fg);
}

.chord-string-cell::after {
    background: var(--color-fg);
    bottom: 0;
    content: "";
    left: 50%;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: calc(var(--u) * var(--string-width));
    z-index: 0;
}

.chord-string-cell::before {
    background: var(--color-fg);
    bottom: 0;
    content: "";
    height: calc(var(--u) * var(--fretline-width));
    left: 0;
    position: absolute;
    right: 0;
    z-index: 0;
}

.chord-symbols-row {
    justify-content: center;
    width: 100%;
}

.chord-symbols-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: var(--space-1);
    text-align: center;
    white-space: normal;
    width: 100%;
}

.chord-edit-mode-bar {
    display: flex;
    justify-content: flex-end;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.chord-edit-mode-bar--keyboard {
    display: none;
}

.chord-edit-mode-toggle {
    align-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 18%, transparent), transparent), var(--surface-elevated);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 150%, transparent);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    display: inline-flex;
    gap: 0.7rem;
    min-height: 2.2rem;
    padding: 0.32rem 0.42rem 0.32rem 0.7rem;
    transition: border-color 160ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1), background 160ms cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.chord-edit-mode-toggle.is-disabled {
    opacity: 0.58;
}

.chord-edit-mode-toggle:hover {
    border-color: color-mix(in srgb, var(--border-subtle) 185%, transparent);
}

.chord-edit-mode-toggle.is-active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent), var(--surface-elevated);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 42%, transparent);
}

.chord-edit-mode-toggle-copy {
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 600;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.chord-edit-mode-toggle-copy--multiline {
    align-items: flex-start;
    line-height: 1.25;
    white-space: normal;
}

.chord-edit-mode-toggle-icon {
    color: color-mix(in srgb, var(--text-secondary) 80%, transparent);
    font-size: 1rem;
}

.chord-edit-mode-toggle-control {
    display: inline-flex;
    position: relative;
}

.chord-edit-mode-toggle--show-as .chord-edit-mode-toggle-control {
    position: static;
}

.chord-edit-mode-toggle-input {
    cursor: pointer;
    inset: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.chord-edit-mode-toggle--show-as .chord-edit-mode-toggle-input {
    height: 1px;
    overflow: hidden;
    pointer-events: none;
    width: 1px;
}

.chord-edit-show-as-segmented {
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.chord-edit-mode-toggle-track {
    align-items: center;
    background: color-mix(in srgb, var(--border-subtle) 95%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 170%, transparent);
    border-radius: var(--radius-pill);
    display: inline-flex;
    height: 1.4rem;
    padding: 0.12rem;
    transition: background 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 2.55rem;
}

.chord-edit-mode-toggle-thumb {
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-subtle);
    display: block;
    height: 0.92rem;
    transform: translateX(0);
    transition: transform 160ms cubic-bezier(0.4, 0, 0.2, 1), background 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 0.92rem;
}

.chord-edit-mode-toggle-input:checked+.chord-edit-mode-toggle-track {
    background: color-mix(in srgb, var(--accent-soft) 62%, var(--surface-elevated));
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
}

.chord-edit-mode-toggle-input:checked+.chord-edit-mode-toggle-track .chord-edit-mode-toggle-thumb {
    background: var(--text-primary);
    transform: translateX(1.05rem);
}

.chord-edit-mode-toggle-input:focus-visible+.chord-edit-mode-toggle-track {
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.chord-edit-helper-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
    margin-bottom: var(--space-1);
}

.chord-edit-helper-section {
    background: color-mix(in srgb, var(--surface-elevated) 85%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 115%, transparent);
    border-radius: calc(var(--radius-component) + 2px);
    margin: 0 auto var(--space-2);
    max-width: 30rem;
    padding: var(--space-2) var(--space-2) var(--space-1);
}

.chord-edit-helper-section.is-ready {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 25%, transparent);
}

.chord-edit-helper-heading {
    align-items: center;
    display: flex;
    gap: var(--space-s);
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.chord-edit-helper-title {
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.chord-edit-helper-status {
    background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 125%, transparent);
    border-radius: var(--radius-pill);
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
    font-family: var(--font-inter);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    text-transform: uppercase;
}

.chord-edit-helper-status.is-ready {
    background: color-mix(in srgb, var(--accent-soft) 34%, transparent);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-edit-helper-status.is-disabled {
    opacity: 0.65;
}

.chord-edit-helper-status.is-shortcut {
    background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
    border-color: color-mix(in srgb, var(--accent) 52%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-edit-helper-button {
    appearance: none;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: var(--radius-component);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 500;
    line-height: 1.2;
    padding: 0.38rem 0.7rem;
    transition: background 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0, 0.2, 1), color 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-edit-helper-button:hover,
.chord-edit-helper-button:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 175%, transparent);
    transform: translateY(-1px);
}

.chord-edit-helper-button.is-active {
    background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-edit-helper-button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.chord-edit-helper-button.is-ready {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
}

.chord-edit-helper-button-label {
    position: relative;
    z-index: 1;
}

.chord-edit-helper-button.is-shortcut-preview {
    background: color-mix(in srgb, var(--accent-soft) 44%, transparent);
    border-color: color-mix(in srgb, var(--accent) 58%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 28%, transparent);
    color: var(--text-primary);
    overflow: visible;
    position: relative;
}

.chord-edit-helper-button.is-shortcut-preview::after {
    background: color-mix(in srgb, var(--accent) 78%, #0e1b1b);
    border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent);
    border-radius: var(--radius-pill);
    bottom: calc(100% + 0.35rem);
    color: var(--text-on-accent);
    content: attr(data-shortcut-hint);
    font-family: var(--font-inter);
    font-size: 0.64rem;
    font-weight: 600;
    left: 50%;
    letter-spacing: 0.03em;
    padding: 0.18rem 0.45rem;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 3;
}

.chord-edit-helper-copy {
    color: color-mix(in srgb, var(--text-secondary) 78%, transparent);
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    line-height: 1.45;
    margin: 0 auto var(--space-2);
    max-width: 28rem;
    text-wrap: balance;
}

.chord-edit-helper-advanced {
    color: color-mix(in srgb, var(--text-secondary) 72%, transparent);
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    margin: 0 auto var(--space-2);
    max-width: 28rem;
}

.chord-edit-helper-advanced summary {
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    padding: 0.1rem 0;
}

.chord-edit-helper-advanced summary::-webkit-details-marker {
    display: none;
}

.chord-edit-helper-advanced summary::before {
    content: "+";
    display: inline-block;
    margin-right: 0.4rem;
    transform: translateY(-0.02rem);
}

.chord-edit-helper-advanced[open] summary::before {
    content: "−";
}

.chord-edit-helper-advanced-copy {
    line-height: 1.45;
    padding-top: 0.35rem;
}

.chord-name-input--text-card {
    min-height: 7rem;
    text-align: left !important;
}

.chord-symbols-palette[hidden] {
    display: none;
}

.chord-symbols-palette-region {
    --chord-symbols-palette-region-height: clamp(8.9rem, 23vh, 10.4rem);
    max-height: var(--chord-symbols-palette-region-height);
    overflow: hidden;
    overflow: clip;
    transition: max-height 180ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.chord-symbols-palette-region .chord-symbols-palette {
    block-size: var(--chord-symbols-palette-region-height);
    max-height: none;
    min-height: 0;
    opacity: 1;
    overflow: hidden;
    pointer-events: auto;
    transform: translateY(0);
    transform-origin: top center;
    transform-origin: top center;
    transition:
        opacity 140ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.chord-symbols-palette-region.is-collapsed {
    max-height: 0;
}

.chord-symbols-palette-region.is-collapsed .chord-symbols-palette {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.35rem);
}

.chord-title {
    color: #00d3dc;
    font-size: calc(1.56em * var(--chord-edit-scale, 1));
    margin-bottom: .15rem;

}

.chord-name-inline-input {
    position: absolute;
    z-index: 5;
    min-width: 0;
    font-family: "Roboto Condensed", "Noto Sans", "Noto Sans Symbols 2", system-ui, -apple-system, "Segoe UI", "Segoe UI Symbol", Arial, sans-serif;
    font-size: calc(.9em * var(--chord-edit-scale, 1));
    letter-spacing: 0.12em;
    color: inherit;
    background: #2a282d;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-component);
    padding: 0.35rem 0.5rem;
    text-align: center;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
    white-space: pre-wrap;
    resize: vertical;
    min-height: 2.6em;
    transform: translateY(1.2em);
}

textarea.chord-name-inline-input {
    height: calc(1.5em * 6 + 8px);
    /* 4 lines, adjust as needed */
    /* 1.5em is typical line height, 8px for padding/border fudge */
    resize: vertical;
}

.chord-name-inline-input.chord-name-inline-input--title-mirror {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    resize: none !important;
    transform: none !important;
}

.chord-name-inline-input.chord-name-inline-input--title-mirror:focus {
    background: var(--editable-text-surface-focus-bg) !important;
    border: 1px solid var(--editable-text-surface-focus-border) !important;
    box-shadow: var(--editable-text-surface-focus-shadow) !important;
    outline: none !important;
}

.collection-workspace-body #groups-root .chord-card.is-inline-name-editing:not(.collection-text-card) > .chord-header-row .chord-title,
.collection-workspace-body #groups-root .chord-card.is-inline-name-editing:not(.collection-text-card) > .position-relative.mb-1:has(> .chord-title) .chord-title {
    width: 100%;
}

.chord-edit-modal-container .chord-card.is-inline-name-editing:not(.collection-text-card) .chord-title {
    width: 100%;
}

.chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card {
    background: transparent !important;
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    box-sizing: border-box !important;
    box-shadow: none;
    min-height: 0;
    padding-block: var(--text-card-edit-inset-block-start) var(--text-card-edit-inset-block-end) !important;
    padding-inline: var(--text-card-edit-inset-inline) !important;
    resize: none;
    transform: none;
}

.chord-card.collection-text-card .chord-handle {
    cursor: grab;
}

.chord-card.collection-text-card .chord-edit {
    cursor: pointer;
}

.chord-card .chord-hover-button {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--text-secondary);
    display: inline-flex;
    height: var(--chord-hover-button-size);
    justify-content: center;
    line-height: 1;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: auto;
    transform: none;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        color 120ms ease,
        opacity 120ms ease,
        transform 120ms ease;
    width: var(--chord-hover-button-size);
    z-index: 2;
}

.chord-card .chord-hover-button--drag {
    bottom: 0;
    left: 0;
    right: auto;
}

.chord-card .chord-hover-button--edit {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    bottom: 2px;
    color: #00d3dc;
    left: auto;
    right: 0;
}

.chord-card .chord-hover-button .material-icons-outlined {
    font-size: var(--chord-action-button-icon-size);
    line-height: 1;
}

.chord-card .chord-card-root-action-cluster {
    align-items: center;
    display: inline-flex;
    gap: var(--chord-card-root-action-gap);
    grid-column: 3;
    grid-row: 1;
    justify-content: center;
    justify-self: center;
    max-width: max-content;
    min-width: max-content;
    overflow: visible;
}

.chord-card .chord-card-root-action-row .chord-card-root-action,
.chord-card .chord-card-root-action-row .chord-handle,
.chord-card .chord-card-root-action-row .chord-edit {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--text-secondary);
    display: inline-flex;
    flex: 0 0 auto;
    height: var(--chord-edit-settings-control-height);
    justify-content: center;
    margin-top: 0.25rem !important;
    position: static;
    scale: none;
    top: auto;
    transform: none !important;
    z-index: 2;
}

.chord-card .chord-card-root-action-row .chord-card-root-action {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    left: auto;
    margin-left: 0 !important;
    min-height: var(--chord-edit-settings-control-height);
    padding: calc(0.22rem * var(--chord-card-root-action-scale)) calc(0.66rem * var(--chord-card-root-action-scale));
}

.chord-card .chord-card-root-action-row .chord-handle {
    bottom: auto;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    left: auto;
    margin-left: 0;
    padding: 0;
    right: auto;
    translate: none;
    width: var(--chord-edit-settings-control-height);
}

.chord-card .chord-card-root-action-row .chord-edit {
    bottom: auto;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    left: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    right: auto;
    width: var(--chord-edit-settings-control-height);
}

.chord-card .chord-card-root-action-row .chord-card-root-action:hover,
.chord-card .chord-card-root-action-row .chord-card-root-action:focus-visible,
.chord-card .chord-card-root-action-row .chord-handle:hover,
.chord-card .chord-card-root-action-row .chord-handle:focus-visible,
.chord-card .chord-card-root-action-row .chord-edit:hover,
.chord-card .chord-card-root-action-row .chord-edit:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-card .chord-card-root-action-row .chord-handle .material-icons-outlined,
.chord-card .chord-card-root-action-row .chord-edit .material-icons-outlined {
    font-size: calc(0.95rem * var(--chord-card-root-action-scale)) !important;
    line-height: 1;
}

.chord-card.collection-text-card .chord-card-root-action-row--text-card {
    inset-inline: -1px;
    width: auto;
}

.chord-card.collection-text-card .chord-card-root-action-row--text-card .chord-card-root-action-cluster {
    grid-column: 1 / -1;
    justify-content: space-between;
    justify-self: stretch;
    max-width: none;
    min-width: 0;
    width: 100%;
}

.collection-text-card {
    transform: none;
}

.collection-text-card .chord-title {
    top: auto;
}



.chord-name-inline-input:not(.chord-name-inline-input--text-card):focus {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    outline: none;
}

.chord-title:hover {
    cursor: pointer;
}

.chord-edit-modal-container .chord-title {
    border-radius: var(--radius-component);
    cursor: text;
    transition: var(--editable-text-surface-transition);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout:not(.chord-card-spotlight--text-card-modal) .chord-title {
    --chord-modal-title-pill-pad-block: 0.16em;
    --chord-modal-title-pill-pad-inline: 0.5em;
    border-radius: 999px;
    margin:
        calc(-1 * var(--chord-modal-title-pill-pad-block))
        calc(-1 * var(--chord-modal-title-pill-pad-inline));
    padding:
        var(--chord-modal-title-pill-pad-block)
        var(--chord-modal-title-pill-pad-inline);
    width: 100%;
}

.chord-edit-modal-container .chord-title:hover,
.chord-edit-modal-container .chord-card.is-inline-name-editing .chord-title {
    background: var(--editable-text-surface-hover-bg);
    box-shadow: 0 0 0 1px var(--editable-text-surface-hover-border);
    color: var(--text-primary);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout:not(.chord-card-spotlight--text-card-modal) .chord-name-inline-input--title-mirror {
    border-radius: 999px !important;
    padding:
        var(--chord-modal-title-pill-pad-block, 0.16em)
        var(--chord-modal-title-pill-pad-inline, 0.5em) !important;
}

.collection-workspace-body #groups-root .chord-card:not(.collection-text-card) .chord-name-inline-input--title-mirror {
    background: var(--editable-text-surface-focus-bg) !important;
    border-radius: 999px !important;
    border-color: var(--editable-text-surface-focus-border) !important;
    box-shadow: var(--editable-text-surface-focus-shadow) !important;
    padding:
        var(--chord-title-pill-pad-block, 0.16em)
        var(--chord-title-pill-pad-inline, 0.5em) !important;
}

.chord-edit-modal-container .chord-name-inline-input {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    color: var(--text-primary);
    font-size: calc(1.18em * var(--chord-edit-scale, 1));
    min-height: 2.2em;
    transform: none;
}

.chord-shape-inline-input {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    border-radius: var(--radius-component);
    box-shadow: var(--editable-text-surface-focus-shadow);
    box-sizing: border-box;
    color: var(--text-primary);
    font-family: var(--font-chord);
    font-size: calc(0.84rem * var(--chord-edit-scale, 1));
    letter-spacing: 0.12em;
    line-height: 1.25;
    margin: 0;
    padding: 0.32rem 0.48rem;
    position: absolute;
    text-align: center;
    text-transform: uppercase;
    touch-action: manipulation;
    user-select: text;
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    z-index: 16;
}

.chord-shape-inline-input:focus {
    outline: none;
}

.chord-edit-modal-container .chord-shape-inline-input,
.chord-edit-modal-container .chord-shape-inline-input:focus {
    background: #292830 !important;
}

.collection-workspace-body .collection-card {
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 300px;
    justify-content: flex-start;
    padding: 12px !important;
    position: relative;
    width: min(100%, 250px);
    max-width: 100%;
    min-width: 0;

}

.collection-workspace-body .collection-card .collection-handle {
    left: var(--space-3);
    position: absolute;
    top: var(--space-3);
    z-index: 2;
    color: #0d6efd;
    cursor: grab;
    opacity: 0;
    font-size: 24px;
    transition: opacity 0.15s ease;
}

.collection-workspace-body .collection-card .collection-edit {
    position: absolute;
    right: var(--space-3);
    top: var(--space-3);
    z-index: 2;
    cursor: pointer;
    color: #0d6efd;
    opacity: 0;
    font-size: 24px;
    border-radius: 50%;
    transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.collection-workspace-body .collection-card:hover .collection-handle,
.collection-workspace-body .collection-card:hover .collection-edit {
    opacity: 1;
}

.collection-workspace-body .collection-card .collection-edit:hover {
    color: #084aab;
    background: rgba(10, 88, 202, 0.08);
}



.collection-workspace-body .collection-card .chord-name-input {
    background: #ffffff0f !important;
    border-radius: var(--radius-component) !important;
    border: 1px solid #ffffff2a !important;
    box-shadow: inset 0 0 0 1px #ffffff10;
    color: var(--text-primary) !important;
    display: none;
    flex: 1 1 auto;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    overflow-wrap: break-word;
    padding: 0.35rem 0.5rem !important;
    resize: vertical;
    text-align: center;
    white-space: pre-wrap;
    width: 100%;
}

.collection-workspace-body .collection-card .chord-title.collection-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.collection-workspace-body .collection-card .collection-body-placeholder {
    height: calc(var(--diagram-u) * 4.5);
    width: 100%;
}

.collection-workspace-body .collection-card .collection-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0 auto;
    max-width: 100%;
    overflow-wrap: break-word;
    text-align: center;
    transform: none;
    white-space: normal;
    word-break: break-word;

    cursor: default;
}

.collection-workspace-body .collection-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
    justify-content: flex-start;
    padding-top: 0.35rem;
}

.collection-workspace-body .collection-card-header {
    align-items: center;
    align-items: flex-start;
    display: flex;
    gap: 0.35rem;
    height: 40px;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0;
    padding: 0.35rem 1.25rem 0 1.75rem;
    transform: translateY(5em);
    width: 100%;
}

.collection-workspace-body .collection-card.editing .chord-name-input {
    display: block;
}

.collection-workspace-body .collection-card.editing .chord-title {
    display: none;
}

.collection-name-input {
    background-color: transparent;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;


    min-height: 90px;
    outline: none;
    padding: 0.55rem 1.6rem 0.55rem 0.9rem;
    resize: vertical;
    scrollbar-color: rgba(15, 23, 42, 0.3) transparent;
    scrollbar-width: thin;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease, transform 140ms ease;
    width: 100%;
}

.collection-name-input::-webkit-scrollbar {
    width: 6px;
}

.collection-name-input::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.25);
    border-radius: 999px;
}

.collection-name-input::-webkit-scrollbar-thumb:hover {
    background-color: rgba(15, 23, 42, 0.4);
}

.collection-name-input::-webkit-scrollbar-track {
    background: transparent;
}

.collection-name-input:focus {
    background-color: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    cursor: text;
    outline: none;
}

.collection-name-input:hover:not(:focus) {
    background-color: transparent;
    border-color: rgba(148, 163, 184, 0.95);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transform: translateY(-1px);
}

.delete-chord-btn {
    transform: translateX(-0.1em) translateY(-0.1em) !important;
}

.delete-group-pill {
    transform: translateX(-2.5em) translateY(-2.1em);
}

.form-control {
    padding-left: 0.3em;
    width: 100%;
}

.form-control.form-control-sm.group-name {
    padding-left: 2.5rem;
}


.mb-1.small {
    font-size: 0.875rem !important;
}

.collection-workspace-body .group {
    background: var(--surface-elevated);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-elevated);
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    width: 100%;
    padding: var(--space-l);
    margin-bottom: var(--space-xl);
}

.collection-workspace-body .group .delete-group-pill {
    background: #dc3545;
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    color: white;
    cursor: pointer;
    display: none;
    font-size: 1.1em;
    height: 1.7em;
    left: 1.5rem;
    line-height: 1.7em;
    position: absolute;
    text-align: center;
    top: 0.35rem;
    transition: background 0.2s, opacity 0.2s;
    width: 1.7em;
    z-index: 4;
}

.collection-workspace-body .group .delete-group-pill:hover {
    background: #b52f3a;
}

.collection-workspace-body .group-buttons {
    align-items: center;
    align-self: center;
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
    position: static;
    right: auto;
    top: auto;
    transform: none;
    z-index: auto;
    margin-right: 1em;
}

.collection-workspace-body .group-buttons .group-root-action {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    gap: 0.35rem;
    height: 32px;
    margin-right: 1em;
    padding: 0.28rem 0.78rem;
    transition: background-color .15s ease, color .15s ease, transform .1s ease, border-color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.collection-workspace-body .group-buttons .group-root-action-label {
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.collection-workspace-body .group-buttons .group-root-action .material-icons-outlined {
    font-size: 1rem;
}

.collection-workspace-body .group-buttons .group-root-action:hover,
.collection-workspace-body .group-buttons .group-root-action:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

.collection-workspace-body .group-buttons .group-root-action.is-active {
    background:
        linear-gradient(135deg, color-mix(in srgb, #29c26a 24%, transparent), transparent),
        color-mix(in srgb, var(--surface-elevated) 82%, transparent);
    border-color: color-mix(in srgb, #29c26a 42%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, #29c26a 22%, transparent);
    color: var(--text-primary);
}

.collection-workspace-body .group-buttons .group-root-action[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.collection-workspace-body .group-buttons .add-chord,
.collection-workspace-body .group-buttons .delete-chords,
.collection-workspace-body .group-buttons .export-group {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    box-sizing: border-box;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    position: relative;
    padding: var(--space-1);
    transition: background-color .15s ease, color .15s ease, transform .1s ease, border-color .15s ease;
    width: 32px;
}

.collection-workspace-body .group-buttons .add-chord {
    color: #43dfe7;
}

.collection-workspace-body .group-buttons .delete-chords {
    color: #d0a097;
}

.collection-workspace-body .group-buttons .export-group {
    color: var(--text-primary);
}

.collection-workspace-body .group-buttons .add-chord:hover,
.collection-workspace-body .group-buttons .add-chord:focus-visible,
.collection-workspace-body .group-buttons .export-group:hover,
.collection-workspace-body .group-buttons .export-group:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--accent);
}

.collection-workspace-body .group-buttons .delete-chords:hover,
.collection-workspace-body .group-buttons .delete-chords:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ff6b6b;
}

.collection-workspace-body .group-buttons .material-icons-outlined {
    font-size: 26px;
    line-height: 1;
}

.collection-workspace-body .group-footer-actions {
    bottom: calc(var(--space-2) * var(--spaceV-1));
    display: flex;
    height: 32px;
    justify-content: flex-end;
    margin: 0;
    min-height: 0;
    padding-right: 0;
    pointer-events: none;
    position: absolute;
    right: calc(var(--space-4) * var(--space-BandD));
}

.collection-workspace-body .group-footer-actions .export-group {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    box-sizing: border-box;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0.35em;
    transition: background-color .15s ease, color .15s ease, transform .1s ease, border-color .15s ease;
    width: 32px;
    opacity: 0;
    pointer-events: none;
}

.collection-workspace-body .group-footer-actions .export-group:hover,
.collection-workspace-body .group-footer-actions .export-group:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--accent);
}

.collection-workspace-body .group:hover .group-footer-actions .export-group,
.collection-workspace-body .group:focus-within .group-footer-actions .export-group {
    opacity: 1;
    pointer-events: auto;
}

.row-insert-zone {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: calc(var(--space-xs) * 0.18) 0 calc(var(--space-xs) * 0.32);
    min-height: 24px;
    position: relative;
}

.row-insert-zone::before {
    background: color-mix(in srgb, var(--border-subtle) 85%, transparent);
    content: "";
    height: 1px;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transition: opacity 0.16s ease;
    transform: translateY(-50%);
}

.row-insert-zone:hover::before,
.row-insert-zone:focus-within::before {
    opacity: 1;
}

.row-insert-zone .row-insert-plus {
    appearance: none;
    border: 0;
    display: flex;
    font-size: 28px;
    height: 36px;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 36px;
}

.row-insert-zone .row-insert-plus .material-icons-outlined {
    font-size: 28px;
    line-height: 1;
}

.row-insert-zone:hover .row-insert-plus,
.row-insert-zone:focus-within .row-insert-plus,
.row-insert-zone .row-insert-plus.is-flashing {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.row-insert-zone .row-insert-plus:hover,
.row-insert-zone .row-insert-plus:focus-visible {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%) scale(1.05);
}

body.chord-sortable-drag-active .row-insert-zone {
    opacity: 0;
    pointer-events: none;
}

body.group-dnd-drag-active .group-insert-zone,
body.group-dnd-drag-active .group-insert-plus {
    opacity: 0;
    pointer-events: none;
}

body.chord-drag-intent-active #groups-root .row-insert-zone {
    opacity: 0;
    pointer-events: none;
}

body.row-reorder-disabled .row-drag-handle {
    display: none !important;
}

body.chord-single-grid-reorder #groups-root .row-insert-zone {
    display: none !important;
}

.row-insert-plus.is-flashing {
    animation: row-insert-flash 780ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes row-insert-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.38);
        transform: translate(-50%, -50%) scale(1);
    }

    40% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
        transform: translate(-50%, -50%) scale(1.08);
    }

    100% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        transform: translate(-50%, -50%) scale(1);
    }
}

.row-insert-plus {
    align-items: center;
    background: var(--surface-elevated, #2a282d);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color: #0d6efd;
    cursor: pointer;
    display: none;
    font-size: 28px;
    height: 36px;
    justify-content: center;
    left: 50%;
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform .12s ease, box-shadow .12s ease;
    width: 36px;
    z-index: 20;
}

.row-insert-plus:hover,
.row-insert-plus:focus-visible {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%) scale(1.05);
}

.row-insert-plus[data-tooltip]::after,
.row-insert-plus[data-tooltip]::before {
    font-family: "Noto Sans", "Noto Sans Symbols 2", system-ui, -apple-system, "Segoe UI", "Segoe UI Symbol", Arial, sans-serif;
}

.chord-grid .row-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 22px;
    color: #0d6efd;
    background: var(--color-bg);
    border-radius: 6px;
    cursor: grab;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
    border: 1px solid rgba(128, 128, 128, 0.25);
    transform: translateY(1em);
    /* Reserve space for hover */
    transition:
        opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-grid.row-handle-active .row-drag-handle {
    opacity: 1;
    pointer-events: auto;
}

.chord-grid .row-drag-handle:hover,
.chord-grid .row-drag-handle:focus-visible {
    background: rgba(0, 211, 220, 0.05);
    /* Even softer */
    box-shadow: 0 2px 8px 0 rgba(0, 211, 220, 0.12);
    border-color: rgba(0, 211, 220, 0.10);
    /* Gentle, always matches base border */
}


.group-ghost-row {
    display: none;
    align-items: start;
    box-sizing: border-box;
    margin: 0.35rem 0 0.25rem;
    min-height: calc(var(--diagram-u) * var(--chord-card-height-u) * 0.95);
    padding: 0.25rem 0.2rem;
    width: 100%;
    justify-content: flex-start;
    gap: 0.12rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-card);
    column-gap: 0.12rem;
    grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--diagram-u) * var(--chord-card-width-u)), 100%), 1fr));
    row-gap: 0.15rem;
}

.group-ghost-row.is-visible {
    display: grid;
}

.group-ghost-row .chord-card-placeholder {
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-card);
    box-sizing: border-box;
    color: var(--text-secondary);
    display: flex;
    font-size: 0.9rem;
    justify-content: center;
    letter-spacing: 0.08em;
    min-height: calc(var(--diagram-u) * var(--chord-card-height-u) * 0.95);
    min-width: calc(var(--diagram-u) * var(--chord-card-width-u));
    max-width: calc(var(--diagram-u) * var(--chord-card-width-u) * 1.05);
    opacity: 0.7;
    padding: 0.45rem 0.7rem;
    text-transform: uppercase;
    transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
    cursor: copy;
}

.group-ghost-row .chord-card-placeholder::after {
    content: 'Drop to start a new row';
}

.group-ghost-row .chord-card-placeholder.is-active {
    background: rgba(67, 223, 231, 0.14);
    border-color: rgba(67, 223, 231, 0.85);
    box-shadow: 0 0 0 1px rgba(67, 223, 231, 0.35);
    color: var(--text-primary);
    opacity: 1;
}

.collection-workspace-body .group-handle {
    color: #0d6efd;
    cursor: grab;
    scale: 1.1;
    left: 0.1rem;
    top: 0.1rem;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.group-handle:active,
.chord-handle:active,
.collection-handle:active,
.row-drag-handle:active {
    cursor: grabbing !important;
}

body.chord-drag-copy-intent-active,
body.chord-drag-copy-intent-active .chord-handle:active,
body.chord-dup-drag-active,
body.chord-dup-drag-active .chord-handle,
body.chord-dup-drag-active .chord-handle:active,
body.chord-dup-drag-active .chord-card,
body.chord-dup-drag-active .chord-dnd-overlay {
    cursor: copy !important;
}

body.chord-card-drag-active .row-drag-handle {
    opacity: 0 !important;
    pointer-events: none !important;
}

.collection-workspace-body .group-header {
    align-items: center;
    display: flex;
    gap: var(--space-m);
    margin-bottom: var(--space-l);
    padding-bottom: var(--space-s);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    transform: none;
    width: 100%;
}

.collection-workspace-body .group-header .group-name {
    display: inline-block;
    display: inline-block !important;
    flex: 0 0 auto;
    flex: 1 1 auto;
    flex: 1 1 auto !important;
    margin-right: var(--space-2);
    min-width: 0;
    width: auto;

}

.collection-workspace-body .group-header .group-handle {
    opacity: 0;
}

.collection-workspace-body .group-header:hover .group-handle,
.collection-workspace-body .group-header:focus-within .group-handle {
    opacity: 1;
}

.collection-workspace-body .group-header .group-handle:hover {
    color: #084aab;
    background: rgba(10, 88, 202, 0.08);
    border-radius: 50%;
}

.collection-workspace-body .group-header .remove-group {
    margin-left: auto;
}

.collection-workspace-body .group-name {
    background: var(--editable-text-surface-bg) !important;
    border-radius: var(--radius-component);
    border: 1px solid var(--editable-text-surface-border) !important;
    box-shadow: none !important;
    color: var(--text-primary);
    cursor: text;
    font-family: var(--font-inter);
    font-size: var(--fz-18);
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: var(--lh-snug);
    min-width: 0;
    outline: none;
    padding-left: 0.5em !important;
    padding-right: 0 !important;
    transition: var(--editable-text-surface-transition);
    width: 100%;
}

.collection-workspace-body .group-name.form-control:focus {
    background: var(--editable-text-surface-focus-bg) !important;
    border: 1px solid var(--editable-text-surface-focus-border) !important;
    box-shadow: var(--editable-text-surface-focus-shadow) !important;
    outline: none !important;
}

.collection-workspace-body .group-name.form-control:hover {
    background: var(--editable-text-surface-hover-bg) !important;
    border-color: var(--editable-text-surface-hover-border) !important;
}

.collection-workspace-body .group-name.form-control:focus:hover {
    background: var(--editable-text-surface-focus-bg) !important;
    border: 1px solid var(--editable-text-surface-focus-border) !important;
    box-shadow: var(--editable-text-surface-focus-shadow) !important;
    outline: none !important;
}

.collection-workspace-body .group-name:focus {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    outline: none;
}

.collection-workspace-body .group-name:hover {
    background: var(--editable-text-surface-hover-bg);
}

.collection-workspace-body .group-name:focus:hover {
    background: var(--editable-text-surface-focus-bg);
    border: 1px solid var(--editable-text-surface-focus-border);
    box-shadow: var(--editable-text-surface-focus-shadow);
    outline: none;
}

.collection-workspace-body .group-title-area {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.5em;
    min-width: 0;
}

.collection-workspace-body .group-insert-zone {
    background: transparent;
    height: 2em;
    left: 0;
    pointer-events: auto;
    position: absolute;
    width: 100%;
    z-index: 6;
}

.collection-workspace-body .group-insert-top {
    top: 0;
    transform: translateY(-1em);
}

.collection-workspace-body .group-insert-bottom {
    bottom: 0;
    transform: translateY(1em);
}

.collection-workspace-body .group-insert-empty {
    position: relative;
}

.collection-workspace-body .group-insert-plus {
    align-items: center;
    background: var(--surface-elevated, #2a282d);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color: var(--accent);
    cursor: pointer;
    display: none;
    height: 40px;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    transform: translate(-50%, -50%);
    transition: transform .12s ease, box-shadow .12s ease;
    width: 40px;
    z-index: 15;
}

.collection-workspace-body .group-insert-plus:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%) scale(1.05);
}

.collection-workspace-body .group-insert-plus .material-icons-outlined {
    font-size: 30px;
    line-height: 1;
}



.collection-workspace-body .group.deletable-group {
    animation: group-shake 0.3s infinite linear alternate;
}

.collection-workspace-body .group.deletable-group .delete-group-pill {
    display: block;
}

.collection-workspace-body .group.group.mb-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.collection-workspace-body .group:focus-within .remove-group,
.collection-workspace-body .group:hover .remove-group {
    opacity: 1;
    pointer-events: auto;
}

.import-chords-actions {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.import-chords-block {
    font-size: 2rem !important;
    margin-bottom: 1.5rem;
    margin-top: 1.25rem;
}

.import-chords-hint {
    margin-bottom: 0.35rem;
    margin-top: 0.35rem;
}

.import-chords-hint * {
    color: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.import-chords-hint code {
    background: #ffffff0a;
    border-radius: 999px;
    color: var(--accent) !important;
    font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    padding: 0 0.3em;
}

.import-chords-hint em,
.import-chords-hint strong {
    font-weight: 500 !important;
}

.import-chords-hint,
.import-chords-input,
.import-chords-label {
    color: var(--text-primary);
    display: block;
    font-family: var(--font-base, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif);
    font-size: var(--fz-14, 0.875rem);
    font-weight: 400;
    line-height: 1.5;
}

.import-chords-label {
    margin-bottom: 0.25rem;
}

.remove-group:hover {
    background: #ffffff0f !important;
    border-color: #43dfe773 !important;
    color: var(--accent) !important;
}

.string-left::before {
    left: 50%;
}

.string-right::before {
    right: 50%;
}

@media (min-width: 768px) {
    .collection-workspace-body .group {
        padding: var(--space-5);
    }
}

@keyframes chord-shake {
    from {
        transform: rotate(-1deg);
    }

    to {
        transform: rotate(1deg);
    }
}

@keyframes group-shake {
    from {
        transform: rotate(-0.3deg);
    }

    to {
        transform: rotate(0.3deg);
    }
}

@media (max-width: 768px) {
    .collection-workspace-body .chord-grid .chord-card.editing-expanded {
        grid-column: span 1;
    }
}

.collection-workspace-body .collection-card {
    border: 1px solid #ffffff2a !important;
}

.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal.micromodal-slide {
    position: static;
}

.modal.micromodal-slide .modal__overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 160ms ease-out;
    z-index: 3000;
}

.modal.is-open .modal__overlay {
    opacity: 1;
}

#chord-edit-modal .modal__overlay {
    --chord-edit-overlay-pad-top: clamp(0.75rem, 3vh, 2rem);
    --chord-edit-overlay-pad-bottom: clamp(0.75rem, 2.5vh, 1.5rem);
    --chord-edit-overlay-pad-inline: 1rem;
    align-items: center;
    z-index: 3000;
    overflow: auto;
    padding:
        var(--chord-edit-overlay-pad-top)
        var(--chord-edit-overlay-pad-inline)
        var(--chord-edit-overlay-pad-bottom) !important;
}

#delete-group-modal .modal__overlay {
    z-index: 3050;
}

#base-fret-modal .modal__overlay {
    z-index: 3100;
}

.modal__container.chord-edit-modal-container {
    --chord-edit-modal-width: auto;
    --chord-edit-corner-inset: 0.45rem;
    --chord-edit-corner-gap: 0.55rem;
    --chord-edit-corner-button-size: 3.375rem;
    --chord-edit-corner-icon-size: 1.5rem;
    --chord-edit-primary-corner-button-size: var(--chord-edit-corner-button-size);
    --chord-edit-primary-corner-icon-size: var(--chord-edit-corner-icon-size);
    --chord-name-suggest-dock-width: 0px;
    --chord-edit-modal-dock-gap: clamp(1.45rem, 2.4vw, 2.05rem);
    --chord-edit-modal-pad-block: calc(clamp(1.55rem, 2.4vh, 2rem) + 0px);
    --chord-edit-modal-pad-inline: calc(clamp(1.55rem, 2.7vw, 2.1rem) + 50px);
    --chord-edit-modal-inner-gap: clamp(0.7rem, 1.4vh, 1.05rem);
    --chord-edit-modal-row-gap: clamp(0.7rem, 1.25vh, 1rem);
    --modal-suggestion-mode-offset-x: calc(5.2em + 15px);
    --modal-suggestion-mode-offset-y: calc(5em + 16px);
    --modal-spotlight-offset-x: calc(-1em + 12px);
    --modal-spotlight-offset-y: calc(-2em + 37px);
    --chord-edit-spotlight-card-width: clamp(25.9375rem, 30vw, 28.5rem);
    --chord-edit-suggest-dock-width: 20.25rem;
    --color-bg: transparent;
    --color-fg: #efeffc;
    --surface: #2a282d;
    --surface-elevated: #2a282d;
    --text-primary: #f5f4ee;
    --text-secondary: color-mix(in srgb, #f5f4ee 68%, transparent);
    --border-subtle: rgba(236, 236, 247, 0.12);
    --accent: #43dfe7;
    --accent-warm: #ffb366;
    --accent-soft: rgba(67, 223, 231, 0.16);
    background:
        radial-gradient(112% 88% at 14% 18%, color-mix(in srgb, var(--accent, #43dfe7) 26%, transparent), transparent 58%),
        radial-gradient(96% 82% at 84% 86%, color-mix(in srgb, var(--accent-warm, #ffb366) 32%, transparent), transparent 56%),
        radial-gradient(138% 92% at 50% -8%, color-mix(in srgb, white 5%, var(--accent, #43dfe7) 12%), transparent 62%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface, #2a282d) 90%, #34313a 10%) 0%, color-mix(in srgb, var(--surface, #2a282d) 84%, var(--accent, #43dfe7) 16%) 44%, color-mix(in srgb, var(--surface, #2a282d) 74%, var(--accent-warm, #ffb366) 26%) 100%);
    align-items: start;
    align-content: center;
    column-gap: var(--chord-edit-modal-dock-gap);
    display: grid;
    grid-template-columns: minmax(0, var(--chord-edit-spotlight-card-width)) minmax(0, var(--chord-edit-suggest-dock-width));
    left: 0;
    max-width: none;
    max-height: calc(100dvh - var(--chord-edit-overlay-pad-top) - var(--chord-edit-overlay-pad-bottom));
    min-height: min(41.5rem, calc(100dvh - var(--chord-edit-overlay-pad-top) - var(--chord-edit-overlay-pad-bottom)));
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-gutter: stable;
    width: min(var(--chord-edit-modal-width), calc(100vw - 2.25rem));
    outline: none;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-modal);
    padding: var(--chord-edit-modal-pad-block) var(--chord-edit-modal-pad-inline);
}

.modal__container.chord-edit-modal-container.chord-edit-modal-container--text-card-mode {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}




.modal__container {
    position: relative;
}

.chord-edit-modal-actions {
    inset: 0;
    pointer-events: none;
    position: absolute;
    transform: none;
    width: 100%;
    z-index: 12;
}

.modal__close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 1.9rem;
    line-height: 1;
    padding: 0.35rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0.9;
    z-index: 4;
    padding: 0;
    box-sizing: border-box;
    transform: translateY(-0.04em);
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        color 120ms ease,
        transform 120ms ease;
}

.chord-edit-modal-actions .chord-edit-modal-action-button {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    height: var(--chord-edit-corner-button-size);
    justify-content: center;
    line-height: 1;
    opacity: 0.9;
    padding: 0;
    pointer-events: auto;
    position: absolute;
    transform: none;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        color 120ms ease,
        opacity 120ms ease,
        transform 120ms ease;
    width: var(--chord-edit-corner-button-size);
    z-index: 2;
}

.chord-edit-modal-actions .chord-edit-modal-action-button .material-icons-outlined {
    font-size: var(--chord-edit-corner-icon-size);
}

.chord-edit-modal-actions .chord-edit-modal-action-button--cancel {
    height: var(--chord-edit-primary-corner-button-size);
    left: var(--chord-edit-corner-inset);
    right: auto;
    top: var(--chord-edit-corner-inset);
    bottom: auto;
    width: var(--chord-edit-primary-corner-button-size);
}

.chord-edit-modal-actions .chord-edit-modal-action-button--save {
    height: var(--chord-edit-primary-corner-button-size);
    left: auto;
    right: var(--chord-edit-corner-inset);
    top: var(--chord-edit-corner-inset);
    bottom: auto;
    width: var(--chord-edit-primary-corner-button-size);
}

.chord-edit-modal-actions .chord-edit-modal-action-button--cancel .material-icons-outlined,
.chord-edit-modal-actions .chord-edit-modal-action-button--save .material-icons-outlined {
    font-size: var(--chord-edit-primary-corner-icon-size);
}

.chord-edit-modal-actions .chord-edit-modal-action-button--help {
    bottom: var(--chord-edit-corner-inset);
    left: var(--chord-edit-corner-inset);
    right: auto;
    top: auto;
    z-index: 14;
}

.chord-edit-modal-text-card-toggle-shell {
    align-items: center;
    bottom: var(--chord-edit-corner-inset);
    display: inline-flex;
    left: auto;
    pointer-events: auto;
    position: absolute;
    right: var(--chord-edit-corner-inset);
    top: auto;
    z-index: 3;
}

.chord-edit-modal-text-card-toggle-shell[hidden] {
    display: none !important;
}

.chord-edit-modal-text-card-toggle-shell .chord-edit-mode-bar {
    display: inline-flex;
    margin: 0;
    position: static;
}

.chord-edit-modal-text-card-toggle-shell .chord-edit-mode-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: inline-flex;
    gap: 0.55rem;
    min-height: calc(var(--chord-edit-corner-button-size) - 0.45rem);
    padding: 0.2rem 0.5rem 0.2rem 0.72rem;
}

.chord-edit-modal-text-card-toggle-shell .chord-edit-mode-toggle-copy {
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    gap: 0.45rem;
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 600;
}

.chord-edit-modal-actions .chord-edit-modal-action-button--settings {
    bottom: var(--chord-edit-corner-inset);
    left: auto;
    right: var(--chord-edit-corner-inset);
    top: auto;
}

.chord-edit-modal-actions .chord-edit-modal-action-button--draft-redo {
    display: none;
}

.chord-edit-modal-actions .chord-edit-modal-action-button--draft-undo {
    display: none;
}

.chord-edit-modal-actions .chord-edit-modal-action-button:hover,
.chord-edit-modal-actions .chord-edit-modal-action-button:focus-visible,
.chord-edit-modal-actions .chord-edit-modal-action-button[aria-expanded="true"] {
    background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 18%, transparent);
    color: var(--text-primary);
    opacity: 1;
}

.chord-edit-modal-actions .chord-edit-modal-action-button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    transform: none;
}

.chord-edit-modal-actions .chord-edit-modal-action-button[disabled] {
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.chord-edit-settings-cluster {
    display: contents;
}

/* --- Edit Modal & Base Fret Modal Animations --- */
@keyframes mclEditModalIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mclEditModalOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* --- Edit Modal Overlay (backdrop blur + lighter opacity) --- */
#chord-edit-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transition: opacity 180ms cubic-bezier(0.0, 0.0, 0.2, 1);
    will-change: opacity;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #chord-edit-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.40);
    }
}

#chord-edit-modal.micromodal-slide[aria-hidden="true"] .modal__overlay {
    transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
}

/* MicroModal focuses the overlay as a focus-trap sentinel. It is not an actionable control. */
.modal__overlay:focus,
.modal__overlay:focus-visible {
    outline: none;
}

/* --- Edit Modal Container (radial gradients, border, enhanced shadow, animations) --- */
#chord-edit-modal .modal__container.chord-edit-modal-container {
    background:
        radial-gradient(118% 62% at 50% -10%, color-mix(in srgb, var(--accent, #43dfe7) 15%, transparent), transparent 62%),
        radial-gradient(122% 68% at 50% 112%, color-mix(in srgb, var(--accent-warm, #ffb366) 13%, transparent), transparent 64%),
        linear-gradient(135deg,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 94%, #211b22 6%) 0%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 92%, #261f26 8%) 46%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 88%, #31252a 12%) 100%),
        var(--surface, #2a282d);
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 145%, transparent);
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: var(--text-primary, #f5f4ee);
    will-change: transform, opacity;
}

#chord-edit-modal.micromodal-slide[aria-hidden="false"] .chord-edit-modal-container {
    animation: mclEditModalIn 220ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

#chord-edit-modal.micromodal-slide[aria-hidden="true"] .chord-edit-modal-container {
    animation: mclEditModalOut 180ms cubic-bezier(0.4, 0.0, 1, 1);
}

#chord-edit-modal .chord-edit-modal-action-button--save {
    background: color-mix(in srgb, #00d3dc 18%, var(--surface-elevated));
    border-color: color-mix(in srgb, #00d3dc 44%, var(--border-subtle));
    color: #00d3dc;
    opacity: 1;
}

#chord-edit-modal .chord-edit-modal-action-button--save:hover,
#chord-edit-modal .chord-edit-modal-action-button--save:focus-visible {
    background: color-mix(in srgb, #00d3dc 26%, var(--surface-elevated));
    border-color: color-mix(in srgb, #00d3dc 62%, var(--border-subtle));
    color: #00d3dc;
    transform: none;
}

#chord-edit-modal .chord-edit-modal-action-button--cancel {
    opacity: 0.92;
}

#chord-edit-modal .chord-edit-modal-actions .modal__close-button:hover,
#chord-edit-modal .chord-edit-modal-actions .modal__close-button:focus-visible {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 18%, transparent);
    transform: none;
}

/* --- Base Fret Modal Overlay (backdrop blur + lighter opacity) --- */
#base-fret-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transition: opacity 180ms cubic-bezier(0.0, 0.0, 0.2, 1);
    will-change: opacity;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #base-fret-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.40);
    }
}

#base-fret-modal.micromodal-slide[aria-hidden="true"] .modal__overlay {
    transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
}

/* --- Base Fret Modal Container Animations --- */
#base-fret-modal.micromodal-slide[aria-hidden="false"] .base-fret-modal-box {
    animation: mclEditModalIn 220ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

#base-fret-modal.micromodal-slide[aria-hidden="true"] .base-fret-modal-box {
    animation: mclEditModalOut 180ms cubic-bezier(0.4, 0.0, 1, 1);
}

/* --- Base Fret Modal Box (enhanced shadow) --- */
#base-fret-modal .base-fret-modal-box {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    will-change: transform, opacity;
}

/* --- Light Theme Variants --- */
:root[data-bs-theme="light"] #chord-edit-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.24);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root[data-bs-theme="light"] #chord-edit-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.38);
    }
}

:root[data-bs-theme="light"] .modal__container.chord-edit-modal-container {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(85, 85, 85, 0.03), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(194, 106, 37, 0.025), transparent 62%),
        var(--surface-elevated);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

:root[data-bs-theme="light"] #chord-edit-modal .modal__close-button:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
}

:root[data-bs-theme="light"] #base-fret-modal .modal__overlay {
    background: rgba(0, 0, 0, 0.24);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root[data-bs-theme="light"] #base-fret-modal .modal__overlay {
        background: rgba(0, 0, 0, 0.38);
    }
}

:root[data-bs-theme="light"] #base-fret-modal .base-fret-modal-box {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(85, 85, 85, 0.03), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(194, 106, 37, 0.025), transparent 62%),
        var(--surface-elevated);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

/* --- Help Modal (MicroModal) --- */
@keyframes mclHelpModalIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mclHelpModalOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(6px);
    }
}

#help-modal {
    --help-modal-gutter: clamp(16px, 4vw, 48px);
    --help-modal-radius: 12px;
    --help-modal-pad: 32px;
    --help-modal-pad-sm: 20px;
    --help-modal-body-size: 0.9375rem;
    --help-modal-font-family: 'Inter', system-ui, sans-serif;
}

#help-modal .modaloverlay {
    background: rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    padding: var(--help-modal-gutter);
    z-index: 6000;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #help-modal .modaloverlay {
        background: rgba(0, 0, 0, 0.40);
    }
}

#help-modal.micromodal-slide .modaloverlay {
    opacity: 0;
    transition: opacity 180ms cubic-bezier(0.0, 0.0, 0.2, 1);
    will-change: opacity;
}

#help-modal.micromodal-slide[aria-hidden="false"] .modaloverlay {
    opacity: 1;
}

#help-modal.micromodal-slide[aria-hidden="true"] .modaloverlay {
    opacity: 0;
    pointer-events: none;
    transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
}

#help-modal .modalcontainer {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(67, 223, 231, 0.04), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(255, 179, 102, 0.03), transparent 62%),
        var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--help-modal-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    font-family: var(--help-modal-font-family);
    font-size: var(--help-modal-body-size);
    line-height: 1.65;
    max-height: calc(100vh - (var(--help-modal-gutter) * 2));
    overflow: hidden;
    width: min(980px, calc(100vw - (var(--help-modal-gutter) * 2)));
    will-change: transform, opacity;
}

#help-modal.micromodal-slide[aria-hidden="false"] .modalcontainer {
    animation: mclHelpModalIn 220ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

#help-modal.micromodal-slide[aria-hidden="true"] .modalcontainer {
    animation: mclHelpModalOut 180ms cubic-bezier(0.4, 0.0, 1, 1);
}

#help-modal .modalheader {
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 28px var(--help-modal-pad) 20px;
}

#help-modal .modaltitle,
#help-modal .help-modal-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0;
}

#help-modal .modalclose.modal__close-button {
    position: static;
    top: auto;
    right: auto;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    font-weight: 500;
    padding: 0;
    opacity: 0.85;
    transform: none;
    transition: background-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

#help-modal .modalclose.modal__close-button:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    opacity: 1;
    transform: none;
}

#help-modal .modalclose.modal__close-button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    transform: none;
}

#help-modal .modalbtn {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 8px;
    line-height: 1;
    padding: 10px 18px;
    transition: background-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

#help-modal .modalbtn:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    transform: translateY(-1px);
}

#help-modal .modalbtn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

#help-modal .modalbtn-primary {
    background: var(--accent);
    border-color: transparent;
    color: var(--text-on-accent);
}

#help-modal .modalbtn-primary:hover {
    background: color-mix(in srgb, var(--accent) 92%, black);
    transform: translateY(-1px);
}

#help-modal .modalcontent,
#help-modal .help-modal-content {
    color: var(--text-secondary);
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 32px;
    overflow: auto;
    padding: 32px var(--help-modal-pad) var(--help-modal-pad);
    -webkit-overflow-scrolling: touch;
}

#help-modal .help-section {
    margin: 0;
}

#help-modal .help-section-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 10px;
}

#help-modal .help-section-copy {
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    max-width: 36rem;
}

#help-modal .help-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

#help-modal .help-section-list {
    color: var(--text-secondary);
    line-height: 1.55;
    list-style: disc;
    margin: 0;
    column-count: 2;
    column-gap: 32px;
    padding-left: 1.25rem;
}

#help-modal .help-section-list li {
    break-inside: avoid;
    margin: 0 0 10px;
}

:root[data-bs-theme="light"] #help-modal .modaloverlay {
    background: rgba(0, 0, 0, 0.24);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root[data-bs-theme="light"] #help-modal .modaloverlay {
        background: rgba(0, 0, 0, 0.38);
    }
}

:root[data-bs-theme="light"] #help-modal .modalcontainer {
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(85, 85, 85, 0.03), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(194, 106, 37, 0.025), transparent 62%),
        var(--surface-elevated);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

:root[data-bs-theme="light"] #help-modal .modalclose.modal__close-button:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
}

:root[data-bs-theme="light"] #help-modal .modalbtn {
    background: rgba(0, 0, 0, 0.03);
}

:root[data-bs-theme="light"] #help-modal .modalbtn:hover {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
}

/* Responsive: fall back to single column on narrow screens */
@media (max-width: 720px) {
    .collection-workspace-body .page-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .collection-workspace-body .page-title-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .chord-settings-menu {
        min-width: min(20rem, calc(100vw - 1.5rem));
        right: 0;
    }

    #help-modal .modalheader {
        gap: 16px;
        padding-left: var(--help-modal-pad-sm);
        padding-right: var(--help-modal-pad-sm);
    }

    #help-modal .modalcontent,
    #help-modal .help-modal-content {
        gap: 24px;
        padding-left: var(--help-modal-pad-sm);
        padding-right: var(--help-modal-pad-sm);
    }

    #help-modal .help-section-list {
        column-count: 1;
        column-gap: 0;
    }
}


.chord-edit-modal-slot {
    grid-column: 1;
    width: 100%;
}

.chord-edit-modal-slot.chord-edit-modal-slot--text-card-mode {
    display: flex;
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
}

.chord-edit-modal-container.chord-edit-modal-container--text-card-mode .chord-card.chord-card-spotlight.chord-card-spotlight--modal-layout.is-editing.editing-expanded {
    justify-self: center;
    margin-inline: auto;
    width: 100%;
}

.chord-card-spotlight {
    transform: scale(1.05);
    opacity: 1;
    transition: transform 140ms ease-out, opacity 140ms ease-out;
}

.chord-card.chord-card-spotlight.is-editing.editing-expanded {
    --chord-edit-scale: 2.25;
}

.chord-edit-modal-container .chord-card-spotlight {
    transform: none;
}

.chord-edit-modal-container .chord-card {
    background: transparent;
    border: none;
    box-shadow: none;
    justify-self: center;
    width: min(var(--chord-edit-spotlight-card-width), calc(100% - 0.25rem));
}

.chord-edit-modal-container .chord-card::before {
    display: none;
}

.chord-edit-modal-container .chord-handle {
    display: none;
}

.chord-edit-modal-container .chord-edit {
    display: none;
}

.chord-edit-modal-container .chord-diagram {
    background: transparent;
}

.chord-edit-modal-container .chord-card.chord-card-spotlight.chord-card-spotlight--modal-layout.is-editing.editing-expanded {
    align-content: center;
    display: grid;
    gap: var(--chord-edit-modal-inner-gap);
    min-height: clamp(28rem, 58vh, 34rem);
    padding-bottom: calc(var(--chord-edit-corner-button-size) + 1.5rem);
    position: relative;
    transform: translate(
        var(--modal-spotlight-offset-x, 0px),
        var(--modal-spotlight-offset-y, 0px)
    );
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-header {
    margin-bottom: 0;
    padding-top: calc(var(--chord-edit-primary-corner-button-size, 3.375rem) + 1rem);
    position: relative;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout {
    align-items: start;
    display: grid;
    grid-template-areas:
        "diagram"
        "settings"
        "fields"
        "toolbar";
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--chord-edit-modal-row-gap);
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-diagram {
    grid-area: diagram;
    justify-self: center;
    margin: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-edit-fields {
    grid-area: fields;
    justify-self: center;
    margin-bottom: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
    padding: 0;
    width: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-edit-fields .form-control {
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-edit-fields>.chord-shape-input {
    display: none !important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-symbols-toolbar--modal-layout {
    display: none !important;
    gap: 0.55rem;
    grid-area: toolbar;
    justify-self: center;
    width: min(16.75rem, calc(100% - 2rem));
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-shell {
    --chord-edit-adjacent-control-gap: 30px;
    --chord-edit-settings-control-height: calc(2rem + (0.28rem * 2));
    --chord-edit-history-layout-gap: 49.5px;
    --chord-edit-note-toggle-inline-adjust: 11.125px;
    --chord-edit-note-toggle-y-adjust: -2.3125px;
    --chord-edit-side-control-y-adjust: 0px;
    --chord-settings-toggle-inline-offset: 2em;
    align-items: center;
    display: grid;
    grid-area: settings;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    justify-content: stretch;
    margin-bottom: max(0px, calc(40px - var(--chord-edit-modal-pad-block)));
    margin-top: 1.5rem;
    pointer-events: auto;
    position: relative;
    width: 100%;
    z-index: 14;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-shell>* {
    pointer-events: auto;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-history-cluster {
    align-items: center;
    display: inline-flex;
    gap: 0.48rem;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-inline-end: var(--chord-edit-history-layout-gap);
    margin-top: 2em;
    translate: var(--chord-edit-settings-group-shift-x, 0px) var(--chord-edit-side-control-y-adjust);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-help,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    box-sizing: border-box;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action {
    border-radius: 999px;
    gap: 0.34rem;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    height: var(--chord-edit-settings-control-height);
    margin-left: 0 !important;
    margin-top: 2em !important;
    min-height: var(--chord-edit-settings-control-height);
    padding: 0.28rem 0.72rem;
    position: static;
    scale: 1.3;
    transform: none;
    translate: var(--chord-edit-settings-group-shift-x, 0px) 0;
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo {
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 700;
    grid-column: 1;
    grid-row: 1;
    height: var(--chord-edit-settings-control-height);
    justify-self: start;
    line-height: 1;
    margin-left: var(--chord-settings-toggle-inline-offset);
    margin-top: 2em;
    padding: 0;
    position: static;
    scale: 1.3;
    transform: none;
    width: var(--chord-edit-settings-control-height);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-history-cluster .chord-edit-landing-mobile-undo {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    margin: 0;
    margin-right:1em;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo {
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 700;
    grid-column: 1;
    grid-row: 1;
    height: var(--chord-edit-settings-control-height);
    justify-self: start;
    line-height: 1;
    margin-left: 0;
    margin-top: 2em;
    padding: 0;
    position: static;
    scale: 1.3;
    transform: none;
    width: var(--chord-edit-settings-control-height);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-history-cluster .chord-edit-modal-inline-redo {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    margin: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle {
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 700;
    grid-column: 3;
    grid-row: 1;
    height: var(--chord-edit-settings-control-height);
    justify-self: end;
    line-height: 1;
    margin-left: 0;
    margin-right: calc(var(--chord-settings-toggle-inline-offset) + var(--chord-edit-note-toggle-inline-adjust));
    margin-top: 2em;
    padding: 0;
    position: static;
    scale: 1.3;
    transform: none;
    translate: var(--chord-edit-settings-group-shift-x, 0px) var(--chord-edit-note-toggle-y-adjust);
    width: var(--chord-edit-settings-control-height);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action:focus-visible,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo:focus-visible,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo:focus-visible,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action.is-active {
    background:
        linear-gradient(135deg, color-mix(in srgb, #29c26a 28%, transparent), transparent),
        color-mix(in srgb, var(--surface-elevated) 82%, transparent);
    border-color: color-mix(in srgb, #29c26a 42%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, #29c26a 24%, transparent);
    color: var(--text-primary);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action[disabled],
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo[disabled],
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo[disabled],
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle[disabled] {
    cursor: pointer;
    opacity: 0.56;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo .material-icons-outlined,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo .material-icons-outlined {
    font-size: 0.95rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action-icon {
    font-size: 0.92rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-action-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-help {
    border-radius: 999px;
    bottom: 0.5rem;
    height: var(--chord-edit-corner-button-size, 2.25rem);
    left: 0.5rem;
    padding: 0;
    position: absolute;
    top: auto;
    width: var(--chord-edit-corner-button-size, 2.25rem);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-help:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-help:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 22%, transparent);
    border-color: color-mix(in srgb, var(--accent) 20%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-root-help .material-icons-outlined {
    font-size: var(--chord-edit-corner-icon-size, 1rem);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 135%, transparent);
    border-radius: 999px;
    bottom: 0.5rem;
    color: var(--text-secondary);
    display: inline-flex;
    height: var(--chord-edit-corner-button-size, 2.25rem);
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.5rem;
    width: var(--chord-edit-corner-button-size, 2.25rem);
    z-index: 2;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-toggle:hover,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-toggle:focus-visible,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-toggle[aria-expanded="true"] {
    background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-soft) 18%, transparent);
    color: var(--text-primary);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-toggle .material-icons-outlined {
    color: inherit;
    font-size: var(--chord-edit-corner-icon-size, 1rem);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu {
    bottom: calc(var(--chord-edit-corner-button-size, 3.375rem) + 0.9rem);
    min-width: 20rem;
    padding: var(--space-m);
    right: 0.5rem;
    top: auto;
    z-index: 40;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu--modal-popover {
    bottom: auto;
    right: auto;
    top: auto;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu[data-anchored-overlay-active="true"] {
    bottom: auto;
    right: auto;
    top: auto;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu:not(.chord-settings-menu--open) {
    pointer-events: none;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu {
    --modal-settings-font-size: calc(var(--fz-12) * 1.25);
    bottom: calc(var(--chord-edit-corner-inset) + var(--chord-edit-corner-button-size) + 0.75rem);
    left: auto;
    max-height: min(360px, calc(100vh - 2rem));
    min-width: calc(20rem + 150px);
    padding: var(--space-m);
    right: var(--chord-edit-corner-inset);
    top: auto;
    z-index: 16;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-mode-bar {
    display: grid;
    gap: var(--space-xs);
    margin-bottom: var(--space-s);
    position: static;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-mode-bar--keyboard {
    display: none !important;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-mode-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: calc(var(--radius-component) + 2px);
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    min-height: 2.35rem;
    padding: 0.42rem 0.52rem;
    width: 100%;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-mode-toggle-copy {
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    gap: 0.45rem;
    font-family: var(--font-inter);
    font-size: var(--modal-settings-font-size);
    font-weight: 600;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-mode-toggle .chord-suggestions-mode-option {
    font-family: var(--font-inter);
    font-size: var(--modal-settings-font-size);
    font-weight: 600;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestions-group {
    display: grid;
    gap: var(--space-xs);
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.35rem;
    padding: 0.42rem 0.52rem;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row-trailing {
    gap: 0.5rem;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-copy,
#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row .chord-suggestions-mode-option,
#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row .chord-suggestions-option-copy {
    font-family: var(--font-inter);
    font-size: var(--modal-settings-font-size);
    font-weight: 600;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-copy {
    white-space: nowrap;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row .chord-suggestions-segmented {
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    justify-self: end;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row.chord-suggestions-option-row {
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: calc(var(--radius-component) + 2px);
    box-shadow: none;
    color: var(--text-primary);
    column-gap: var(--settings-gap);
    min-height: 2.35rem;
    padding: 0.42rem 0.52rem;
    white-space: normal;
}

#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row.chord-suggestions-option-row:hover,
#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row.chord-suggestions-option-row:focus-within,
#chord-edit-modal .chord-edit-modal-actions .chord-edit-settings-menu .chord-edit-settings-suggestion-row.chord-suggestions-option-row.is-active {
    background: color-mix(in srgb, var(--accent-soft) 26%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu .chord-edit-mode-bar {
    display: grid;
    gap: var(--space-xs);
    margin-bottom: var(--space-s);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu .chord-edit-mode-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: calc(var(--radius-component) + 2px);
    display: flex;
    justify-content: space-between;
    min-height: 2.35rem;
    padding: 0.42rem 0.52rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-menu .chord-edit-mode-toggle-copy {
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    gap: 0.45rem;
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-weight: 600;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-title {
    font-size: 140%;
    padding-top: 0;
    position: relative;
    top: -0.8em!important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-title-edit-in-place {
    --chord-title-padding-top: 0;
    --chord-title-pill-pad-block: var(--chord-modal-title-pill-pad-block, 0.5em);
    --chord-title-pill-pad-inline: var(--chord-modal-title-pill-pad-inline, 0.5em);
    color: var(--accent);
    font-size: 140%;
    padding-top: 0;
    position: relative;
    top: -0.8em !important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal {
    grid-column: 1 / -1;
    display: grid;
    justify-self: center;
    max-width: min(42rem, calc(100% - 1rem));
    margin-inline: auto;
    padding-bottom: calc(var(--chord-edit-corner-button-size) + 1.75rem);
    place-items: center;
    transform: none;
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-modal-header {
    display: none !important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout {
    align-items: center;
    display: grid;
    grid-template-areas:
        "fields"
        "toolbar";
    justify-items: center;
    margin-inline: auto;
    min-height: min(24rem, calc(100vh - 14rem));
    place-items: center;
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-settings-shell,
.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-symbols-toolbar--modal-layout,
.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal>.chord-diagram,
.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-diagram,
.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-shape-input {
    display: none !important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields {
    align-items: center;
    display: grid !important;
    height: auto;
    margin: 0 auto;
    max-width: min(42rem, calc(100vw - 2.5rem));
    overflow: visible;
    padding: 0;
    place-items: center;
    width: min(42rem, calc(100vw - 2.5rem));
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input {
    --text-card-input-max-height: calc(
        100dvh
        - var(--chord-edit-overlay-pad-top, 0px)
        - var(--chord-edit-overlay-pad-bottom, 0px)
        - var(--chord-edit-modal-pad-block, 1.25rem)
        - var(--chord-edit-modal-pad-block, 1.25rem)
        - var(--chord-edit-corner-button-size, 3.375rem)
        - 4rem
    );
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) padding-box,
        color-mix(in srgb, var(--surface-elevated) 96%, #111 4%) !important;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 180%, rgba(255, 255, 255, 0.08));
    border-radius: calc(var(--radius-card) - 1px);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.16),
        0 6px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    box-sizing: border-box;
    display: block !important;
    font-family: var(--font-inter);
    font-size: clamp(1rem, 0.92rem + 0.28vw, 1.08rem);
    font-weight: 500;
    line-height: 1.5;
    margin: 0 auto;
    max-width: calc(100% - 0.25rem);
    max-height: min(30rem, var(--text-card-input-max-height));
    min-height: min(12rem, var(--text-card-input-max-height));
    overflow-y: auto;
    overflow-wrap: break-word;
    padding: 1.1rem 1.2rem;
    resize: vertical;
    text-align: left;
    transition:
        border-color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1),
        background-color 160ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: pre-wrap;
    width: min(calc(27ch + 2.4rem), calc(100% - 0.25rem));
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input::placeholder {
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input:focus,
.chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input:focus-visible {
    background: var(--editable-text-surface-focus-bg) !important;
    border: 1px solid var(--editable-text-surface-focus-border) !important;
    box-shadow: var(--editable-text-surface-focus-shadow) !important;
    outline: none;
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-close {
    display: none;
}

#chord-edit-modal .chord-name-suggest-dock {
    align-self: start;
    grid-column: 2;
    left: auto !important;
    max-height: none;
    max-width: var(--chord-edit-suggest-dock-width) !important;
    min-width: var(--chord-edit-suggest-dock-width) !important;
    overflow: visible;
    position: static !important;
    top: auto !important;
    width: var(--chord-edit-suggest-dock-width) !important;
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    font-size: calc(var(--fz-14, 0.875rem) * 0.9);
    height: 100%;
    justify-content: center;
    max-height: none !important;
    overflow: visible !important;
    padding: 0.15rem 0 0.3rem !important;
    transform: translate(40px, -106px) !important;
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-header {
    display: none;
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-list {
    gap: 0.44rem;
    justify-self: center !important;
    margin-left: 0;
    margin-right: 0;
    margin-top: 5em;
    max-height: max(8rem, calc((100% - 3em - 40px) / 1.265)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: 0.25rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    padding-top: 0.25rem;
    scale: 1.4;
    scrollbar-gutter: stable;
    transform-origin: top center;
    width: calc((100% + 30px) / 1.265);
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-item {
    padding: 0.46rem 0.598rem;
}

#chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-left {
    max-width: none;
}

#chord-edit-modal .chord-edit-modal-suggestions-mode-shell {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    left: var(--modal-suggestion-mode-left);
    margin: 0;
    padding-bottom: 0.15rem;
    position: absolute;
    top: var(--modal-suggestion-mode-top);
    transform: translate(
        calc(-50% + var(--modal-suggestion-mode-offset-x, 0px)),
        calc(-50% + var(--modal-suggestion-mode-offset-y, 0px))
    );
    visibility: hidden;
    width: max-content;
    z-index: 18;
}

#chord-edit-modal .chord-edit-modal-container.modal-suggestion-mode-positioned .chord-edit-modal-suggestions-mode-shell {
    visibility: visible;
}

#chord-edit-modal .chord-edit-modal-suggestions-mode-shell .chord-suggestions-mode-row {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    column-gap: 0.55rem;
    display: inline-flex;
    justify-content: center;
    margin: 0;
    padding: 0.34rem 0.42rem 0.34rem 0.68rem;
}

#chord-edit-modal .chord-edit-modal-suggestions-mode-shell .chord-suggestions-mode-label {
    color: color-mix(in srgb, var(--text-primary) 86%, transparent);
    font-size: 0.78rem;
}

#chord-edit-modal .chord-edit-modal-suggestions-mode-shell .chord-suggestions-segmented {
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel {
    display: grid;
    gap: 0.45rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-bar {
    justify-content: stretch;
    position: static;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-bar--keyboard {
    display: none !important;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle {
    align-items: center;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 10%, transparent), transparent),
        color-mix(in srgb, var(--surface-elevated) 90%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 125%, transparent);
    box-shadow: none;
    gap: 0.55rem;
    justify-content: space-between;
    min-height: 1.95rem;
    padding: 0.26rem 0.36rem 0.26rem 0.58rem;
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-copy {
    font-size: 0.7rem;
    gap: 0.38rem;
    letter-spacing: 0.01em;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-copy--multiline {
    align-items: center;
    line-height: 1.15;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-icon {
    font-size: 0.92rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-track {
    height: 1.22rem;
    padding: 0.1rem;
    width: 2.18rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-thumb {
    height: 0.76rem;
    width: 0.76rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-edit-mode-toggle-input:checked+.chord-edit-mode-toggle-track .chord-edit-mode-toggle-thumb {
    transform: translateX(0.88rem);
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-section,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-copy,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-advanced {
    text-align: center;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-section,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-copy,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-advanced {
    max-width: none;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-section {
    background: transparent;
    border-color: color-mix(in srgb, var(--border-subtle) 95%, transparent);
    border-radius: calc(var(--radius-component) - 1px);
    box-shadow: none;
    padding: 0.38rem 0.42rem 0.4rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-heading {
    gap: 0.25rem;
    margin-bottom: 0.28rem;
    justify-content: center;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-title {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-status {
    background: transparent;
    border: none;
    font-size: 0.53rem;
    letter-spacing: 0.05em;
    padding: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-bar {
    justify-content: center;
    margin-bottom: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-button {
    font-size: 0.66rem;
    padding: 0.28rem 0.46rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-copy,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-advanced {
    display: none;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-copy,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-helper-advanced-copy {
    text-wrap: pretty;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-symbols-palette {
    grid-area: palette;
    width: 100%;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-symbols-palette-region {
    justify-self: center;
    width: 100%;
}

@media (max-width: 1180px) {
    .modal__container.chord-edit-modal-container {
        left: 0;
    }

    .chord-symbols-palette-region {
        --chord-symbols-palette-region-height: clamp(7.7rem, 21vh, 9rem);
    }

    .chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout {
        grid-template-areas:
            "diagram"
            "settings"
            "fields"
            "toolbar";
        grid-template-columns: minmax(0, 1fr);
    }

    .chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-diagram {
        justify-self: center;
    }

    .chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout {
        grid-template-areas:
            "fields"
            "toolbar";
        justify-items: center;
        place-items: center;
    }
}

@media (max-height: 980px) {
    #chord-edit-modal .modal__overlay {
        --chord-edit-overlay-pad-top: clamp(0.65rem, 2.5vh, 1.4rem);
        --chord-edit-overlay-pad-bottom: clamp(0.65rem, 2.2vh, 1.25rem);
    }

    .modal__container.chord-edit-modal-container {
        --chord-edit-modal-pad-block: calc(clamp(1.15rem, 1.9vh, 1.35rem) + 50px);
        --chord-edit-modal-pad-inline: calc(clamp(1.3rem, 2.2vw, 1.55rem) + 50px);
        --chord-edit-modal-inner-gap: clamp(0.58rem, 1vh, 0.9rem);
        --chord-edit-modal-row-gap: clamp(0.55rem, 0.95vh, 0.82rem);
    }

    .chord-symbols-palette-region {
        --chord-symbols-palette-region-height: clamp(7.7rem, 19vh, 8.9rem);
    }
}

@media (max-width: 900px) {
    #chord-edit-modal .modal__overlay {
        --chord-edit-overlay-pad-top: clamp(0.65rem, 2.5vh, 1.35rem);
        --chord-edit-overlay-pad-bottom: clamp(0.65rem, 2.2vh, 1.2rem);
    }

    .modal__container.chord-edit-modal-container {
        --chord-edit-modal-pad-block: calc(1.35rem + 50px);
        --chord-edit-modal-pad-inline: calc(1.4rem + 50px);
    }

    .chord-symbols-palette-region {
        --chord-symbols-palette-region-height: clamp(6.9rem, 18vh, 8rem);
    }
}

@media (max-height: 860px) {
    #chord-edit-modal .modal__overlay {
        --chord-edit-overlay-pad-top: clamp(0.5rem, 2vh, 1rem);
        --chord-edit-overlay-pad-bottom: clamp(0.5rem, 1.8vh, 0.95rem);
    }

    .modal__container.chord-edit-modal-container {
        --chord-edit-modal-pad-block: calc(clamp(1rem, 1.55vh, 1.15rem) + 50px);
        --chord-edit-modal-pad-inline: calc(clamp(1.15rem, 2vw, 1.4rem) + 50px);
        --chord-edit-modal-inner-gap: clamp(0.5rem, 0.9vh, 0.72rem);
        --chord-edit-modal-row-gap: clamp(0.48rem, 0.85vh, 0.7rem);
    }

    .chord-symbols-palette-region {
        --chord-symbols-palette-region-height: clamp(6.25rem, 15vh, 7.1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chord-symbols-palette-region {
        transition: none;
    }

    .chord-symbols-palette-region .chord-symbols-palette {
        transition: none;
        will-change: auto;
    }
}

.chord-card-placeholder {
    visibility: hidden;
    margin-bottom: 1rem;
}

#base-fret-modal .base-fret-modal-box {
    align-items: center;
    background:
        radial-gradient(900px 360px at 18% 0%, rgba(67, 223, 231, 0.04), transparent 60%),
        radial-gradient(900px 360px at 92% 0%, rgba(255, 179, 102, 0.03), transparent 62%),
        var(--surface-elevated, #2a282d);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    border-radius: var(--radius-card);
    max-width: 400px;
    min-width: 240px;
    text-align: center;
}

#base-fret-modal .base-fret-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
}

#base-fret-modal-title {
    font-family: var(--font-inter);
    font-size: var(--fz-20);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: var(--lh-tight);
}

#base-fret-modal-hint {
    color: var(--text-secondary);
    font-size: var(--fz-14);
    line-height: 1.5;
    margin-top: var(--space-1);
    max-width: 28ch;
    text-align: center;
}

#base-fret-modal-value {
    margin-top: var(--space-2);
}

#base-fret-modal .base-fret-input {
    background: var(--surface, var(--surface-elevated, #2a282d));
    border: 1px solid var(--border-light, var(--border-subtle));
    border-radius: var(--radius-component);
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: var(--fz-14);
    font-weight: 500;
    height: 2rem;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-top: var(--space-m);
    min-width: 3.2rem;
    outline: none;
    padding: var(--space-s) var(--space-m);
    text-align: center;
    width: 3.2rem;
}

#base-fret-modal .base-fret-input:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

#base-fret-modal .base-fret-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.disabled-section .base-fret-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
    cursor: not-allowed;
}

:root[data-bs-theme="light"] #base-fret-modal-value {
    background: rgba(0, 0, 0, 0.04);
}


.row {
    max-width: 99%;
}

/* Hover and focus for primary buttons */
.collection-workspace-body .page-title-row .primary-button:hover,
.collection-workspace-body .page-title-row .primary-button:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 50%, #004654);
    border-color: color-mix(in srgb, var(--border-subtle) 120%, #0d6efd);
    color: #fff;
    transform: translateY(-1px);
}

.collection-workspace-body .page-title-row .primary-button:hover .material-icons-outlined,
.collection-workspace-body .page-title-row .primary-button:focus-visible .material-icons-outlined {
    color: #fff;
}

#redo-history-btn {
    margin-right: 0;
}

.chord-settings-menu-section {
    display: grid;
    gap: var(--space-xs);
}

.chord-settings-menu-section--actions {
    margin-bottom: var(--space-s);
}

.chord-settings-divider {
    background: color-mix(in srgb, var(--border-subtle) 85%, transparent);
    height: 1px;
    margin: 0 0 var(--space-m);
}

.chord-settings-action,
.chord-settings-subaction {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-component);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-inter);
    font-size: var(--fz-13);
    font-weight: 500;
    gap: var(--space-xs);
    justify-content: flex-start;
    line-height: 1.25;
    min-height: 2.4rem;
    padding: 0.6rem 0.8rem;
    text-align: left;
    transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 100%;
}

.chord-settings-action .material-icons-outlined,
.chord-settings-subaction .material-icons-outlined {
    font-size: 1.15rem;
    opacity: 0.8;
}

.chord-settings-action:hover,
.chord-settings-action:focus-visible,
.chord-settings-subaction:hover,
.chord-settings-subaction:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 26%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    transform: translateY(-1px);
}

.chord-settings-action:focus-visible,
.chord-settings-subaction:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.chord-settings-action[disabled],
.chord-settings-subaction[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.chord-settings-submenu {
    display: grid;
    gap: var(--space-xs);
}

.chord-settings-action--submenu {
    justify-content: space-between;
    padding-right: 0.7rem;
}

.chord-settings-action-main {
    align-items: center;
    display: inline-flex;
    gap: var(--space-xs);
}

.chord-settings-action-chevron {
    margin-left: auto;
    transition: transform 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-settings-action--submenu.is-open .chord-settings-action-chevron {
    transform: rotate(90deg);
}

.chord-settings-submenu-panel {
    border-left: 1px solid color-mix(in srgb, var(--border-subtle) 120%, transparent);
    display: grid;
    gap: var(--space-xs);
    margin-left: 0.75rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 0.85rem;
    transform: translateY(-4px);
    transition: max-height 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 160ms cubic-bezier(0.4, 0, 0.2, 1), padding-top 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-settings-submenu-panel--open {
    max-height: 12rem;
    opacity: 1;
    padding-top: 0.15rem;
    transform: translateY(0);
}

.chord-settings-submenu-panel--suggestions.chord-settings-submenu-panel--open {
    max-height: 24rem;
}

.chord-settings-subaction {
    min-height: 2.25rem;
}

.chord-settings-subaction--layout-row.chord-settings-row {
    background: transparent;
    border-color: var(--border-subtle);
    border-radius: var(--radius-component);
    column-gap: var(--space-xs);
    min-height: 2.25rem;
    padding: 0.6rem 0.8rem;
}

.chord-settings-submenu-panel .chord-settings-subaction--layout-row:hover,
.chord-settings-submenu-panel .chord-settings-subaction--layout-row:focus-within {
    background: color-mix(in srgb, var(--accent-soft) 26%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    transform: translateY(-1px);
}

.chord-settings-subaction--layout-row .chord-settings-label {
    font-size: var(--fz-13);
    width: auto;
}

.chord-settings-subaction--layout-row .chord-settings-value {
    font-size: var(--fz-13);
}

.chord-settings-row--menu-card {
    background: transparent;
    border-color: var(--border-subtle);
    border-radius: var(--radius-component);
    min-height: 2.4rem;
    padding: 0.6rem 0.8rem;
}

.chord-settings-row--menu-card:hover,
.chord-settings-row--menu-card:focus-within {
    background: color-mix(in srgb, var(--accent-soft) 26%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    transform: translateY(-1px);
}

.chord-settings-row--toggle {
    column-gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr) auto;
}

.chord-settings-copy {
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-inter);
    font-size: var(--fz-13);
    font-weight: 500;
    line-height: 1.25;
    margin: 0;
    min-width: 0;
}

span.chord-settings-copy {
    cursor: default;
}

.chord-settings-row-trailing {
    align-items: center;
    display: inline-flex;
    gap: var(--space-s);
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
}

.chord-settings-row-trailing--with-input {
    gap: 0.72rem;
}

.chord-settings-menu {
    --settings-gap: var(--space-s);
    background:
        radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, var(--accent-soft) 22%, transparent), transparent 58%),
        var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-modal);
    color: var(--text-primary);
    max-inline-size: min(22rem, calc(100vw - 16px));
    min-width: 20rem;
    opacity: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-m);
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-xs));
    transform: translateY(-4px);
    transition: opacity 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 24;
}

.chord-settings-menu--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chord-settings-row {
    align-items: center;
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: calc(var(--radius-component) + 2px);
    column-gap: var(--settings-gap);
    display: grid;
    grid-template-columns: 1fr auto;
    min-height: 3.1rem;
    padding: 0.65rem 0.8rem;
    transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.chord-settings-row:hover,
.chord-settings-row:focus-within {
    background: color-mix(in srgb, var(--accent-soft) 22%, var(--surface) 78%);
    border-color: color-mix(in srgb, var(--border-subtle) 185%, transparent);
}

.chord-settings-label {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: var(--space-s);
    grid-template-columns: minmax(0, 1fr) auto;
    font-family: var(--font-inter);
    font-size: var(--fz-14);
    font-weight: 500;
    margin: 0;
    width: 100%;
}

.chord-settings-label span {
    min-width: 0;
}

.chord-settings-toggle-input,
.chord-settings-label input[type="checkbox"] {
    appearance: none;
    background: color-mix(in srgb, var(--text-secondary) 24%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 170%, transparent);
    border-radius: var(--radius-pill);
    cursor: pointer;
    height: 1.45rem;
    justify-self: end;
    margin: 0;
    order: 2;
    position: relative;
    transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 2.5rem;
}

.chord-settings-toggle-input::after,
.chord-settings-label input[type="checkbox"]::after {
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
    content: "";
    height: 1rem;
    left: 0.18rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1), background 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 1rem;
}

.chord-settings-toggle-input:checked,
.chord-settings-label input[type="checkbox"]:checked {
    background: color-mix(in srgb, var(--accent) 76%, #0e1b1b);
    border-color: color-mix(in srgb, var(--accent) 68%, transparent);
}

.chord-settings-toggle-input:checked::after,
.chord-settings-label input[type="checkbox"]:checked::after {
    transform: translate(1rem, -50%);
}

.chord-settings-toggle-input:focus-visible,
.chord-settings-label input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus-ring) 75%, transparent);
    outline: none;
}

.chord-settings-value {
    align-items: center;
    display: inline-flex;
    font-family: var(--font-inter);
    gap: var(--space-xs);
}

.chord-settings-input-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    margin-right: 0.3rem;
}

#max-per-row-input {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-component);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    width: 4.2rem;
}

.chord-settings-row.is-disabled {
    opacity: 0.62;
}

.chord-settings-segmented-controls {
    min-width: 0;
}

.chord-settings-note-label-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 16rem);
}

.chord-settings-note-label-option {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.05;
    min-width: 0;
    padding-inline: 0.5rem;
    text-align: center;
    white-space: normal;
}

.chord-settings-note-label-option-copy {
    display: inline-block;
}

.chord-header-note-label-mode-toggle {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    min-width: 2.45rem;
}

.chord-header-note-label-mode-toggle.is-active {
    box-shadow: none;
}

.collection-workspace-body #share-collection-btn {
    margin-right: 2em;
}

.chord-settings-row.is-disabled .chord-settings-value {
    cursor: not-allowed;
}

.chord-settings-row.is-disabled input[disabled] {
    cursor: not-allowed;
}

.chord-settings-row.is-disabled:hover,
.chord-settings-row.is-disabled:focus-within {
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 145%, transparent);
}

@media (max-width: 820px) {
    .modal__container.chord-edit-modal-container {
        left: 0;
        row-gap: clamp(0.65rem, 2.4vh, 1rem);
        grid-template-columns: minmax(0, 1fr);
        width: min(calc(var(--chord-edit-spotlight-card-width) + (var(--chord-edit-modal-pad-inline) * 2)),
                calc(100vw - 2.25rem));
    }

    #chord-edit-modal .chord-name-suggest-dock {
        display: block;
        grid-column: 1;
        justify-self: auto;
        left: var(--mobile-chord-suggest-left, 50%) !important;
        margin-top: 0;
        max-width: min(95vw, 100%) !important;
        min-width: 0 !important;
        position: absolute !important;
        top: var(--mobile-chord-suggest-top, auto) !important;
        transform: translateX(-50%);
        width: min(95vw, 100%) !important;
    }

    #chord-edit-modal .chord-name-suggest-panel {
        font-size: var(--mobile-chord-suggest-font-size, inherit);
        max-height: none;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible;
        padding-top: 0 !important;
        width: 100%;
    }

    #chord-edit-modal .chord-name-suggest-list {
        max-width: 95vw;
        margin-top: 0 !important;
        max-height: none;
        overflow: visible;
        width: 100%;
    }
}

.chord-settings-row--segmented {
    align-items: start;
}

.chord-theme-mode-row {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
}

.chord-theme-mode-row .chord-theme-mode-segmented {
    grid-column: 2;
    justify-self: end;
}

.chord-theme-mode-row #help-toggle.chord-settings-help-button {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-component);
    box-shadow: none;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    grid-column: 1;
    height: 2rem;
    justify-content: center;
    justify-self: start;
    min-height: 2rem;
    min-width: 2rem;
    padding: 0;
    transition: background 160ms cubic-bezier(0.4, 0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0, 0.2, 1), color 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 2rem;
}

.chord-theme-mode-row #help-toggle.chord-settings-help-button .material-icons-outlined {
    color: currentColor;
    font-size: 1.2rem;
    line-height: 1;
}

.chord-theme-mode-row #help-toggle.chord-settings-help-button:hover,
.chord-theme-mode-row #help-toggle.chord-settings-help-button:focus-visible {
    background: color-mix(in srgb, var(--accent-soft) 26%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle) 150%, transparent);
    color: var(--text-primary);
}

.chord-theme-mode-row #help-toggle.chord-settings-help-button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.chord-theme-mode-row .chord-suggestions-mode-option {
    color: var(--text-primary);
    font-size: var(--fz-13);
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
}

.chord-settings-row--segmented .chord-settings-label,
.chord-suggestions-mode-label {
    color: var(--text-primary);
    cursor: default;
    font-family: var(--font-inter);
    font-size: var(--fz-14);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.chord-suggestions-controls {
    display: grid;
    justify-items: end;
    justify-self: end;
    min-width: 0;
}

.chord-suggestions-segmented {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 145%, transparent);
    border-radius: var(--radius-pill);
    display: inline-flex;
    gap: 0.15rem;
    justify-self: end;
    padding: 0.16rem;
}

.chord-suggestions-mode-option {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: var(--radius-pill);
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
    cursor: pointer;
    font-family: var(--font-inter);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    min-height: 1.65rem;
    padding: 0.34rem 0.62rem;
    transition:
        background 160ms cubic-bezier(0.4, 0, 0.2, 1),
        color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.chord-suggestions-mode-option:hover,
.chord-suggestions-mode-option:focus-visible {
    color: var(--text-primary);
}

.chord-suggestions-mode-option:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus-ring) 75%, transparent);
    outline: none;
}

.chord-suggestions-mode-option.is-active {
    background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface-elevated));
    color: var(--text-primary);
}

.chord-suggestions-options {
    justify-self: end;
    position: relative;
}

.chord-suggestions-options-button {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 54%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 125%, transparent);
    border-radius: var(--radius-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
    cursor: pointer;
    display: inline-flex;
    gap: 0.3rem;
    justify-content: center;
    min-height: 1.68rem;
    min-width: 0;
    padding: 0.24rem 0.52rem 0.24rem 0.62rem;
    transition:
        background 160ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1),
        color 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-suggestions-options-button:hover,
.chord-suggestions-options-button:focus-visible,
.chord-suggestions-options-button.is-open {
    background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface-elevated));
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-suggestions-options-button:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus-ring) 75%, transparent);
    outline: none;
}

.chord-suggestions-options-button-copy {
    font-family: var(--font-inter);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    min-width: 0;
    white-space: nowrap;
}

.chord-suggestions-options-button-icon {
    font-size: 1rem;
    line-height: 1;
    transition: transform 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chord-suggestions-options-button.is-open .chord-suggestions-options-button-icon {
    transform: rotate(180deg);
}

.chord-suggestions-options-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
        color-mix(in srgb, var(--surface-elevated) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 140%, transparent);
    border-radius: calc(var(--radius-component) - 1px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
    display: grid;
    gap: 0.56rem;
    justify-items: stretch;
    min-width: max-content;
    padding: 0.52rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.42rem);
    z-index: 30;
}

.chord-suggestions-options-panel[hidden] {
    display: none;
}

.chord-suggestions-options-panel--menu {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 0.4rem;
    min-width: 0;
    padding: 0;
    position: static;
    right: auto;
    top: auto;
}

.chord-suggestions-option-row {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated) 52%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 118%, transparent);
    border-radius: var(--radius-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
    column-gap: 0.58rem;
    cursor: pointer;
    display: grid;
    font-family: var(--font-inter);
    font-size: 0.72rem;
    font-weight: 700;
    grid-template-columns: minmax(0, 1fr) auto;
    letter-spacing: 0;
    min-height: 1.68rem;
    min-width: 0;
    padding: 0.18rem 0.22rem 0.18rem 0.56rem;
    transition:
        background 160ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1),
        color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        opacity 160ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.chord-suggestions-options-section {
    display: grid;
    gap: 0.32rem;
}

.chord-suggestions-options-section--inline {
    align-items: baseline;
    column-gap: 0.42rem;
    display: flex;
    flex-wrap: nowrap;
}

.chord-suggestions-menu-item {
    cursor: default;
    transform: none;
}

.chord-suggestions-menu-item:hover,
.chord-suggestions-menu-item:focus-visible {
    transform: none;
}

.chord-suggestions-menu-item__content,
.chord-suggestions-options-section--inline.chord-suggestions-menu-item__content {
    align-items: center;
    column-gap: 0.5rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.chord-suggestions-menu-item .chord-suggestions-options-section-heading,
.chord-suggestions-menu-item .chord-suggestions-option-copy,
.chord-suggestions-menu-item .chord-suggestions-mode-option {
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: var(--fz-13);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

.chord-suggestions-options-section-heading {
    color: color-mix(in srgb, var(--text-secondary) 88%, transparent);
    font-family: var(--font-inter);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.1;
    padding-inline: 0.08rem;
    text-transform: uppercase;
}

.chord-suggestions-options-section .chord-suggestions-segmented {
    justify-self: stretch;
}

.chord-suggestions-options-section--inline .chord-suggestions-options-section-heading {
    align-items: center;
    display: inline-flex;
    min-height: 1.68rem;
    padding-inline: 0;
    text-transform: none;
}

.chord-suggestions-options-section .chord-suggestions-mode-option {
    flex: 1 1 0;
}

.chord-suggestions-menu-item .chord-suggestions-option-copy {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    min-width: 0;
}

.chord-suggestions-menu-item .chord-suggestions-segmented {
    justify-self: end;
}

.chord-suggestions-menu-item > .chord-suggestions-option-row {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
    padding: 0;
    width: 100%;
}

.chord-suggestions-option-row:hover,
.chord-suggestions-option-row:focus-within,
.chord-suggestions-option-row.is-active {
    background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface-elevated));
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border-subtle));
    color: var(--text-primary);
}

.chord-suggestions-option-row.is-disabled {
    cursor: not-allowed;
    opacity: 0.54;
}

.chord-suggestions-option-copy {
    line-height: 1;
    min-width: 0;
}

.chord-suggestions-option-input {
    appearance: none;
    background: color-mix(in srgb, var(--text-secondary) 20%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 160%, transparent);
    border-radius: var(--radius-pill);
    cursor: pointer;
    height: 1.18rem;
    margin: 0;
    position: relative;
    transition:
        background 160ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 160ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 2.1rem;
}

.chord-suggestions-option-input::after {
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
    content: "";
    height: 0.8rem;
    left: 0.16rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition:
        transform 160ms cubic-bezier(0.4, 0, 0.2, 1),
        background 160ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 0.8rem;
}

.chord-suggestions-option-input:checked {
    background: color-mix(in srgb, var(--accent) 74%, #0e1b1b);
    border-color: color-mix(in srgb, var(--accent) 62%, transparent);
}

.chord-suggestions-option-input:checked::after {
    transform: translate(0.88rem, -50%);
}

.chord-suggestions-option-input:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus-ring) 75%, transparent);
    outline: none;
}

.chord-suggestions-option-input:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-mode-row {
    min-height: 2.45rem;
    padding: 0.42rem 0.46rem 0.42rem 0.58rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-mode-label {
    font-size: 0.7rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-controls {
    gap: 0;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-mode-option {
    font-size: 0.68rem;
    min-height: 1.38rem;
    padding: 0.28rem 0.46rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-options-button,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-option-row {
    column-gap: 0.46rem;
    min-height: 1.42rem;
    padding: 0.14rem 0.2rem 0.14rem 0.46rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-options-button-copy,
.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-option-copy {
    font-size: 0.66rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-options-section-heading {
    font-size: 0.62rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-option-input {
    height: 1.08rem;
    width: 1.96rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-option-input::after {
    height: 0.72rem;
    width: 0.72rem;
}

.chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-edit-settings-panel .chord-suggestions-option-input:checked::after {
    transform: translate(0.8rem, -50%);
}

@media (max-width: 575px) {
    .chord-settings-row--segmented {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.45rem;
    }

    .chord-settings-row--with-input {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.45rem;
    }

    .chord-suggestions-controls {
        justify-items: stretch;
        justify-self: stretch;
        width: 100%;
    }

    .chord-suggestions-segmented {
        justify-self: stretch;
        width: 100%;
    }

    .chord-suggestions-mode-option {
        flex: 1 1 0;
    }

    .chord-suggestions-options,
    .chord-suggestions-options-button,
    .chord-suggestions-options-panel,
    .chord-suggestions-option-row,
    .chord-suggestions-segmented {
        justify-self: stretch;
        width: 100%;
    }

    .chord-suggestions-options-panel {
        min-width: 0;
    }

    .chord-settings-row-trailing,
    .chord-settings-row-trailing--with-input,
    .chord-settings-segmented-controls,
    .chord-settings-note-label-segmented {
        justify-self: stretch;
        width: 100%;
    }

    .chord-settings-row-trailing--with-input {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
}


/* Keep semantic icon colors for lock states */
.collection-workspace-body .page-title-row .lock-button[data-locked="false"] .material-icons-outlined,
.app-shell-topbar__page-slot .lock-button[data-locked="false"] .material-icons-outlined {
    color: #00B499;
}

.collection-workspace-body .page-title-row .lock-button[data-locked="true"] .material-icons-outlined,
.app-shell-topbar__page-slot .lock-button[data-locked="true"] .material-icons-outlined {
    color: #D0A097;
}

/* 8-across spacing tune */
body>.row {
    padding-inline: calc(clamp(0.5rem, 1vw, 1.25rem) * var(--space-AandE));
}

main.container,
.container {
    max-width: calc(98% + (2% * (1 - var(--space-AandE))));
}

.row {
    max-width: calc(99% + (1% * (1 - var(--space-AandE))));
}

.collection-workspace-body .group {
    padding-inline: calc(0.5em * var(--space-BandD));
}

.collection-workspace-body .group.group.mb-4 {
    padding-inline: calc(var(--space-4) * var(--space-BandD));
}

@media (min-width: 768px) {
    .collection-workspace-body .group {
        padding-inline: calc(var(--space-5) * var(--space-BandD));
    }
}

.collection-workspace-body #groups-root .chord-grid {
    column-gap: var(--workspace-chord-grid-gap);
}

/* Vertical spacing tune (V1–V7) */
.collection-workspace-body .group {
    padding-block-start: calc(0.5em * var(--spaceV-6));
    padding-block-end: calc(0.5em * var(--spaceV-1));
}

.chord-card {
    padding-block-start: calc(0.12rem * var(--spaceV-4));
    padding-block-end: calc(0.12rem * var(--spaceV-2));
}

.chord-card .position-relative.mb-1 {
    margin-bottom: calc(0.25rem * var(--spaceV-3));
}

.collection-workspace-body #groups-root .chord-card:not(.collection-text-card)>.position-relative.mb-1 {
    margin-bottom: calc((0.25rem * var(--spaceV-3)) + 6px);
}

.chord-card .chord-title {
    --chord-title-padding-top: calc(1em * var(--spaceV-4));
    padding-top: var(--chord-title-padding-top);
}

.collection-workspace-body .group-header {
    gap: calc(2em * var(--spaceV-5));
}

.collection-workspace-body .group-header.mb-2 {
    margin-bottom: calc(0.5rem * var(--spaceV-5));
}

.collection-workspace-body .group-buttons .add-chord,
.collection-workspace-body .group-buttons .delete-chords {
    height: calc(32px * var(--spaceV-5));
    padding: calc(var(--space-1) * var(--spaceV-5));
    width: calc(32px * var(--spaceV-5));
}

.collection-workspace-body .group.mb-4 {
    margin-bottom: calc(1.5rem * var(--spaceV-7));
}

@media (min-width: 768px) {
    .collection-workspace-body .group {
        padding-block-start: calc(var(--space-5) * var(--spaceV-6));
        padding-block-end: calc(var(--space-5) * var(--spaceV-1));
    }
}

/* Lock icon: unlocked = light green, locked = subtle red */
.collection-workspace-body .page-title-row .lock-button[data-locked="false"] .material-icons-outlined {
    color: #00B499;
}

.collection-workspace-body .page-title-row .lock-button[data-locked="true"] .material-icons-outlined {
    color: #D0A097;
}

:root[data-bs-theme="light"] .chord-card:hover {
    border: 1px solid transparent;
}

.chords-max-per-row-active #groups-root .chord-grid {
    column-gap: clamp(var(--workspace-chord-grid-gap), 1.2vw, var(--workspace-chord-grid-gap-max));
    grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--diagram-u) * var(--chord-card-width-u)), 100%), 1fr));
    margin-inline: auto;
    max-width: calc(var(--chord-grid-max-columns) * var(--diagram-u) * var(--chord-card-width-u) + (var(--chord-grid-max-columns) - 1) * var(--workspace-chord-grid-gap-max));
    width: 100%;
}

@media (max-width: 700px) {
    .collection-workspace-body[data-workspace-layout-route="true"] {
        --workspace-chord-grid-gap: 0.3rem;
        --workspace-chord-grid-gap-max: 0.3rem;
        --spaceV-1: 0.48;
        --spaceV-2: 0.48;
        --spaceV-3: 0.48;
        --spaceV-4: 0.48;
        --spaceV-5: 0.74;
        --spaceV-6: 0;
        --spaceV-7: 0.03;
        --min-height-multiplier: 0.56;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-main {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-handle,
    .collection-workspace-body[data-workspace-layout-route="true"] .row-drag-handle,
    .collection-workspace-body[data-workspace-layout-route="true"] .group-handle {
        -webkit-touch-callout: none;
        -webkit-user-drag: none;
        -webkit-user-select: none;
        touch-action: none;
        user-select: none;
    }

    body.collection-workspace-body[data-workspace-layout-route="true"].chord-drag-intent-active #groups-root,
    body.collection-workspace-body[data-workspace-layout-route="true"].chord-drag-intent-active #groups-root *,
    body.collection-workspace-body[data-workspace-layout-route="true"].chord-card-drag-active #groups-root,
    body.collection-workspace-body[data-workspace-layout-route="true"].chord-card-drag-active #groups-root *,
    body.collection-workspace-body[data-workspace-layout-route="true"].chord-sortable-drag-active #groups-root,
    body.collection-workspace-body[data-workspace-layout-route="true"].chord-sortable-drag-active #groups-root *,
    body.collection-workspace-body[data-workspace-layout-route="true"].group-dnd-drag-active #groups-root,
    body.collection-workspace-body[data-workspace-layout-route="true"].group-dnd-drag-active #groups-root * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] #groups-root {
        margin-top: var(--space-1);
        --diagram-u: min(calc(var(--diagram-base-u) * 1.22), calc((100vw - 3.55rem) / 8.95));
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-group {
        margin-top: 0.05rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-row {
        align-items: flex-start;
        margin-bottom: 0.12rem;
        padding-bottom: 0.08rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-meta {
        justify-content: flex-start;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline {
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline .page-breadcrumb,
    .collection-workspace-body[data-workspace-layout-route="true"] .page-title-headline .page-title {
        text-align: left;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .page-title {
        font-size: 0.95rem;
        width: 100%;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group {
        margin-bottom: 0.45rem;
        padding: 0.56rem 0.44rem 0.44rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group.group.mb-4 {
        padding-inline: 0.44rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group-header {
        align-items: center;
        gap: 0.3rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group-header.mb-2 {
        margin-bottom: 0.26rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group-name {
        font-size: 1rem;
        padding-left: 0 !important;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] #groups-root .chord-grid {
        column-gap: var(--workspace-chord-grid-gap);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        row-gap: 0.4rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"].chords-max-per-row-active #groups-root .chord-grid {
        column-gap: var(--workspace-chord-grid-gap);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        margin-inline: 0;
        max-width: none;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card {
        --chord-card-corner-inset-block: 0.18rem;
        --chord-card-corner-inset-inline-start: 0.18rem;
        --chord-card-corner-inset-inline-end: 0.02rem;
        min-width: 0;
        padding: 0.38rem 0.14rem 0.28rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] #groups-root .chord-card:not(.collection-text-card)>.chord-header-row,
    .collection-workspace-body[data-workspace-layout-route="true"] #groups-root .chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title) {
        transform: translateY(-1.35em);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card .position-relative.mb-1 {
        margin-bottom: 0.05rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card .chord-title {
        --chord-title-padding-top: 0.8em;
        font-size: 0.92rem;
        padding-top: var(--chord-title-padding-top);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card .chord-title-edit-in-place {
        --chord-title-padding-top: 0.8em;
        font-size: 0.92rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card.collection-text-card {
        --text-card-action-gap-block: 1.5em;
        --text-card-action-row-alignment-trim: calc(var(--text-card-action-gap-block) + 0.2em);
        --text-card-align-extra-block-size: 0px;
        --text-card-align-offset-block-start: 14px;
        --text-card-edit-inset-block-end: calc(0.42rem + 1.5em + var(--text-card-align-extra-block-size));
        --text-card-edit-inset-block-start: 0.52rem;
        --text-card-edit-inset-inline: 0.72rem;
        justify-self: center;
        margin-block-start: var(--text-card-align-offset-block-start);
        margin-inline: 4px;
        max-width: calc(100% - 24px);
        padding:
            var(--text-card-edit-inset-block-start)
            var(--text-card-edit-inset-inline)
            var(--text-card-edit-inset-block-end);
        transform: none;
        width: calc(100% - 24px);
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card.collection-text-card>.chord-header-row,
    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card.collection-text-card>.position-relative.mb-1:has(>.chord-title) {
        padding-top: 0;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .chord-card.collection-text-card .chord-title {
        --note-card-line-height: 1.28;
        font-size: 0.78rem;
        margin-inline: auto;
        max-width: 11.25ch;
        text-align: center;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] #groups-root .chord-card.collection-text-card .chord-name-input {
        --note-card-line-height: 1.28;
        font-size: 0.78rem;
        max-width: 11.25ch;
        text-align: center;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-edit,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-handle,
    .collection-workspace-body[data-route-kind="collection-workspace"] .collection-card .collection-edit {
        background: color-mix(in srgb, var(--surface-elevated, #2a282d) 82%, transparent);
        border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 155%, transparent);
        border-radius: 999px;
        opacity: 1 !important;
        padding: 0.18rem;
        pointer-events: auto !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card-root-action,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card-note-label-mode-toggle,
    .collection-workspace-body[data-route-kind="collection-workspace"] .group .group-header .group-root-action,
    .collection-workspace-body[data-route-kind="collection-workspace"] .group .group-header .add-chord,
    .collection-workspace-body[data-route-kind="collection-workspace"] .group .group-header .delete-chords,
    .collection-workspace-body[data-workspace-layout-route="true"] .group .group-header .export-group,
    .collection-workspace-body[data-workspace-layout-route="true"] .group-footer-actions .export-group {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card-root-action {
        margin-left: 0;
        margin-top: 0.25rem !important;
        padding: calc(0.22rem * var(--chord-card-root-action-scale)) calc(0.66rem * var(--chord-card-root-action-scale));
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-handle,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-edit {
        border-color: color-mix(in srgb, var(--border-subtle) 135%, transparent);
        padding: 0;
        position: static;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-card-root-action,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-handle,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-edit {
        background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
        border-color: color-mix(in srgb, var(--border-subtle) 135%, transparent);
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-card-root-action:hover,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-card-root-action:focus-visible,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-handle:hover,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-handle:focus-visible,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-edit:hover,
    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card .chord-card-root-action-row .chord-edit:focus-visible {
        background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
        border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
        color: var(--text-primary);
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card-note-label-mode-toggle {
        margin-left: 0;
        margin-right: var(--chord-settings-toggle-inline-offset);
        margin-top: 0.45rem;
        width: 2rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .chord-card-root-action .group-root-action-label {
        display: none;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons {
        gap: 0.28rem;
        margin-right: 0;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons .group-root-action,
    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons .add-chord,
    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons .delete-chords,
    .collection-workspace-body[data-workspace-layout-route="true"] .group-buttons .export-group {
        min-height: 2rem;
        min-width: 2rem;
        padding: 0.3rem 0.45rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons .group-root-action {
        gap: 0;
        margin-right: 0;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] .group-buttons .group-root-action-label {
        display: none;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group-footer-actions {
        margin-top: 0.45rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .group-footer-actions .export-group {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-workspace-layout.is-phone-sidebar-mode.is-phone-sidebar-open .collection-sidebar-panel__icon-action {
        opacity: 1;
        pointer-events: auto;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] .collection-sidebar-panel__header {
        padding: 0.6rem;
    }

    .collection-workspace-body[data-workspace-layout-route="true"] #app-tooltip {
        display: none !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .modal__overlay {
        --chord-edit-overlay-pad-top: 0px;
        --chord-edit-overlay-pad-bottom: 0px;
        --chord-edit-overlay-pad-inline: 0px;
        align-items: flex-start;
        height: 100svh;
        height: 100dvh;
        min-height: 100svh;
        min-height: 100dvh;
        overflow: hidden;
        overscroll-behavior: contain;
        padding: 0 !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-container {
        --chord-edit-corner-button-size: 3rem;
        --chord-edit-corner-icon-size: 1.5rem;
        --chord-edit-primary-corner-button-size: var(--chord-edit-corner-button-size);
        --chord-edit-primary-corner-icon-size: var(--chord-edit-corner-icon-size);
        --chord-edit-spotlight-card-width: min(100%, 19.25rem);
        --chord-edit-suggest-dock-width: min(100%, 17rem);
        align-content: start;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
            color-mix(in srgb, var(--surface-elevated, #18171a) 96%, rgba(255, 255, 255, 0.02));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        box-sizing: border-box;
        display: block;
        height: 100svh;
        height: 100dvh;
        margin-block: 0;
        max-height: 100svh;
        max-height: 100dvh;
        min-height: 100svh;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: calc(env(safe-area-inset-top, 0px) + 0.95rem) 0.85rem calc(env(safe-area-inset-bottom, 0px) + 1.15rem);
        width: 100vw;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-slot {
        width: 100%;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card.chord-card-spotlight.chord-card-spotlight--modal-layout.is-editing.editing-expanded {
        --chord-edit-scale: 1.7;
        align-content: start;
        gap: 0.7rem;
        min-height: auto;
        padding-bottom: 0;
        transform: none;
        width: 100%;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-modal-header {
        --chord-title-edit-mobile-width: min(95vw, max(var(--chord-title-neck-w), var(--chord-title-edit-measured-width, var(--chord-title-neck-w))));
        grid-template-columns: 0 0 var(--chord-title-edit-mobile-width) 0 !important;
        justify-self: center;
        max-width: 95vw;
        padding-top: 25px;
        width: var(--chord-title-edit-mobile-width) !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-title {
        font-size: 1.8rem;
        top: 0 !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-title-edit-in-place {
        font-size: 1.8rem;
        max-width: 95vw;
        top: 0 !important;
        width: var(--chord-title-edit-mobile-width, 100%) !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-title-edit-input {
        max-width: 95vw;
        min-width: 0;
        width: 100%;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout {
        row-gap: 0.55rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-section--modal-layout>.chord-diagram {
        justify-self: center;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-settings-shell {
        --chord-edit-history-layout-gap: var(--chord-edit-adjacent-control-gap);
        --chord-edit-note-toggle-inline-adjust: var(--chord-edit-adjacent-control-gap);
        --chord-edit-note-toggle-y-adjust: 0px;
        --chord-edit-side-control-y-adjust: 0px;
        margin-bottom: 0;
        margin-top: 2em;
    }




    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-root-action {
        gap: 0.45rem;
        height: 2.1rem;
        margin: 0 !important;
        min-height: 2.1rem;
        padding: 0.34rem 0.88rem;
        scale: 1;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-history-cluster {
        gap: 0.45rem;
        margin: 0 var(--chord-edit-history-layout-gap) 0 0;
        translate: var(--chord-edit-settings-group-shift-x, 0px) var(--chord-edit-side-control-y-adjust);
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-landing-mobile-undo {
        height: 2.1rem;
        margin: 0 0 0 var(--chord-settings-toggle-inline-offset);
        scale: 1;
        width: 2.1rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-modal-inline-redo {
        height: 2.1rem;
        margin: 0;
        scale: 1;
        width: 2.1rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-history-cluster .chord-edit-landing-mobile-undo {
        margin: 0;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-note-label-mode-toggle {
        height: 2.1rem;
        margin: 0 calc(var(--chord-settings-toggle-inline-offset) + var(--chord-edit-note-toggle-inline-adjust)) 0 0;
        scale: 1;
        translate: var(--chord-edit-settings-group-shift-x, 0px) var(--chord-edit-note-toggle-y-adjust);
        width: 2.1rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-root-action-label {
        font-size: 0.82rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-dock {
        align-self: center;
        display: block;
        left: auto !important;
        margin: 0 auto;
        max-width: min(100%, 17rem) !important;
        min-width: 0 !important;
        position: static !important;
        top: auto !important;
        transform: none !important;
        width: min(100%, 17rem) !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-panel,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-panel.is-modal-docked {
        font-size: 0.95rem !important;
        height: auto !important;
        justify-content: flex-start !important;
        max-width: 100% !important;
        overflow: visible !important;
        padding: 0 !important;
        transform: none !important;
        width: 100% !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-list,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-list {
        gap: 0.38rem;
        margin-top: 0 !important;
        max-height: none !important;
        max-width: none !important;
        overflow: visible !important;
        padding: 0.15rem 0 0 !important;
        scale: 1;
        width: 100% !important;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-item,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-name-suggest-panel.is-modal-docked .chord-name-suggest-item {
        padding: 0.56rem 0.72rem;
    }

    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-suggestions-mode-shell,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-root-help,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-card-spotlight--modal-layout .chord-edit-settings-toggle,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-action-button--draft-undo,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-action-button--draft-redo,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-action-button--help,
    .collection-workspace-body[data-route-kind="collection-workspace"] #chord-edit-modal .chord-edit-modal-action-button--settings {
        display: none !important;
    }
}



.my-chords-toast-root {
    position: fixed;
    bottom: 5vh;
    left: 0;
    right: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding-inline: 1.25rem;
    pointer-events: none;
    z-index: 3600;
}

.my-chords-toast {
    background: #00d3dc;
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-elevated);
    color: var(--text-on-accent, #0e1b1b);
    font-size: var(--fz-14);
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
    max-width: min(420px, 100%);
    opacity: 0;
    padding: var(--space-2) var(--space-3);
    pointer-events: auto;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 180ms ease;
}

.my-chords-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

:root[data-bs-theme="light"] .my-chords-toast {
    background: royalblue;
    border-color: transparent;
    box-shadow: var(--shadow-elevated);
    color: #ffffff;
}


/* Chord naming toast (diagram-driven suggestions) */
.chord-naming-toast {
    position: absolute;
    z-index: 4200;
    max-width: 260px;
    background: rgba(12, 12, 14, 0.9);
    color: #f5f7fb;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 8px 10px;
    font-family: var(--font-label);
    font-size: 14px;
    font-synthesis: none;
    line-height: 1.3;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

.chord-naming-toast[aria-hidden="true"] {
    opacity: 0;
    transform: translateY(-4px);
    display: none;
}

.chord-naming-toast-title {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 4px;
}

.chord-naming-toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chord-naming-toast-item {
    white-space: pre-wrap;
}

/* ========================================
   PRINT LAYOUT (Workspace Main Surface)
   ======================================== */
@page {
    background: #ffffff;
    margin: 0.5in;
    size: portrait;
}

@media print {

    :root,
    :root[data-bs-theme="dark"],
    :root[data-bs-theme="light"] {
        --accent: #000000;
        --accent-soft: rgba(0, 0, 0, 0.08);
        --border-subtle: rgba(0, 0, 0, 0.85);
        --chord-edit-scale: 1;
        --diagram-fret-label-col-w: .37;
        --diagram-fret-label-font-scale: .45;
        --diagram-fret-label-translate-x: -.1;
        --diagram-header-gap: .5em;
        --diagram-header-offset: .2;
        --diagram-header-row-h: .2;
        --diagram-u: 0.58rem;
        --color-bg: #ffffff;
        --color-fg: #000000;
        --focus-ring: transparent;
        --root-dot-color: #000000;
        --shadow-elevated: none;
        --shadow-modal: none;
        --shadow-standard: none;
        --shadow-subtle: none;
        --surface: #ffffff;
        --surface-elevated: #ffffff;
        --text-on-accent: #000000;
        --text-primary: #000000;
        --text-secondary: #242424;
        --workspace-chord-grid-gap: 0.08in;
        --workspace-chord-grid-gap-max: 0.08in;
        --workspace-print-card-wrap-gap: 0.08in;
        --workspace-print-group-gap: clamp(0.18in, 1.6vh, 0.34in);
        --workspace-print-row-gap: clamp(0.12in, 1.15vh, 0.24in);
    }

    html,
    body,
    .app-shell-body,
    .collection-workspace-body {
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        min-width: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    * {
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .collection-workspace-body,
    .collection-workspace-body .app-shell-main.container,
    .collection-workspace-body .app-shell-main>.row,
    .collection-workspace-body .app-shell-main>.row>*,
    .collection-workspace-body .collection-workspace-layout,
    .collection-workspace-body .collection-workspace-main,
    #collection-workspace-main {
        background: #ffffff !important;
        background-color: #ffffff !important;
        margin: 0 !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .collection-workspace-body.collection-sidebar-drawer-open {
        overflow: visible !important;
    }

    .collection-workspace-body .collection-workspace-layout {
        display: block !important;
    }

    .collection-workspace-body .collection-sidebar-shell,
    .collection-workspace-body .page-title-actions,
    .collection-workspace-body .chord-settings-wrap,
    .collection-workspace-body .group-handle,
    .collection-workspace-body .group-buttons,
    .collection-workspace-body .group-footer-actions,
    .collection-workspace-body .group-insert-zone,
    .collection-workspace-body .group-insert-plus,
    .collection-workspace-body .group-insert-tooltip,
    .collection-workspace-body .delete-group-pill,
    .collection-workspace-body .chord-handle,
    .collection-workspace-body .chord-edit,
    .collection-workspace-body .delete-chord-btn,
    .collection-workspace-body .chord-card-root-action-row,
    .collection-workspace-body .chord-card-root-action,
    .collection-workspace-body .chord-card-note-label-mode-toggle,
    .collection-workspace-body .page-breadcrumb,
    .collection-workspace-body .row-insert-zone,
    .collection-workspace-body .row-insert-action,
    .collection-workspace-body .row-insert-plus,
    .collection-workspace-body .my-chords-toast-root,
    .collection-workspace-body .my-chords-toast,
    .collection-workspace-body .chord-naming-toast,
    .collection-workspace-body .chord-dup-source-placeholder,
    .collection-workspace-body [data-dup-source-placeholder="true"],
    .collection-workspace-body #import-chords-area,
    .collection-workspace-body #chord-settings-menu,
    .collection-workspace-body #chord-edit-modal,
    .collection-workspace-body #base-fret-modal,
    .collection-workspace-body #help-modal,
    .collection-workspace-body .modal__overlay,
    .collection-workspace-body .modal__container {
        display: none !important;
    }

    .collection-workspace-main,
    #collection-workspace-main {
        display: block !important;
        min-width: 0 !important;
        transform-origin: top left !important;
        width: 100% !important;
        zoom: 0.76 !important;
    }

    .collection-workspace-body .page-title-group {
        break-after: avoid-page;
        margin-bottom: 0.24in !important;
        page-break-after: avoid;
    }

    .collection-workspace-body .page-title-row {
        align-items: start !important;
        border-bottom: 0 !important;
        display: block !important;
        margin-bottom: 0 !important;
        padding-bottom: 0.04in !important;
    }

    .collection-workspace-body .page-title {
        color: #000000 !important;
        font-size: 16pt !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
        margin: 0 !important;
    }

    .collection-workspace-body .page-title::after,
    .collection-workspace-body [data-tooltip]::before,
    .collection-workspace-body [data-tooltip]::after {
        display: none !important;
    }

    #groups-root {
        background: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        row-gap: var(--workspace-print-group-gap) !important;
        margin-top: 0 !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .collection-workspace-body #groups-root .chord-grid,
    .collection-workspace-body.chords-max-per-row-active #groups-root .chord-grid {
        background: transparent !important;
        break-inside: avoid-page;
        box-sizing: border-box !important;
        column-gap: var(--workspace-chord-grid-gap) !important;
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
        justify-content: start !important;
        max-width: 100% !important;
        min-width: 0 !important;
        page-break-inside: avoid;
        row-gap: var(--workspace-print-card-wrap-gap) !important;
        width: 100% !important;
    }

    .collection-workspace-body .group {
        background: #ffffff !important;
        border: 0 !important;
        border-radius: 0 !important;
        break-inside: auto;
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 0 !important;
        max-width: 100% !important;
        min-width: 0 !important;
        page-break-inside: auto;
        padding: 0 !important;
        row-gap: var(--workspace-print-row-gap) !important;
        width: 100% !important;
    }

    .group-header,
    .collection-workspace-body .group-header {
        align-items: start !important;
        border-bottom: 0 !important;
        break-after: avoid-page;
        display: block !important;
        gap: 0.08in !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        page-break-after: avoid;
        padding-bottom: 0 !important;
        position: relative !important;
        z-index: 12 !important;
    }

    .group-title-area,
    .collection-workspace-body .group-title-area {
        align-items: start !important;
        display: block !important;
        position: relative !important;
        width: 100%;
        z-index: 13 !important;
    }

    .group-name,
    .collection-workspace-body .group-name,
    .collection-workspace-body .group-name.form-control,
    .collection-workspace-body .chord-name-input,
    .collection-workspace-body .chord-title,
    .collection-workspace-body .collection-title {
        -webkit-appearance: none !important;
        appearance: none !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        color: #000000 !important;
        font-weight: 600 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .group-name,
    .collection-workspace-body .group-name,
    .collection-workspace-body .group-name.form-control {
        display: block !important;
        font-size: 15pt !important;
        height: auto !important;
        line-height: 1.1 !important;
        min-height: 0 !important;
        padding-left: 8px !important;
        padding-top: 30px !important;
        position: relative !important;
        width: 100% !important;
        z-index: 14 !important;
    }

    #groups-root .chord-card:not(.collection-text-card)>.chord-header-row,
    #groups-root .chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title),
    .collection-workspace-body #groups-root .chord-card:not(.collection-text-card)>.chord-header-row,
    .collection-workspace-body #groups-root .chord-card:not(.collection-text-card)>.position-relative.mb-1:has(>.chord-title) {
        align-items: start !important;
        display: grid !important;
        grid-template-columns: var(--chord-title-fret-label-w) minmax(0, var(--chord-title-neck-w)) !important;
        justify-items: center !important;
        margin-top: 0.04in !important;
        row-gap: 0.14in !important;
        transform: none !important;
        width: calc(var(--chord-title-neck-w) + var(--chord-title-fret-label-w)) !important;
    }

    .chord-card .chord-title,
    .collection-card .collection-title,
    .chord-name-input,
    .collection-workspace-body .chord-card .chord-title,
    .collection-workspace-body .collection-card .collection-title,
    .collection-workspace-body .chord-name-input {
        display: block !important;
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        text-align: center !important;
        width: 100% !important;
    }

    .collection-workspace-body .chord-card.collection-text-card {
        align-items: stretch !important;
        display: flex !important;
        justify-content: flex-start !important;
        opacity: 1 !important;
    }

    .collection-workspace-body .chord-card.collection-text-card>.chord-header-row,
    .collection-workspace-body .chord-card.collection-text-card>.position-relative.mb-1:has(>.chord-title) {
        display: block !important;
        margin: 0 !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .collection-workspace-body .chord-card.collection-text-card .chord-title {
        --note-card-line-height: 1.18;
        display: -webkit-box !important;
        font-size: 8pt !important;
        font-weight: 500 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: var(--note-card-line-clamp);
        line-height: var(--note-card-line-height) !important;
        margin-top: 16px !important;
        max-height: calc(var(--note-card-line-clamp) * var(--note-card-line-height) * 1em) !important;
        max-width: 100% !important;
        overflow: hidden !important;
        overflow-wrap: anywhere !important;
        text-align: center !important;
        white-space: pre-wrap !important;
        word-break: normal !important;
    }

    .chord-diagram,
    .collection-workspace-body .chord-diagram {
        overflow: visible !important;
    }

    .chord-fret-label,
    .collection-workspace-body .chord-fret-label {
        background: transparent !important;
        background-color: transparent !important;
        left: auto !important;
        overflow: visible !important;
        position: relative !important;
        text-align: right !important;
        transform: translateX(calc(var(--fret-label-tx) * var(--u))) translateY(calc(var(--fret-label-ty) * var(--u))) !important;
        white-space: nowrap !important;
        z-index: auto !important;
    }

    .chord-fret-label-button,
    .chord-fret-label-input,
    .collection-workspace-body .chord-fret-label-button,
    .collection-workspace-body .chord-fret-label-input {
        background: transparent !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        color: #000000 !important;
        outline: 0 !important;
        resize: none !important;
        transform: translate(10px, -50%) !important;
        z-index: 21 !important;
    }

    .chord-diagram thead th .chord-header-label,
    .chord-diagram thead th .chord-header-placeholder,
    .collection-workspace-body .chord-diagram thead th .chord-header-label,
    .collection-workspace-body .chord-diagram thead th .chord-header-placeholder {
        bottom: calc(var(--header-gap) + var(--u) * var(--diagram-header-offset)) !important;
        transform: translate(-50%, 2px) !important;
    }

    .chord-diagram thead th.chord-header-string .chord-dot-wrap,
    .collection-workspace-body .chord-diagram thead th.chord-header-string .chord-dot-wrap {
        bottom: calc(var(--header-gap) + var(--u) * var(--diagram-header-offset)) !important;
        transform: translate(-50%, 1px) !important;
    }

    .chord-footer-label,
    .collection-workspace-body .chord-footer-label {
        font-size: calc(var(--u) * var(--header-font-scale) * 0.75) !important;
        transform: translate(-50%, calc(-50% + var(--u) * var(--diagram-footer-offset) + 6px)) !important;
    }

    .chord-diagram,
    .chord-footer-row,
    .collection-workspace-body .chord-diagram,
    .collection-workspace-body .chord-footer-row {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .chord-footer-row,
    .collection-workspace-body .chord-footer-row {
        transform: none !important;
    }

    .collection-workspace-body .chord-card,
    .collection-workspace-body .collection-card {
        background: #ffffff !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        break-inside: avoid-page;
        color: #000000 !important;
        justify-self: stretch !important;
        page-break-inside: avoid;
        margin-bottom: 0 !important;
        min-height: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0.01in !important;
        padding-block: 0.01in !important;
        padding-inline: 0.015in !important;
        transform: none !important;
        width: auto !important;
    }

    .collection-workspace-body .chord-card.collection-text-card {
        transform: none !important;
    }

    .collection-workspace-body .chord-card::before,
    .collection-workspace-body .chord-card::after,
    .collection-workspace-body .group::before,
    .collection-workspace-body .group::after {
        display: none !important;
    }

    .collection-workspace-body .chord-diagram,
    .collection-workspace-body .chord-diagram tbody td,
    .collection-workspace-body .chord-diagram thead th {
        background: #ffffff !important;
        border-color: #000000 !important;
        color: #000000 !important;
    }

    .chord-diagram tbody .chord-string-cell,
    .collection-workspace-body .chord-diagram tbody .chord-string-cell {
        background: transparent !important;
        background-color: transparent !important;
    }

    .chord-diagram tbody tr[data-fret]:first-child .chord-string-cell,
    .collection-workspace-body .chord-diagram tbody tr[data-fret]:first-child .chord-string-cell {
        background-image: linear-gradient(#000000, #000000) !important;
        background-position: 0 -2px !important;
        background-repeat: no-repeat !important;
        background-size: 100% var(--nutline-width-px, calc(var(--u) * var(--nutline-width))) !important;
        border-top: 0 !important;
        position: relative !important;
        z-index: 4 !important;
    }

    .chord-diagram thead th.chord-header-string .chord-dot-wrap,
    .collection-workspace-body .chord-diagram thead th.chord-header-string .chord-dot-wrap {
        z-index: 1 !important;
    }

    .chord-dot-filled,
    .chord-dot.root-played,
    .collection-workspace-body .chord-dot-filled,
    .collection-workspace-body .chord-dot.root-played {
        background: transparent !important;
        background-color: #ffffff !important;
        border: 1px solid #000000 !important;
        border-color: #000000 !important;
        color: #000000 !important;
    }

    .chord-header-root-played,
    .collection-workspace-body .chord-header-root-played {
        background: #000000 !important;
        background-color: #000000 !important;
        border: 1px solid #000000 !important;
        border-color: #000000 !important;
        color: #ffffff !important;
    }

    .collection-workspace-body .chord-dot.root-ghost,
    .collection-workspace-body .chord-header-root-ghost {
        background: #ffffff !important;
        border-color: #000000 !important;
        color: #000000 !important;
    }

    .collection-workspace-body .chord-dot.root-ghost .chord-dot-mini,
    .collection-workspace-body .chord-header-root-ghost .chord-header-root-mini,
    .collection-workspace-body .chord-dot.root-ghost::after,
    .collection-workspace-body .chord-header-root-ghost::after {
        background: #000000 !important;
    }

    .chord-dot-label,
    .chord-dot.root-played .chord-dot-label,
    .chord-dot.root-played .chord-dot-note-label,
    .chord-dot-interval-label,
    .chord-header-root-label,
    .chord-fret-label,
    .chord-header-fret,
    .collection-workspace-body .chord-dot-label,
    .collection-workspace-body .chord-dot.root-played .chord-dot-label,
    .collection-workspace-body .chord-dot.root-played .chord-dot-note-label,
    .collection-workspace-body .chord-dot-interval-label,
    .collection-workspace-body .chord-footer-label,
    .collection-workspace-body .chord-fret-label,
    .collection-workspace-body .chord-header-fret,
    .collection-workspace-body .chord-header-muted,
    .collection-workspace-body .chord-header-open,
    .collection-workspace-body .chord-header-label,
    .collection-workspace-body .chord-header-root-label,
    .collection-workspace-body .collection-body-placeholder,
    .collection-workspace-body #empty-msg {
        color: #000000 !important;
    }

    .chord-dot.root-played .chord-dot-label,
    .collection-workspace-body .chord-dot.root-played .chord-dot-label {
        font-size: calc(var(--u) * var(--dot-size) * 0.92 - 2pt) !important;
        transform: none !important;
    }

    .chord-dot-interval-label.print-interval-label--mid-compact,
    .collection-workspace-body .chord-dot-interval-label.print-interval-label--mid-compact {
        font-size: calc(var(--interval-u) * var(--dot-size) * var(--diagram-interval-font-scale) - 2pt) !important;
    }

    .chord-header-root-played .chord-header-root-label,
    .collection-workspace-body .chord-header-root-played .chord-header-root-label {
        color: #ffffff !important;
    }
}


.form-control.form-control-sm.group-name {
    padding-left: 0.5rem !important;
}

/* ========================================
   SONG MODE
   ======================================== */

/* --- Song Mode Toggle Switch --- */
.song-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    cursor: pointer;
    user-select: none;
    position: relative;
    margin-right: 0.75em;
}

.song-mode-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.song-mode-track {
    display: inline-flex;
    align-items: center;
    width: 32px;
    height: 18px;
    background: var(--border-subtle);
    border-radius: 999px;
    padding: 2px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.song-mode-thumb {
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.song-mode-checkbox:checked+.song-mode-track {
    background: var(--accent);
}

.song-mode-checkbox:checked+.song-mode-track .song-mode-thumb {
    transform: translateX(14px);
    background: var(--text-on-accent);
}

.song-mode-checkbox:focus-visible+.song-mode-track {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.song-mode-text {
    font-size: var(--fz-12);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.song-mode-checkbox:checked~.song-mode-text {
    color: var(--accent);
}

/* --- Song Mode Row Container (visible only in Song Mode) --- */
.song-mode-row {
    display: none;
}

.group.song-mode .song-mode-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-s);
    width: 100%;
}

/* --- Section Label --- */
.song-section-label-wrap {
    display: none;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 0.5em;
}

.group.song-mode .song-section-label-wrap {
    display: flex;
}

.song-section-label {
    width: 2.5em;
    min-width: 2.5em;
    max-width: 4em;
    padding: 0.25em 0.35em;
    font-family: 'Roboto Condensed', system-ui, sans-serif;
    font-size: var(--fz-16);
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-xxs);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.song-section-label:hover {
    border-color: var(--border-subtle);
    background: color-mix(in srgb, var(--accent-soft) 20%, transparent);
}

.song-section-label:focus {
    outline: none;
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
}

.song-section-label::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* --- Song Mode Chords Wrapper --- */
.song-mode-chords-wrap {
    flex: 1;
    min-width: 0;
}

/* --- Roadmap Marker --- */
.song-roadmap-wrap {
    display: none;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 0.5em;
}

.group.song-mode .song-roadmap-wrap {
    display: flex;
}

.song-roadmap {
    width: 5em;
    min-width: 4em;
    max-width: 8em;
    padding: 0.25em 0.4em;
    font-family: var(--font-inter);
    font-size: var(--fz-12);
    font-style: italic;
    font-weight: var(--font-weight-regular);
    text-align: right;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-xxs);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.song-roadmap:hover {
    border-color: var(--border-subtle);
    background: color-mix(in srgb, var(--accent-soft) 20%, transparent);
}

.song-roadmap:focus {
    outline: none;
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
    color: var(--text-primary);
    font-style: normal;
}

.song-roadmap::placeholder {
    color: var(--text-secondary);
    opacity: 0.4;
    font-style: italic;
}

/* --- Song Mode Layout: Horizontal Flex --- */
.group.song-mode .chord-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-xs);
    grid-template-columns: none;
}

/* --- Song Mode: Scaled Down Chord Cards --- */
.group.song-mode .chord-card {
    --diagram-u: 1.0rem;
    flex-shrink: 0;
    flex-grow: 0;
    margin-bottom: 0;
}

.group.song-mode .chord-card .chord-diagram {
    transform-origin: top center;
}

.group.song-mode .chord-card .chord-title {
    font-size: var(--fz-12);
    padding-top: 0.5em;
}

/* Hide row drag handle in Song Mode (single row) */
.group.song-mode .row-drag-handle {
    display: none;
}

.group.song-mode .row-insert-zone {
    display: none;
}

/* --- Light Theme Adjustments for Song Mode --- */
:root[data-bs-theme="light"] .song-mode-track {
    background: #c8c8c8;
}

:root[data-bs-theme="light"] .song-mode-thumb {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

:root[data-bs-theme="light"] .song-mode-checkbox:checked+.song-mode-track {
    background: var(--accent);
}

:root[data-bs-theme="light"] .song-mode-checkbox:checked+.song-mode-track .song-mode-thumb {
    background: #ffffff;
}

:root[data-bs-theme="light"] .song-mode-text {
    color: #2f2f2f;
}

:root[data-bs-theme="light"] .song-mode-checkbox:checked~.song-mode-text {
    color: var(--accent);
}

:root[data-bs-theme="light"] .song-section-label,
:root[data-bs-theme="light"] .song-roadmap {
    color: #000000;
}

:root[data-bs-theme="light"] .song-section-label:hover,
:root[data-bs-theme="light"] .song-roadmap:hover {
    border-color: #c8c8c8;
    background: rgba(0, 0, 0, 0.03);
}

:root[data-bs-theme="light"] .song-section-label:focus,
:root[data-bs-theme="light"] .song-roadmap:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.05);
}

/* ========================================
   SONG MODE: BARLINES & ARRANGEMENTS
   ======================================== */

/* --- Barline Element --- */
.song-barline {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 3em;
    width: 12px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease;
}

.song-barline:hover {
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
    border-radius: var(--radius-xxs);
}

.song-barline.selected {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: var(--radius-xxs);
}

/* Barline inner container for lines */
.song-barline-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    min-height: 3em;
}

/* Single barline │ */
.song-barline[data-bar-type="single"] .song-barline-inner::after {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

/* Double barline ║ */
.song-barline[data-bar-type="double"] .song-barline-inner::before,
.song-barline[data-bar-type="double"] .song-barline-inner::after {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="double"] .song-barline-inner {
    gap: 3px;
}

/* Final barline │║ (thin + thick) */
.song-barline[data-bar-type="final"] .song-barline-inner::before {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="final"] .song-barline-inner::after {
    content: '';
    display: block;
    width: 4px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="final"] .song-barline-inner {
    gap: 2px;
}

/* Repeat start ║: (thick + thin + dots) */
.song-barline[data-bar-type="repeat-start"] .song-barline-inner {
    gap: 2px;
}

.song-barline[data-bar-type="repeat-start"] .song-barline-inner::before {
    content: '';
    display: block;
    width: 4px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="repeat-start"] .song-barline-inner::after {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="repeat-start"] .repeat-dots {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-left: 3px;
}

.song-barline[data-bar-type="repeat-start"] .repeat-dots::before,
.song-barline[data-bar-type="repeat-start"] .repeat-dots::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
}

/* Repeat end :║ (dots + thin + thick) */
.song-barline[data-bar-type="repeat-end"] .song-barline-inner {
    gap: 2px;
}

.song-barline[data-bar-type="repeat-end"] .song-barline-inner::before {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="repeat-end"] .song-barline-inner::after {
    content: '';
    display: block;
    width: 4px;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 1px;
}

.song-barline[data-bar-type="repeat-end"] .repeat-dots {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-right: 3px;
    order: -1;
}

.song-barline[data-bar-type="repeat-end"] .repeat-dots::before,
.song-barline[data-bar-type="repeat-end"] .repeat-dots::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
}

/* --- Ending Brackets --- */
.song-ending {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    align-self: stretch;
    min-width: 24px;
    padding: 2px 6px 0 4px;
    font-size: var(--fz-11);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    border-left: 2px solid var(--text-secondary);
    border-top: 2px solid var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.song-ending:hover {
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
}

.song-ending.selected {
    background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Insert Zone (hover affordance) --- */
.song-insert-zone {
    display: none;
    position: relative;
    width: 16px;
    min-height: 3em;
    align-self: stretch;
    cursor: pointer;
    flex-shrink: 0;
}

.group.song-mode .song-insert-zone {
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-insert-zone::after {
    content: '+';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--accent);
    color: var(--text-on-accent);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.song-insert-zone:hover::after {
    opacity: 0.7;
}

.song-insert-zone:active::after {
    transform: scale(0.9);
}

/* Light theme adjustments */
:root[data-bs-theme="light"] .song-barline-inner::before,
:root[data-bs-theme="light"] .song-barline-inner::after {
    background: #333;
}

:root[data-bs-theme="light"] .song-barline .repeat-dots::before,
:root[data-bs-theme="light"] .song-barline .repeat-dots::after {
    background: #333;
}

:root[data-bs-theme="light"] .song-ending {
    border-color: #333;
    color: #333;
}

:root[data-bs-theme="light"] .song-barline:hover,
:root[data-bs-theme="light"] .song-ending:hover {
    background: rgba(0, 0, 0, 0.05);
}

:root[data-bs-theme="light"] .song-barline.selected,
:root[data-bs-theme="light"] .song-ending.selected {
    background: rgba(0, 0, 0, 0.08);
}

/* --- Print: Hide Song Mode UI elements --- */
@media print {
    .song-mode-toggle {
        display: none !important;
    }

    .song-section-label,
    .song-roadmap {
        border: none !important;
        background: transparent !important;
    }

    .song-insert-zone {
        display: none !important;
    }
}


.song-mode-toggle {
    display: none;
}

.collections-route-body--poster-active .landing-poster-host--official .chord-dot-interval-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.58);
}

.collections-route-body--poster-active .landing-poster-host--official .chord-dot.root-played .chord-dot-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.74);
}

.collections-route-body--poster-active .landing-poster-host--official #chord-edit-modal .chord-fret-label,
.collections-route-body--poster-active .landing-poster-host--official #chord-edit-modal .chord-footer-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.74);
}

.collections-route-body--poster-active .landing-poster-host--official .chord-edit-fields.mb-2 {
    display: none;
}

.collections-route-body--poster-active .landing-poster-host--official #chord-edit-modal .chord-edit-modal-slot {
    transform: translate(0, 0);
}

.collections-route-body--poster-active .landing-poster-host--official #chord-edit-modal .chord-title,
.collections-route-body--poster-active .landing-poster-host--official #chord-edit-modal .chord-title-edit-in-place {
    position: relative;
    top: -0.4em;
    font-size: 140%;
}

#chord-edit-modal .chord-edit-modal-container .chord-dot-interval-label,
#chord-edit-modal .chord-edit-modal-container .chord-dot-note-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.58);
}

#chord-edit-modal .chord-edit-modal-container .chord-diagram-cell .chord-dot-wrap::before,
#chord-edit-modal .chord-edit-modal-container .chord-diagram-cell .chord-dot-wrap--hover-label-compact::before {
    font-size: calc(var(--u) * var(--dot-size) * 0.58);
}

#chord-edit-modal .chord-edit-modal-container .chord-dot.root-played .chord-dot-label,
#chord-edit-modal .chord-edit-modal-container .chord-diagram-cell.chord-root-preview-target .chord-dot-wrap::after {
    font-size: calc(var(--u) * var(--dot-size) * 0.74);
}

#chord-edit-modal .chord-edit-modal-container .chord-dot.root-played .chord-dot-note-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.58);
}

#chord-edit-modal .chord-edit-modal-container .chord-fret-label,
#chord-edit-modal .chord-edit-modal-container .chord-footer-label {
    font-size: calc(var(--u) * var(--dot-size) * 0.74);
}

body:not(.collections-route-body--poster-active):not(.landing-teaser-workspace-body) #chord-edit-modal .chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-title,
body:not(.collections-route-body--poster-active):not(.landing-teaser-workspace-body) #chord-edit-modal .chord-edit-modal-container .chord-card-spotlight--modal-layout .chord-title-edit-in-place {
    font-size: calc(var(--fz-17) * var(--chord-edit-modal-title-scale, 1.7));
    position: relative;
    top: -0.4em;
}

.chord-edit-settings-spacer {
    display: none;
}

@media screen {
    .editable-text-surface:focus,
    .editable-text-surface:focus-visible,
    .edit-in-place-text.is-edit-in-place-focused .editable-text-surface,
    .chord-title-edit-input:focus,
    .chord-title-edit-input:focus-visible,
    .edit-in-place-text.is-edit-in-place-focused .chord-title-edit-input,
    .chord-fret-label-input:focus,
    .chord-fret-label-input:focus-visible,
    .edit-in-place-text.is-edit-in-place-focused .chord-fret-label-input,
    .chord-name-inline-input:not(.chord-name-inline-input--text-card):focus,
    .chord-name-inline-input.chord-name-inline-input--title-mirror:focus,
    .chord-shape-inline-input,
    .collection-name-input:focus,
    .collection-workspace-body .group-name.form-control:focus,
    .collection-workspace-body .group-name.form-control:focus:hover,
    .collection-workspace-body .group-name:focus,
    .collection-workspace-body .group-name:focus:hover,
    .chord-edit-modal-container .chord-name-inline-input,
    .chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input:focus,
    .chord-edit-modal-container .chord-card-spotlight--modal-layout.chord-card-spotlight--text-card-modal .chord-edit-section--modal-layout>.chord-edit-fields>.chord-name-input:focus-visible {
        background: var(--editable-text-surface-focus-bg) !important;
        border: 1px solid var(--editable-text-surface-focus-border) !important;
        border-color: #43dfe7 !important;
        box-shadow: var(--editable-text-surface-focus-shadow) !important;
        outline: none !important;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus-visible,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus:hover,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus-visible:hover,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:focus,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:focus-visible {
        background: transparent !important;
        border: 1px solid transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:hover,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:focus-visible,
    .collection-workspace-body #groups-root .chord-card.collection-text-card .chord-name-input:active,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:hover,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:focus,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:focus-visible,
    .chord-card.collection-text-card .chord-name-inline-input.chord-name-inline-input--text-card:active {
        border-color: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }
}
