/*==============設定画面=================*/
.setting {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: scroll;
    padding-top: 24px;
    padding-bottom: 50px;
    scrollbar-width: none;
}

.setting::-webkit-scrollbar {
    display: none;
}

#closeSettingBtn,
#closeSongListBtn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#closeSettingBtn:hover,
#closeSongListBtn:hover {
    opacity: 1;
}

#closeSettingBtn:active,
#closeSongListBtn:active {
    transform: scale(0.9);
}

.setting-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 36px;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.scale-image-container {
    width: 90%;
    margin: auto;
    padding-bottom: 100px;
}

.scale-image-label {
    font-weight: 700;
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.scale-image {
    width: 100%;
    margin: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.selector-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 88%;
    max-width: 720px;
    margin: 0 auto 20px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 14px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.selector-label {
    font-weight: 600;
    font-size: 18px;
    color: #475569;
    letter-spacing: -0.2px;
}

.selector {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
    gap: 2px;
}

.selector-multi-row .selector {
    justify-content: space-between;
}

.selector-multi-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.selector button {
    background: transparent;
    color: #64748b;
    border: none;
    padding: 8px 14px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.selector button:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
}

.selector button.active {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: #3B8BBB;
}

/* Wider buttons for filters with fewer options */
.filter-favorite,
.filter-type,
.filter-difficulty,
.filter-gender {
    padding: 10px 35px;
}

.about {
    width: 88%;
    max-width: 720px;
    margin: 40px auto;
    background: linear-gradient(135deg, #3B8BBB15 0%, #3D5A7315 100%);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(59, 139, 187, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.about-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.about-content p {
    text-align: left;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.about-content h3 {
    font-size: 17px;
    margin-top: 24px;
    font-weight: 700;
    color: #334155;
}

.about-content ul {
    padding-left: 20px;
}

.about-content li {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 6px;
}

.info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 90%;
    max-width: 500px;
    margin: 24px auto 16px;
}

.about-buttons-container {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.about-buttons-container .info-button {
    background: linear-gradient(135deg, #3B8BBB 0%, #3D5A73 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(59, 139, 187, 0.3);
    border: none;
    transition: all 0.25s ease;
}

.about-buttons-container .info-button:hover {
    box-shadow: 0 6px 20px rgba(59, 139, 187, 0.35);
    transform: translateY(-2px);
}

.about-buttons-container .info-button:active {
    transform: translateY(0);
}

.info-container.mp3 {
    justify-content: center;
}

.info-container.filter-actions {
    justify-content: center;
    margin-bottom: 50px;
    margin-top: 30px;
}

.info-button {
    background: linear-gradient(135deg, #3B8BBB 0%, #3D5A73 100%);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(59, 139, 187, 0.25);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.info-button:hover {
    box-shadow: 0 6px 20px rgba(59, 139, 187, 0.3);
    transform: translateY(-2px);
}

.info-button:active {
    transform: translateY(0);
}

#pdfSection {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1150;
    text-align: center;
}

.pdf-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3B8BBB;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.pdf-loading-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#pdfContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 1000;
    overscroll-behavior: none;
}

#pdfTabs {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background: rgba(51, 65, 85, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    padding: 8px;
    z-index: 1100;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pdf-tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    margin: 0;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pdf-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pdf-tab.active {
    background: rgba(255, 255, 255, 0.95);
    color: #334155;
    font-weight: 600;
}

#closePdfBtn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#downloadPdfBtn {
    position: fixed;
    top: 16px;
    left: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#songList {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Include the paddings in the 100% height; otherwise the box grows past the
       bottom of the screen and the last rows can never be scrolled into view */
    box-sizing: border-box;
    z-index: 1000;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: scroll;
    /* Start the list below the fixed filter/close buttons (16px + 48px),
       so the first row's favorite heart is not hidden under the close button */
    padding-top: 64px;
    /* Same offset for scrollIntoView, so the current song is not hidden either */
    scroll-padding-top: 64px;
    /* Room below the last row so it clears the fixed search bar (bottom 20px + ~52px).
       Put on the container, not as the table's margin-bottom, which iOS Safari can ignore */
    padding-bottom: 90px;
    scrollbar-width: none;
}

#songList::-webkit-scrollbar {
    display: none;
}

#filterBtn {
    position: fixed;
    top: 16px;
    left: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#filterBtn:hover {
    opacity: 1;
}

#closeFilterBtn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#closeFilterBtn:hover {
    opacity: 1;
}

#songTable {
    table-layout: fixed;
    width: 92%;
    /* Clear of the Dynamic Island in landscape: the side margin grows to the safe-area inset
       (iOS gives it for whichever side the island is on, 0 on phones without one) */
    width: calc(100% - 2 * max(4%, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)));
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    margin: auto;
}

/* no */
#songTable td:nth-child(1) {
    width: 12%;
}

/* key: wide enough for "Modulation" */
#songTable td:nth-child(2) {
    width: 14%;
}

/* difficulty */
#songTable td:nth-child(3) {
    width: 38px;
}

/* lock */
#songTable td:nth-child(4) {
    width: 28px;
}

/* title */
#songTable td:nth-child(5) {
    width: 48%;
}

/* composer */
#songTable td:nth-child(6) {
    width: 18%;
}

/* favorite heart */
#songTable td:nth-child(7) {
    width: 44px;
}

#songTable td.favorite-cell {
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

#songTable .favorite-heart {
    width: 26px;
    height: 26px;
    display: block;
    margin: auto;
}

/* Lock in its own column before the title of a paid song, so wrapped titles stay aligned;
   hidden on free songs */
#songTable td.lock-cell {
    padding-left: 4px;
    padding-right: 0;
    vertical-align: middle;
}

#songTable .lock-icon {
    width: 22px;
    height: 22px;
    display: block;
}

/* Shown above the list opened by "Try classical songs".
   Narrow enough to sit between the filter and close buttons (20px + 48px each side, plus a gap) */
.free-songs-banner {
    width: calc(100% - 176px);
    box-sizing: border-box;
    margin: 0 auto 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eaf4fa;
    color: #3D5A73;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* First-launch screen */
.welcome-title {
    margin-bottom: 6px;
}

.welcome-sub {
    margin: 0;
    text-align: center;
    font-size: 15px;
    color: #6b7280;
}

.info-button.welcome-basics {
    background: #ffffff;
    color: #3B8BBB;
    box-shadow: inset 0 0 0 1.5px #3B8BBB;
}

#songTable td {
    padding: 14px 6px;
    text-align: left;
    font-size: 15px;
    color: #334155;
}




#songTable tbody tr:hover {
    background: linear-gradient(135deg, #3B8BBB10 0%, #3D5A7310 100%);
    cursor: pointer;
}

#songTable tbody tr {
    transition: background 0.2s ease;
}

/* Level-based row tinting (very subtle) */
#songTable tbody tr.level-main-0 { background-color: rgba(69, 184, 172, 0.08); }
#songTable tbody tr.level-main-1 { background-color: rgba(41, 128, 185, 0.08); }
#songTable tbody tr.level-main-2 { background-color: rgba(122, 93, 162, 0.08); }
#songTable tbody tr.level-main-3 { background-color: rgba(196, 59, 70, 0.08); }
#songTable tbody tr.level-main-4 { background-color: rgba(221, 135, 60, 0.08); }
#songTable tbody tr.level-main-5 { background-color: rgba(212, 167, 17, 0.08); }
#songTable tbody tr.level-main-6 { background-color: rgba(132, 172, 57, 0.08); }
#songTable tbody tr.level-main-7 { background-color: rgba(61, 153, 84, 0.08); }
#songTable tbody tr.level-main-8 { background-color: rgba(82, 111, 174, 0.08); }
#songTable tbody tr.level-main-9 { background-color: rgba(159, 76, 116, 0.08); }
#songTable tbody tr.level-main-10 { background-color: rgba(209, 97, 65, 0.08); }
#songTable tbody tr.level-main-11 { background-color: rgba(217, 151, 39, 0.08); }
#songTable tbody tr.level-main-12 { background-color: rgba(172, 170, 37, 0.08); }
#songTable tbody tr.level-main-13 { background-color: rgba(97, 163, 71, 0.08); }
#songTable tbody tr.level-main-14 { background-color: rgba(51, 141, 135, 0.08); }

#songTable tbody tr.level-extra-1 { background-color: rgba(61, 101, 117, 0.08); }
#songTable tbody tr.level-extra-2 { background-color: rgba(101, 90, 114, 0.08); }
#songTable tbody tr.level-extra-3 { background-color: rgba(126, 88, 92, 0.08); }
#songTable tbody tr.level-extra-4 { background-color: rgba(133, 106, 86, 0.08); }
#songTable tbody tr.level-extra-5 { background-color: rgba(126, 117, 74, 0.08); }
#songTable tbody tr.level-extra-6 { background-color: rgba(101, 114, 76, 0.08); }
#songTable tbody tr.level-extra-7 { background-color: rgba(74, 107, 86, 0.08); }
#songTable tbody tr.level-extra-8 { background-color: rgba(87, 98, 120, 0.08); }
#songTable tbody tr.level-extra-9 { background-color: rgba(114, 86, 100, 0.08); }
#songTable tbody tr.level-extra-10 { background-color: rgba(133, 97, 86, 0.08); }
#songTable tbody tr.level-extra-11 { background-color: rgba(133, 112, 74, 0.08); }
#songTable tbody tr.level-extra-12 { background-color: rgba(114, 114, 66, 0.08); }
#songTable tbody tr.level-extra-13 { background-color: rgba(86, 114, 80, 0.08); }
#songTable tbody tr.level-extra-14 { background-color: rgba(74, 107, 104, 0.08); }

/* Odd rows get slightly darker tint */
#songTable tbody tr:nth-child(odd).level-main-0 { background-color: rgba(69, 184, 172, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-1 { background-color: rgba(41, 128, 185, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-2 { background-color: rgba(122, 93, 162, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-3 { background-color: rgba(196, 59, 70, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-4 { background-color: rgba(221, 135, 60, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-5 { background-color: rgba(212, 167, 17, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-6 { background-color: rgba(132, 172, 57, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-7 { background-color: rgba(61, 153, 84, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-8 { background-color: rgba(82, 111, 174, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-9 { background-color: rgba(159, 76, 116, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-10 { background-color: rgba(209, 97, 65, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-11 { background-color: rgba(217, 151, 39, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-12 { background-color: rgba(172, 170, 37, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-13 { background-color: rgba(97, 163, 71, 0.12); }
#songTable tbody tr:nth-child(odd).level-main-14 { background-color: rgba(51, 141, 135, 0.12); }

#songTable tbody tr:nth-child(odd).level-extra-1 { background-color: rgba(61, 101, 117, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-2 { background-color: rgba(101, 90, 114, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-3 { background-color: rgba(126, 88, 92, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-4 { background-color: rgba(133, 106, 86, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-5 { background-color: rgba(126, 117, 74, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-6 { background-color: rgba(101, 114, 76, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-7 { background-color: rgba(74, 107, 86, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-8 { background-color: rgba(87, 98, 120, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-9 { background-color: rgba(114, 86, 100, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-10 { background-color: rgba(133, 97, 86, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-11 { background-color: rgba(133, 112, 74, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-12 { background-color: rgba(114, 114, 66, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-13 { background-color: rgba(86, 114, 80, 0.12); }
#songTable tbody tr:nth-child(odd).level-extra-14 { background-color: rgba(74, 107, 104, 0.12); }

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    max-width: 480px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    z-index: 1001;
    max-height: 85vh;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Scale screen - full screen like settings */
.scale-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: scroll;
    padding-top: 80px;
    scrollbar-width: none;
}

.scale-screen::-webkit-scrollbar {
    display: none;
}

.close-scale-button {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.close-scale-button:hover {
    opacity: 1;
}

/* Download screen - full screen like settings */
.song-info-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: scroll;
    padding-top: 24px;
    padding-bottom: 50px;
    scrollbar-width: none;
}

.song-info-screen::-webkit-scrollbar {
    display: none;
}

/* On a wide screen (iPad) the text sits on a white page with light grey at the sides.
   960px is the widest iPhone in landscape, so phones keep the plain background */
@media (min-width: 1000px) {
    .song-info-screen {
        background: linear-gradient(90deg,
            #e4e8ee calc(50% - 361px), #d8dde5 calc(50% - 361px), #d8dde5 calc(50% - 360px),
            #ffffff calc(50% - 360px), #ffffff calc(50% + 360px),
            #d8dde5 calc(50% + 360px), #d8dde5 calc(50% + 361px), #e4e8ee calc(50% + 361px));
    }
}

.song-info-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    width: 88%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.3px;
}

.song-info-composer {
    display: block;
    text-align: center;
    font-size: 18px;
    color: #3B8BBB;
    text-decoration: none;
    width: 88%;
    max-width: 600px;
    margin: -16px auto 24px;
}

.song-info-body {
    width: 88%;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 50px;
    -webkit-text-size-adjust: 100%;
}

.song-info-body p {
    font-size: 20px;
    line-height: 1.7;
    margin: 16px 0;
    color: #374151;
}

.composer-page {
    margin-top: 20px;
}

.composer-portrait {
    float: left;
    width: 40%;
    max-width: 220px;
    margin: 0 22px 8px 0;
}

.composer-portrait img {
    display: block;
    width: 100%;
    border-radius: 12px;
    /* soft shadow falling to the lower right, as if lit from the upper left */
    box-shadow: 6px 8px 16px rgba(15, 23, 42, 0.18), 1px 2px 4px rgba(15, 23, 42, 0.08);
}

/* In place of the portrait when none survives: same size, corners and shadow,
   in the cream of the portrait backgrounds */
.composer-no-portrait {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 400 / 480;
    padding: 12px;
    border-radius: 12px;
    background: #fbf6ec;
    color: #8a7d68;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 6px 8px 16px rgba(15, 23, 42, 0.18), 1px 2px 4px rgba(15, 23, 42, 0.08);
}

/* display: grid / block above would otherwise override the hidden attribute
   (a hidden portrait would show as a broken image) */
.composer-no-portrait[hidden],
.composer-portrait img[hidden] {
    display: none;
}

.composer-portrait-note {
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
    margin-top: 8px;
}

.composer-portrait-note:empty {
    display: none;
}

.composer-name {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.composer-life {
    color: #64748b;
    font-size: 16px;
    margin: 4px 0 8px;
}

.composer-era {
    margin: 0 0 8px;
    overflow: hidden;
}

.composer-era-bar {
    display: flex;
    gap: 3px;
}

.composer-era-bar span {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #dbe3ec;
}

.composer-era-bar span.on {
    background: #2980B9;
}

.composer-era-name {
    font-size: 13px;
    font-weight: 600;
    color: #2980B9;
    margin-top: 4px;
}

.composer-wiki {
    margin: 8px 0 0;
}

.composer-wiki .imslp-badge {
    margin: 8px 0;
}

.composer-songs-title {
    clear: both;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    padding-top: 24px;
    margin-bottom: 8px;
}

.composer-songs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.composer-songs li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 12px 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 17px;
    color: #334155;
}

/* song titles and other composers' names linked inside the intro text */
#composerInfoBody p a[data-song],
#composerInfoBody p a[data-composer-link] {
    color: #2980B9;
    text-decoration: none;
}

.composer-songs .cs-title a {
    color: #2980B9;
    text-decoration: none;
}

.composer-songs li.current {
    background: #dbeafe;
    border-radius: 8px;
}

.composer-songs .cs-level {
    color: #64748b;
    min-width: 68px;
    font-size: 15px;
}

.composer-songs .cs-title {
    flex: 1;
}

/* Difficulty badge, as in the song list; the space stays when it is not set yet */
.composer-songs .cs-difficulty {
    align-self: center;
    flex: 0 0 24px;
}

.composer-songs .cs-difficulty img {
    display: block;
    height: 24px;
}

/* Lock before the title of a paid song, as in the song list; the space stays on free songs
   so the titles line up */
.composer-songs .cs-lock {
    align-self: center;
    flex: 0 0 22px;
}

.composer-songs .lock-icon {
    display: block;
    width: 22px;
    height: 22px;
}

.composer-songs .cs-year {
    color: #64748b;
    font-size: 15px;
}

/* Previous / next composer by birth: side by side, arrows on the outer sides */
.composer-nav {
    clear: both;
    display: flex;
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.composer-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    flex: 0 0 50%;
    min-width: 0;
    padding: 16px 4px;
    text-decoration: none;
}

/* stays on the right even when there is no previous composer */
.composer-nav a.next {
    margin-left: auto;
    flex-direction: row-reverse;
    text-align: right;
}

.composer-nav .cn-arrow {
    color: #2980B9;
    font-size: 24px;
    width: 16px;
    text-align: center;
}

.composer-nav .cn-text {
    flex: 1;
    min-width: 0;
}

.composer-nav .cn-dir {
    display: block;
    font-size: 12px;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.composer-nav .cn-name {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #2980B9;
}

.composer-nav .cn-years {
    display: block;
    font-size: 14px;
    color: #64748b;
}

.download-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: scroll;
    padding-top: 24px;
    scrollbar-width: none;
}

.download-screen::-webkit-scrollbar {
    display: none;
}

.close-download-button {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 32px;
    height: 32px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.close-download-button:hover {
    opacity: 1;
}

.download-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

.download-button-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 50px;
}


.info-modal-content {
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 10px;
    scrollbar-width: none;
}

.info-modal-content::-webkit-scrollbar {
    display: none;
}

.info-modal-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.info-modal-title.mp3 {
    font-size: 22px;
    margin-top: 10px;
    margin-bottom: 24px;
}

.current-settings-inline {
    text-align: center;
    margin: 10px 0;
}

.settings-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.info-modal-content p {
    font-size: 16px;
    line-height: 1.7;
    margin: 16px 0;
    color: #475569;
}

.update-content {
    margin: 24px 0;
}

.update-content h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.update-content ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.update-content li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.update-content p {
    font-size: 14px;
    margin: 16px 0 0 0;
    color: #64748b;
    font-style: italic;
}

.update-content a {
    font-size: 14px;
    line-height: 1.5;
    color: #3B8BBB;
    text-decoration: none;
    transition: color 0.2s ease;
}

.update-content a:hover {
    color: #3D5A73;
}

.update-content li[data-composer] {
    color: #3B8BBB;
    cursor: pointer;
    transition: color 0.2s ease;
}

.update-content li[data-composer]:hover {
    color: #3D5A73;
}

#songInfoBody a[data-composer],
#songInfoBody a[data-composer-link] {
    color: #3B8BBB;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

#songInfoBody a[data-composer]:hover,
#songInfoBody a[data-composer-link]:hover {
    color: #3D5A73;
}

.apple-music-badge {
    height: 40px;
    margin: 8px 8px 8px 0;
    display: inline-block;
    vertical-align: middle;
}

.spotify-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    width: 141px;
    height: 40px;
    border-radius: 6px;
    text-decoration: none;
    margin: 8px 0;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

.spotify-badge img {
    height: 20px;
    margin-right: 8px;
}

.imslp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    width: 141px;
    height: 40px;
    border-radius: 6px;
    text-decoration: none;
    margin: 8px 0 8px 8px;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

.imslp-badge img {
    height: 20px;
    margin-right: 8px;
}

.close-modal-button {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1300;
    width: 24px;
    height: 24px;
    padding: 10px;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.close-modal-button:hover {
    opacity: 0.8;
}

.close-modal-button:active {
    transform: scale(0.9);
}

.song-count {
    position: fixed;
    bottom: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 8px 16px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-suggest {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
}

.search-suggest[hidden] {
    display: none;
}

.search-suggest-item {
    font-size: 15px;
    color: #334155;
    padding: 8px 16px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

#searchInput {
    border: none;
    outline: none;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 20px;
    width: 200px;
    background: transparent;
    color: #334155;
}

#searchInput::placeholder {
    color: #94a3b8;
}

.clear-btn-img {
    width: 22px;
    height: 22px;
    margin-left: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0.5;
}

.clear-btn-img:hover {
    opacity: 0.8;
}

.clear-btn-img:active {
    transform: scale(0.9);
}
