
html{
    scroll-behavior:auto;
}
body{
    margin:0;
    background:${darkModeActive ? '#0b1120' : '#ffffff'};
    color:${darkModeActive ? '#f9fafb' : '#111111'};
    font-family:Arial,Helvetica,sans-serif;
}
.play-shell{
    max-width:none;
    width:100%;
    margin:0;
    padding:24px 24px 36px 24px;
}
.brand{
    font-size:26px;
    font-weight:900;
    letter-spacing:-0.5px;
    margin:0;
}
.site{
    margin:4px 0 8px;
    font-size:14px;
}
.play-toolbar{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    padding:4px 0 10px;
    margin:0 0 20px;
    scrollbar-width:thin;
}
.play-toolbar-button{
    flex:0 0 auto;
    min-height:42px;
    padding:0 14px;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:999px;
    background:${darkModeActive ? '#111827' : '#ffffff'};
    color:inherit;
    font-weight:800;
    font-size:14px;
    cursor:pointer;
    white-space:nowrap;
}
.play-toolbar-status{
    flex:0 0 auto;
    min-height:42px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:999px;
    background:${darkModeActive ? '#111827' : '#ffffff'};
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}
.chord-gallery{
    margin:0 0 22px;
}
.chord-gallery-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:10px;
}
.chord-gallery-card{
    appearance:none;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:18px;
    background:${darkModeActive ? '#111827' : '#ffffff'};
    color:inherit;
    padding:10px 8px;
    display:grid;
    gap:8px;
    justify-items:center;
    cursor:pointer;
    min-width:0;
    text-align:center;
    box-shadow:0 10px 22px rgba(15,23,42,.08);
}
.chord-gallery-name{
    font-size:14px;
    font-weight:900;
    line-height:1.1;
    overflow-wrap:anywhere;
}
.chord-gallery-preview{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
}
.chord-gallery-preview svg{
    display:block;
    width:100%;
    max-width:94px;
    height:auto;
}
.chord-gallery-empty{
    font-size:11px;
    font-weight:700;
    color:${darkModeActive ? '#cbd5e1' : '#64748b'};
}
.chord-modal{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    padding:22px;
    background:rgba(15,23,42,.78);
    z-index:90;
}
.chord-modal.is-open{
    display:flex;
}
.chord-modal-card{
    position:relative;
    width:min(100%,860px);
    max-width:100%;
    max-height:100%;
    overflow:auto;
    background:${darkModeActive ? '#111827' : '#ffffff'};
    color:inherit;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:26px;
    padding:28px 22px;
    display:grid;
    place-items:center;
    box-shadow:0 28px 60px rgba(0,0,0,.28);
}
.chord-modal-close{
    position:absolute;
    top:16px;
    right:16px;
    width:42px;
    height:42px;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:999px;
    background:${darkModeActive ? '#111827' : '#ffffff'};
    color:inherit;
    font-size:22px;
    font-weight:900;
    cursor:pointer;
}
.chord-modal-body{
    display:grid;
    gap:18px;
    justify-items:center;
    text-align:center;
    width:100%;
}
.chord-modal-title{
    font-size:28px;
    font-weight:900;
    line-height:1;
}
.chord-modal-diagram svg{
    display:block;
    width:min(100%,340px);
    height:auto;
}
.play-side-controls{
    position:fixed;
    top:50%;
    right:max(10px, env(safe-area-inset-right));
    transform:translateY(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    z-index:50;
}
.play-side-button{
    width:56px;
    min-height:56px;
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    border-radius:18px;
    background:${darkModeActive ? 'rgba(17,24,39,.95)' : 'rgba(255,255,255,.95)'};
    color:inherit;
    font-weight:900;
    font-size:20px;
    cursor:pointer;
    box-shadow:0 12px 28px rgba(15,23,42,.18);
}
.play-side-button-main{
    font-size:13px;
    line-height:1.15;
    padding:10px 6px;
}
.play-side-status{
    min-width:56px;
    padding:8px 6px;
    border-radius:14px;
    background:${darkModeActive ? 'rgba(17,24,39,.95)' : 'rgba(255,255,255,.95)'};
    border:1px solid ${darkModeActive ? '#243044' : '#d1d5db'};
    font-size:11px;
    font-weight:800;
    text-align:center;
    box-shadow:0 12px 28px rgba(15,23,42,.18);
}
.song-title{
    margin:0 0 6px;
    font-size:32px;
    font-weight:900;
}
.song-artist{
    margin:0 0 22px;
    font-size:20px;
    font-weight:700;
}
.play-card{
    background:${darkModeActive ? '#111827' : '#ffffff'};
    border:1px solid ${darkModeActive ? '#243044' : '#e5e7eb'};
    border-radius:24px;
    box-shadow:0 14px 36px rgba(15,23,42,.08);
    padding:22px;
}
.cifra-box{
    overflow-x:auto;
    overflow-y:hidden;
    max-width:100%;
    -webkit-overflow-scrolling:touch;
}
.play-cifra{
    margin:0;
    min-width:100%;
    display:inline-block;
    font-family:${safeFontFamily};
    font-size:${safeFontSize};
    line-height:${safeLineHeight};
    color:${darkModeActive ? '#f9fafb' : '#111111'};
}
.play-cifra-line{
    display:block;
    white-space:pre;
}
.chord{
    color:${darkModeActive ? '#60a5fa' : '#2563eb'};
    font-weight:900;
}
@page{
    margin:16mm;
}
@media(max-width:768px){
    .play-shell{
        width:100%;
        padding:14px 68px 24px 12px;
    }
    .play-card{
        border-radius:18px;
        padding:14px;
    }
    .play-toolbar{
        gap:6px;
        padding-bottom:8px;
        margin-bottom:18px;
    }
    .play-toolbar-button{
        min-height:38px;
        padding:0 11px;
        font-size:13px;
    }
    .play-toolbar-status{
        min-height:38px;
        padding:0 11px;
        font-size:12px;
    }
    .chord-gallery-grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:8px;
    }
    .chord-gallery-card{
        padding:8px 6px;
        border-radius:14px;
    }
    .chord-gallery-name{
        font-size:12px;
    }
    .chord-gallery-preview svg{
        max-width:72px;
    }
    .play-side-controls{
        right:8px;
        gap:8px;
    }
    .play-side-button{
        width:48px;
        min-height:48px;
        border-radius:16px;
    }
    .play-side-button-main{
        font-size:11px;
        min-height:54px;
    }
    .play-side-status{
        min-width:48px;
        font-size:10px;
    }
    .song-title{
        font-size:28px;
    }
    .song-artist{
        font-size:18px;
        margin-bottom:18px;
    }
    .cifra-box{
        overflow-x:hidden;
    }
    .play-cifra{
        display:block;
        min-width:0;
        width:100%;
        font-size:min(${safeFontSize}, 16px);
        line-height:1.62;
    }
    .play-cifra-line{
        white-space:pre-wrap;
        overflow-wrap:anywhere;
        word-break:break-word;
    }
    .chord-modal{
        padding:0;
    }
    .chord-modal-card{
        width:100%;
        height:100%;
        max-height:none;
        border-radius:0;
        padding:56px 16px 24px;
    }
    .chord-modal-close{
        top:calc(env(safe-area-inset-top) + 46px);
        right:16px;
    }
    .chord-modal-title{
        font-size:24px;
    }
    .chord-modal-diagram svg{
        width:min(100%,300px);
    }
}
