.song-library-template-page {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.song-search-widget {
    --sl-purple: #762052;
    --sl-purple-dark: #671a47;
    --sl-orange: #f59b00;
    --sl-text: #292525;
    --sl-muted: #777276;
    --sl-border: #e6e0e2;
    color: var(--sl-text);
    font-size: 14px;
}

.song-search-widget * {
    box-sizing: border-box;
}

.song-search-widget button,
.song-search-widget input,
.song-search-widget select {
    font: inherit;
}

.song-search-widget button {
    cursor: pointer;
    padding: 0px 5px;
}

.song-search-widget .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Screenshot-style full page design */
.song-search-library-design {
    background: #fff;
}

.song-library-hero {
    position: relative;
    overflow: hidden;
    background: var(--sl-purple);
    color: #fff;
}

.song-library-hero-inner {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 54px 28px 60px;
}

.song-library-eyebrow {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .76rem;
    color: #FFD9A0;
    margin: 0 0 10px;
}

.song-library-hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 12px;
}

.song-library-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, .9);
    max-width: 620px;
    margin: 0 0 26px;
}

.song-library-hero-search {
    width: 100%;
    max-width: 640px;
    height: 56px;
    background: #fff;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.song-library-hero-search>span {
    flex: 0 0 auto;
    font-size: 28px;
    line-height: 1;
    color: #aaa29d;
    margin-right: 16px;
    transform: rotate(-20deg);
}

.song-library-hero-search .song-search-input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px;
    margin: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    color: #555;
    box-shadow: none;
}

.song-library-hero-search .song-search-input::placeholder {
    color: #aaa29d;
    opacity: 1;
}

.song-library-hero-search .song-search-input:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.song-library-note {
    position: absolute;
    color: rgba(255, 255, 255, .65);
    font-size: 30px;
}

.song-library-note-one {
    right: 11%;
    top: 35px;
}

.song-library-note-two {
    right: 28%;
    bottom: 40px;
}

.song-search-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 18px 70px;
}

.song-library-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 15px;
    min-height: 30px;
}

.song-library-results-toolbar .song-search-count {
    font-size: 17px;
    font-weight: 600;
    color: #4c474a;
}

.song-library-sort {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #6d686b;
    font-size: 13px;
}

.song-library-sort select {
    height: 33px;
    border: 1px solid #ddd7d9;
    border-radius: 5px;
    background: #fff;
    padding: 0 24px 0 9px;
    color: #3e3a3c;
    font-size: 13px;
}

.song-library-view-button {
    width: 30px;
    height: 29px;
    border: 1px solid #e3dcdf;
    background: #fff;
    border-radius: 5px;
    color: #888;
}

.song-library-view-button.is-active {
    color: var(--sl-orange);
    border-color: #f2d39b;
}

.song-search-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.song-search-filters {
    border: 1px solid #e5dfe1;
    border-radius: 12px;
    background: #fff;
    padding: 14px 13px 12px;
    box-shadow: 0 2px 7px rgba(60, 30, 45, .035);
}

.song-search-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.song-search-filter-header strong:before {
    content: '⌕';
    color: var(--sl-purple);
    margin-right: 5px;
}

.song-search-filter-actions {
    display: flex;
}

.song-search-clear,
.song-search-filter-close {
    border: 0;
    background: none;
    color: var(--sl-orange);
    padding: 10px 10px !important;
    font-size: 12px;
    font-weight: 700;
}

.song-search-filter-close {
    display: none;
}

.song-search-filter {
    border: 0;
    border-top: 1px solid #eee9ea;
    margin: 30px 0;
    padding: 0;
}

.song-search-filter+.song-search-filter {
    margin-top: 9px;
}

.song-search-filter legend {
    padding: 0;
    color: #403b3e;
    font-size: 15px;
    font-weight: 800;
}

.song-search-filter-options {
    display: grid;
    gap: 5px;
}

.song-search-filter-option {
    display: grid;
    grid-template-columns: 13px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    color: #777073;
    font-size: 15px;
    line-height: 1.35;
}

.song-search-filter-option small {
    display: none;
}

.song-search-filter-option input,
.song-search-chords-filter input {
    width: 11px;
    height: 11px;
    margin: 0;
    accent-color: var(--sl-purple);
}

.song-search-filter-option span {
    padding-top: 10px;
}

.song-search-chords-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid #eee9ea;
    margin-top: 10px;
    padding-top: 11px;
    color: #5e585b;
    font-size: 12px;
    font-weight: 700;
}

.song-search-results-region {
    min-width: 0;
}

.song-search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 14px;
}

.song-search-status {
    display: block;
    min-height: 0;
    color: #777073;
    font-size: 13px;
}

/* Library view toggle: grid/list */
.song-search-library-design .song-search-results.song-library-view-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1.25fr) minmax(130px, .75fr) minmax(220px, 1.2fr) 42px 72px;
    align-items: center;
    column-gap: 16px;
    width: 100%;
    min-height: 108px;
    padding: 12px 16px;
    box-sizing: border-box;
    overflow: visible;
    border: 1px solid #e9e4e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-visual {
    position: relative;
    width: 64px;
    height: 64px;
    min-height: 64px;
    border-radius: 12px;
    overflow: hidden;
    align-self: center;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-visual svg {
    width: 100%;
    height: 100%;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-type {
    top: 10px;
    left: 7px;
    padding: 4px 8px;
    border-radius: 9px;
    font-size: 10px;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-favorite {
    position: static;
    grid-column: 5;
    grid-row: 1;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 1px solid #eee9e9;
    border-radius: 50%;
    background: #fff;
    color: #817b7d;
    font-size: 18px;
    line-height: 30px;
    box-shadow: 0 2px 7px rgba(40, 20, 30, .06);
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-body {
    display: contents;
    min-height: 0;
    padding: 0;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: #282427;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-opening {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0 0 4px;
    color: #8a8386;
    font-size: 12px;
    line-height: 1.45;
    font-style: italic;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-composer {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    color: #454043;
    font-size: 13px;
    line-height: 1.45;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-composer::before {
    content: "KOMPONIST";
    display: block;
    margin-bottom: 4px;
    color: #999295;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .12em;
    font-weight: 800;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-pills {
    grid-column: 4;
    grid-row: 1;
    align-self: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 0;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-pill {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-footer {
    display: contents;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-card-footer>span {
    display: none;
}

.song-search-library-design .song-search-results.song-library-view-list .song-search-open {
    grid-column: 6;
    grid-row: 1;
    align-self: center;
    color: #f39200;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width:1050px) {
    .song-search-library-design .song-search-results.song-library-view-list .song-search-card {
        grid-template-columns: 72px minmax(180px, 1fr) minmax(110px, .7fr) minmax(170px, 1fr) 40px 64px;
        column-gap: 10px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width:760px) {
    .song-search-library-design .song-search-results.song-library-view-list .song-search-card {
        grid-template-columns: 64px minmax(0, 1fr) 38px 60px;
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 2px;
        min-height: 104px;
        padding: 10px;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-card-visual {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 56px;
        height: 56px;
        min-height: 56px;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-card h3 {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-card-opening {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-card-composer,
    .song-search-library-design .song-search-results.song-library-view-list .song-search-card-pills {
        display: none;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-favorite {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .song-search-library-design .song-search-results.song-library-view-list .song-search-open {
        grid-column: 4;
        grid-row: 1 / span 2;
        white-space: normal;
        text-align: center;
    }
}

.song-search-library-design .song-search-results-region>.song-search-status {
    margin: 0 0 5px;
}

.song-search-card {
    --card: #bfe1f5;
    --ink: #176c9e;
    overflow: hidden;
    position: relative;
    min-width: 0;
    border: 1px solid #eee9e9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(40, 20, 30, .045);
}

.song-search-card-visual {
    position: relative;
    height: 112px;
    background: var(--card);
    overflow: hidden;
}

.song-search-card-visual svg {
    display: block;
    width: 100%;
    height: 100%;
}

.song-search-card-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    border-radius: 10px;
    padding: 4px 9px;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.song-search-favorite {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(90, 70, 80, .12);
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    color: #918b8d;
    padding: 8px 6px !important;
    font-size: 15px;
    line-height: 25px;
}

.song-search-card-body {
    padding: 12px 12px 11px;
    min-height: 130px;
}

.song-search-card h3 a {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
    color: #282427 !important;
}

.song-search-card-composer {
    margin: 0 0 7px;
    color: #858083;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-search-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 17px;
}

.song-search-card-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 4px 9px;
    background: #f5eef2;
    color: #87536d;
    font-size: 11px;
    line-height: 1;
}

.song-search-card-pill.is-language {
    background: #f5f1ec;
    color: #716b68;
}

.song-search-card-pill.is-difficulty {
    background: #e9f5ef;
    color: #4d876b;
}

.song-search-card-pill.is-hard {
    background: #fff0dd;
    color: #b76a1b;
}

.song-search-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    padding-top: 7px;
    border-top: 1px solid #f0ebed;
    color: #9b9698;
    font-size: 11px;
}

.song-search-open {
    color: var(--sl-orange);
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

.song-search-open:hover {
    text-decoration: underline;
}

.song-search-opening,
.song-search-snippet,
.song-search-card-meta,
.song-search-tags,
.song-search-lyrics {
    display: none;
}

.song-search-empty {
    grid-column: 1/-1;
    border: 1px dashed #ddd5d9;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #777;
}

.song-search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.song-search-pagination button {
    min-height: 34px;
    border: 1px solid #e3dcdf;
    border-radius: 6px;
    background: #fff;
    color: #5f595c;
    padding: 6px 14px;
    font-size: 13px;
}

.song-search-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.song-search-page {
    color: #777073;
    font-size: 13px;
}

.song-search-widget.is-loading .song-search-results {
    opacity: .55;
}

.song-search-skeleton {
    min-height: 240px;
}

.song-search-skeleton>div {
    padding: 140px 12px 10px;
}

.song-search-skeleton span {
    display: block;
    height: 8px;
    width: 75%;
    margin: 6px 0;
    border-radius: 5px;
    background: #eee;
}

/* Legacy shortcode layout */
.song-search-widget:not(.song-search-library-design) .song-search-shell {
    max-width: 1120px;
}

.song-search-widget:not(.song-search-library-design) .song-search-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 12px;
    margin-bottom: 20px;
}

.song-search-widget:not(.song-search-library-design) .song-search-input,
.song-search-widget:not(.song-search-library-design) .song-search-sort {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8dde7;
    border-radius: 6px;
    background: #fff;
    padding: 10px 12px;
}

.song-search-filter-toggle {
    display: none;
    min-height: 44px;
    border: 1px solid #d8dde7;
    border-radius: 6px;
    background: #fff;
    padding: 10px 14px;
}

.song-search-widget:not(.song-search-library-design) .song-search-layout {
    grid-template-columns: 280px minmax(0, 1fr);
}

.song-search-widget:not(.song-search-library-design) .song-search-filters {
    padding: 14px;
}

.song-search-widget:not(.song-search-library-design) .song-search-results {
    display: grid;
    gap: 12px;
}

.song-search-widget:not(.song-search-library-design) .song-search-card {
    display: flex;
    padding: 16px;
}

.song-search-widget:not(.song-search-library-design) .song-search-card-body {
    padding: 0;
}

.song-search-widget:not(.song-search-library-design) .song-search-card h3 {
    font-size: 20px;
}

.song-search-widget:not(.song-search-library-design) .song-search-opening,
.song-search-widget:not(.song-search-library-design) .song-search-snippet,
.song-search-widget:not(.song-search-library-design) .song-search-card-meta,
.song-search-widget:not(.song-search-library-design) .song-search-tags,
.song-search-widget:not(.song-search-library-design) .song-search-lyrics {
    display: block;
}

@media (max-width: 850px) {
    .song-library-hero-inner {
        min-height: 240px;
        padding: 35px 20px 40px;
    }

    .song-library-hero h1 {
        font-size: 43.2px;
    }

    .song-search-shell {
        padding: 22px 14px 45px;
    }

    .song-library-filter-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 29px;
        border: 1px solid #e3dcdf;
        border-radius: 5px;
        background: #fff;
        color: #6d686b;
        padding: 10px 5px !important;
        font-size: 12px;
    }

    .song-search-layout {
        grid-template-columns: 1fr;
    }

    .song-search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .song-search-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width:600px) {
    .song-library-hero p {
        font-size: 12px;
    }

    .song-library-results-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    /* .song-library-sort { width:100%; justify-content:flex-end; } */
    .song-search-results {
        grid-template-columns: 1fr;
    }

    .song-search-filters {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 99999;
        width: min(320px, calc(100vw - 35px));
        height: 100vh;
        overflow: auto;
        border-radius: 0 12px 12px 0;
        transform: translateX(-105%);
        transition: transform .18s ease;
        box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    }

    .song-search-widget.filters-open .song-search-filters {
        transform: translateX(0);
    }

    .song-search-filter-close {
        display: inline-flex;
        margin-left: 10px;
    }
}

/* Filter accordion - library design */
.song-search-filter {
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #eee9ea;
}

.song-search-filter+.song-search-filter {
    margin-top: 0;
}

.song-search-filter legend {
    width: 100%;
    margin: 0;
    padding: 0;
}

.song-search-filter-toggle-button {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #181517;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.song-search-filter-toggle-button:hover,
.song-search-filter-toggle-button:focus {
    background: #fff !important;
    color: #000 !important;
}

.song-search-filter-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1.5px solid #8b8587;
    border-bottom: 1.5px solid #8b8587;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
    margin-right: 3px;
}

.song-search-filter.is-open .song-search-filter-chevron {
    transform: rotate(225deg) translateY(-2px);
}

.song-search-filter-options {
    display: none;
    padding: 0 6px 14px 6px;
}

.song-search-filter.is-open .song-search-filter-options {
    display: grid;
    gap: 7px;
}

.song-search-filter-option {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    min-height: 26px;
    color: #716b6d;
    font-size: 13px;
    line-height: 1.35;
}

.song-search-filter-option input,
.song-search-chords-filter input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--sl-purple);
}

.song-search-filter-option span {
    padding-top: 0;
}

.song-search-filter[data-filter="voices"] .song-search-filter-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
}

.song-search-chords-filter {
    min-height: 45px;
    margin-top: 0;
    padding: 12px 6px;
    border-top: 0;
    color: #181517;
    font-size: 15px;
    font-weight: 800;
}

button.song-search-favorite.is-favorite {
    color: #fff !important;
    background: #762052 !important;
}