/* Explicit readable pairs override decorative theme effects on text surfaces. */
body[data-library-theme="plain"] { --read-bg: #f4f6f5; --read-surface: #ffffff; --read-text: #182b34; --read-muted: #52656e; --read-accent: #175c51; --read-page: #182b34; --read-page-muted: #52656e; --read-sheet: #ffffff; --read-sheet-text: #182b34; --read-sheet-muted: #52656e; }
body[data-library-theme="handwritten_parchment"] { --read-bg: #30251b; --read-surface: #f3e6cc; --read-text: #302218; --read-muted: #63503d; --read-accent: #69451d; --read-page: #f5f5ef; --read-page-muted: #d6ddd8; --read-sheet: #f3e6cc; --read-sheet-text: #302218; --read-sheet-muted: #63503d; }
body[data-library-theme="professional_executive"] { --read-bg: #0f172a; --read-surface: #1e293b; --read-text: #f1f5f9; --read-muted: #cbd5e1; --read-accent: #a5d5fa; --read-page: #f5f5ef; --read-page-muted: #d6ddd8; --read-sheet: #ffffff; --read-sheet-text: #0f172a; --read-sheet-muted: #475569; }
body[data-library-theme="atelier_luxe"] { --read-bg: #09090b; --read-surface: #1c1917; --read-text: #faf9f6; --read-muted: #d6d3d1; --read-accent: #f4c899; --read-page: #f5f5ef; --read-page-muted: #d6ddd8; --read-sheet: #faf9f6; --read-sheet-text: #1c1917; --read-sheet-muted: #57534e; }
body[data-library-theme="stage_noir"] { --read-bg: #101010; --read-surface: #262626; --read-text: #f5f5f0; --read-muted: #d1d1ca; --read-accent: #f1d69a; --read-page: #f5f5ef; --read-page-muted: #d6ddd8; --read-sheet: #262626; --read-sheet-text: #f5f5f0; --read-sheet-muted: #d1d1ca; }
body[data-library-theme="chalkboard"] { --read-bg: #16251e; --read-surface: #233d30; --read-text: #f3f5ec; --read-muted: #cddacb; --read-accent: #f6e27d; --read-page: #f5f5ef; --read-page-muted: #d6ddd8; --read-sheet: #233d30; --read-sheet-text: #f3f5ec; --read-sheet-muted: #cddacb; }

body[data-library-theme] { background: var(--read-bg) !important; color: var(--read-page) !important; }
body[data-library-theme]::before, body[data-library-theme]::after { content: none !important; }
body[data-library-theme] .top-nav,
body[data-library-theme] .category-card,
body[data-library-theme] .browse-card,
body[data-library-theme] .search-box,
body[data-library-theme] .alpha-btn,
body[data-library-theme] .song-table-scroll,
body[data-library-theme] .song-table th,
body[data-library-theme] .theme-switcher-btn,
body[data-library-theme] .theme-switcher-panel,
body[data-library-theme] .transpose-control {
    background: var(--read-surface) !important;
    color: var(--read-text) !important;
    text-shadow: none !important;
}
body[data-library-theme] .nav-btn,
body[data-library-theme] .category-title,
body[data-library-theme] .song-item-link,
body[data-library-theme] .browse-card h3,
body[data-library-theme] .theme-option,
body[data-library-theme] .song-table,
body[data-library-theme] .song-table a,
body[data-library-theme] .song-table th button { color: var(--read-text) !important; }
body[data-library-theme] .category-lifespan,
body[data-library-theme] .browse-number,
body[data-library-theme] .browse-card p,
body[data-library-theme] .transpose-caption,
body[data-library-theme] .theme-switcher-title,
body[data-library-theme] .song-table caption { color: var(--read-muted) !important; }
body[data-library-theme] .search-box::placeholder { color: var(--read-muted) !important; opacity: 1 !important; }
body[data-library-theme] .page-title,
body[data-library-theme] .browse-heading h2,
body[data-library-theme] .eyebrow { color: var(--read-page) !important; }
body[data-library-theme] .hero-description,
body[data-library-theme] .browse-heading > span,
body[data-library-theme] .no-results,
body[data-library-theme] #song-count,
body[data-library-theme] .song-list-page > p,
body[data-library-theme] .filter-controls > label { color: var(--read-page-muted) !important; }
body[data-library-theme] .nav-btn:hover,
body[data-library-theme] .nav-btn.active,
body[data-library-theme] .alpha-btn:hover,
body[data-library-theme] .alpha-btn.active,
body[data-library-theme] .song-item-link:hover,
body[data-library-theme] .theme-option:hover,
body[data-library-theme] .theme-option[aria-checked="true"] {
    background: var(--read-text) !important;
    color: var(--read-surface) !important;
}
body[data-library-theme] .alpha-btn { min-width: 62px; padding: 10px 14px; }
body[data-library-theme] .alpha-btn:first-child { min-width: 68px; }
body[data-library-theme] .badge { background: var(--read-text) !important; color: var(--read-surface) !important; }
body[data-library-theme] .browse-arrow { color: var(--read-accent) !important; }
body[data-library-theme] .primary-link { background: #175c51 !important; color: #ffffff !important; }
body[data-library-theme] .primary-link:hover { background: #10473e !important; }
body[data-library-theme] .sheet-container { background: var(--read-sheet) !important; color: var(--read-sheet-text) !important; }
body[data-library-theme] .sheet-container::before,
body[data-library-theme] .sheet-container::after,
body[data-library-theme] .song-content::after { content: none !important; }
body[data-library-theme] .song-title,
body[data-library-theme] .meta-value,
body[data-library-theme] .token-lyric {
    color: var(--read-sheet-text) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}
body[data-library-theme] .meta-label,
body[data-library-theme] .avatar-lifespan { color: var(--read-sheet-muted) !important; text-shadow: none !important; }
body[data-library-theme] .token-chord,
body[data-library-theme] .instrumental-chord { text-shadow: none !important; -webkit-text-stroke: 0 !important; opacity: 1 !important; }
body[data-library-theme] .song-table tr:hover { background: var(--read-surface) !important; }
body[data-library-theme] a:focus-visible,
body[data-library-theme] button:focus-visible,
body[data-library-theme] input:focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px; }
@media print {
    body[data-library-theme] { background: #fff !important; color: #182b34 !important; --read-sheet: #fff; --read-sheet-text: #182b34; --read-sheet-muted: #52656e; }
}
/* Decorative grain and blending must never erode letters or chord strokes. */
body[data-library-theme] .sheet-container,
body[data-library-theme] .song-content { filter: none !important; mix-blend-mode: normal !important; opacity: 1 !important; }
body[data-library-theme] .meta-label,
body[data-library-theme] .meta-value,
body[data-library-theme] .token-chord,
body[data-library-theme] .instrumental-chord { -webkit-text-fill-color: currentColor !important; }
/* One Greek alphabet panel: twelve groups, six columns on wide screens. */
.alphabet-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}
.alphabet-toolbar { display: flex; }
.alphabet-toolbar .alpha-btn {
    min-width: 76px;
    min-height: 100%;
    border-radius: 14px;
    font-size: 0.95rem;
    letter-spacing: .02em;
}
.alphabet-language {
    min-inline-size: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--brass, #cbd5d6);
    border-radius: 14px;
    background: var(--read-surface, #fff);
    color: var(--read-text, inherit);
}
.alphabet-language-title {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 0 6px;
    min-height: 40px;
}
.language-heart-flag { display: block; flex: 0 0 40px; }
.alphabet-ranges {
    clear: both;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.alphabet-ranges .alpha-btn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 2px;
    font-variant-numeric: tabular-nums;
}
body[data-library-theme] .alphabet-ranges .alpha-btn { border-color: var(--read-muted); min-width: 0; padding: 8px 2px; }
body[data-library-theme] .alphabet-toolbar .alpha-btn { min-width: 76px; }
@media (max-width: 900px) {
    .alphabet-bar { grid-template-columns: minmax(0, 1fr); }
    .alphabet-ranges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .alphabet-toolbar .alpha-btn { min-height: 44px; width: 100%; }
}
@media (max-width: 560px) {
    .alphabet-bar { grid-template-columns: minmax(0, 1fr); }
}
}
