:root{
    color-scheme:dark;
    --bg:#111413;
    --panel:#1b201e;
    --line:#303833;
    --muted:#a5b0a8;
    --ink:#f1f4ed;
    --accent:#c0ed85;
    font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:var(--bg);
    color:var(--ink);
    font-size:14px
}
*{
    box-sizing:border-box
}
body{
    margin:0
}
a{
    color:inherit
}
button,input,textarea,select{
    font:inherit
}
button,a,input,textarea,select,summary{
    -webkit-tap-highlight-color:transparent
}
a,button,input,textarea,select,summary{
    outline-offset:4px
}
:focus-visible{
    outline:2px solid var(--accent)
}
[hidden]{
    display:none!important
}
.app-header{
    max-width:1280px;
    margin:auto;
    padding:26px 40px;
    display:flex;
    align-items:center;
    gap:64px;
    border-bottom:1px solid var(--line)
}
.brand{
    text-decoration:none;
    font-size:24px;
    font-weight:750;
    letter-spacing:-1px;
    display:flex;
    align-items:center
}
.brand-mark{
    background:var(--accent);
    color:var(--bg);
    border-radius:10px;
    width:35px;
    height:35px;
    text-align:center;
    margin-right:10px;
    font-size:30px;
    line-height:30px
}
.brand-dot{
    color:var(--accent)
}
nav{
    display:flex;
    gap:28px
}
nav a{
    text-decoration:none;
    color:var(--muted);
    font-size:13px;
    padding:10px 0
}
nav a[aria-current],nav a:hover{
    color:var(--accent)
}
.header-note{
    margin-left:auto;
    font-size:9px;
    letter-spacing:1.5px;
    color:var(--muted)
}
main{
    max-width:1160px;
    padding:0 24px;
    min-height:70vh;
    margin:0 auto
}
footer{
    max-width:1112px;
    margin:50px auto 0;
    padding:24px 0;
    border-top:1px solid var(--line);
    color:var(--muted);
    font-size:12px;
    display:flex;
    justify-content:space-between
}
.page-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:46px 0 34px;
    overflow:hidden
}
.eyebrow{
    font-size:10px;
    font-weight:650;
    letter-spacing:2px;
    color:var(--accent);
    margin:0 0 14px
}
h1{
    font-size:clamp(34px,4.7vw,54px);
    line-height:1.08;
    letter-spacing:-2px;
    margin:0 0 16px;
    font-weight:650
}
h1 span{
    color:var(--muted)
}
.page-heading p:not(.eyebrow){
    color:var(--muted);
    margin-bottom:0
}
h2{
    font-size:20px;
    letter-spacing:-.5px;
    margin:0
}
h3{
    font-size:17px
}
.record-art{
    height:188px;
    width:188px;
    flex:none;
    margin:0 68px 0 20px;
    border-radius:50%;
    background:repeating-radial-gradient(circle,#262e28 0 1px,#141a16 2px 5px);
    border:1px solid #3b463b;
    display:grid;
    place-items:center;
    transform:rotate(-18deg);
    box-shadow:18px 18px 0 #1a241b
}
.record-label{
    width:70px;
    height:70px;
    border-radius:50%;
    background:var(--accent);
    color:#293c23;
    text-align:center;
    padding-top:14px;
    font-size:24px;
    font-weight:800
}
.record-label span{
    display:block;
    font-size:6px;
    letter-spacing:1px
}
.add-panel{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:16px;
    padding:24px
}
.section-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px
}
.supported{
    color:var(--muted);
    font-size:11px
}
textarea,input[type=search],input[type=url],input[type=text],select{
    background:#131815;
    border:1px solid #39433c;
    border-radius:9px;
    color:var(--ink);
    padding:13px 15px;
    min-width:0
}
textarea{
    width:100%;
    resize:vertical;
    min-height:85px;
    line-height:1.6
}
::placeholder{
    color:#89958c
}
.add-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:12px
}
.add-bottom>span{
    font-size:12px;
    color:var(--muted)
}
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    background:var(--accent);
    color:#1b2b12;
    border:1px solid transparent;
    border-radius:8px;
    font-weight:650;
    padding:11px 17px;
    cursor:pointer;
    min-height:40px;
    white-space:normal
}
.btn:hover{
    background:#d3f6a5
}
.btn-secondary{
    background:#29322c;
    color:#dce5dd;
    border-color:#404c43
}
.btn-secondary:hover{
    background:#364139
}
.btn-danger{
    background:transparent;
    color:#e5aaa3;
    border-color:#67423b
}
.btn-danger:hover{
    background:#402b27
}
.btn-sm{
    padding:7px 11px;
    font-size:12px;
    min-height:34px
}
.htmx-request button[type=submit]{
    opacity:.55;
    pointer-events:none
}
.album-disclosure{
    border-top:1px solid var(--line);
    margin-top:20px;
    padding-top:15px;
    color:var(--muted);
    font-size:12px
}
summary{
    cursor:pointer;
    padding:4px 0
}
.album-add-form{
    display:flex;
    gap:10px;
    margin-top:14px
}
.album-add-form input{
    flex:1
}
.library-section{
    margin-top:38px
}
.library-section .eyebrow{
    margin-bottom:8px
}
.live-label{
    font-size:11px;
    color:var(--muted);
    display:flex;
    align-items:center;
    gap:7px
}
.live-label>span{
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--accent)
}
#filters{
    display:flex;
    gap:12px;
    margin-bottom:16px
}
#q{
    flex:1
}
#status_filter{
    min-width:160px
}
.queue-counts{
    display:flex;
    gap:22px;
    flex-wrap:wrap;
    color:var(--muted);
    font-size:12px;
    margin:20px 0
}
.queue-counts strong{
    color:var(--ink);
    margin-right:5px
}
.bulk-bar{
    display:flex;
    gap:8px;
    justify-content:flex-end;
    margin:12px 0
}
.jobs-grid{
    display:flex;
    flex-direction:column;
    gap:10px
}
.job-card{
    display:flex;
    gap:18px;
    padding:18px;
    background:#181d1a;
    border:1px solid #2b342e;
    border-radius:12px
}
.job-card:has(.status-awaiting_review){
    border-color:#75643b;
    background:#201f18
}
.job-cover{
    flex:none;
    width:76px;
    height:76px
}
.job-cover img,.cover-placeholder{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:8px
}
.cover-placeholder{
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#3e5040,#202e24);
    color:#b4cba7;
    font-size:32px
}
.job-info{
    flex:1;
    min-width:0
}
.job-title{
    font-size:16px;
    font-weight:600;
    overflow-wrap:anywhere
}
.job-artist{
    font-size:13px;
    color:var(--muted);
    margin-top:4px;
    line-height:1.5
}
.job-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin-top:10px
}
.pill,.status,.quality-badge{
    font-size:10px;
    padding:4px 7px;
    border-radius:5px;
    background:#28312b;
    color:#b7c4ba
}
.status{
    font-weight:600
}
.status-done{
    color:#bce78e;
    background:#283923
}
.status-error{
    color:#ffb0a6;
    background:#472e29
}
.status-awaiting_review,.status-duplicate{
    color:#f3d08d;
    background:#443b23
}
.status-downloading,.status-identifying,.status-searching_tidal{
    color:#b1d1f2;
    background:#293b4c
}
.quality-badge.hires{
    color:#f6d684;
    background:#403923
}
.quality-badge.lossless{
    color:#c1e7a3;
    background:#2d3c29
}
.job-actions{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin-top:12px
}
.job-actions small{
    color:var(--muted);
    font-size:11px
}
.job-select{
    float:right;
    color:var(--muted);
    font-size:11px;
    display:flex;
    align-items:center;
    gap:6px;
    min-height:24px
}
input[type=checkbox]{
    accent-color:var(--accent);
    width:16px;
    height:16px
}
.job-details{
    margin-top:10px;
    color:var(--muted);
    font-size:12px
}
.job-details summary{
    width:fit-content
}
.error{
    color:#ffb1a7;
    overflow-wrap:anywhere
}
.job-error{
    margin-top:10px;
    padding:12px;
    background:#342420;
    border-radius:7px
}
.empty-state{
    padding:44px 16px;
    text-align:center;
    border:1px dashed var(--line);
    border-radius:12px;
    color:var(--muted)
}
.candidates{
    border-top:1px solid var(--line);
    margin-top:18px;
    padding-top:8px
}
.candidates>p{
    color:#d9cfb4;
    line-height:1.6;
    font-size:13px
}
.candidates ul{
    list-style:none;
    padding:0;
    margin:16px 0
}
.candidates li{
    display:flex;
    align-items:center;
    gap:16px;
    justify-content:space-between;
    background:#171c18;
    border:1px solid #3b4032;
    border-radius:9px;
    padding:14px;
    margin-bottom:8px
}
.candidate-info{
    min-width:0;
    font-size:12px;
    color:var(--muted);
    line-height:1.7;
    overflow-wrap:anywhere
}
.candidate-info a{
    display:block;
    color:var(--ink);
    font-size:14px;
    text-decoration:none;
    font-weight:600
}
.candidate-info a:hover{
    text-decoration:underline
}
.candidate-info small{
    display:block;
    font-size:11px;
    color:#b4c39e
}
.candidate-info em{
    color:#e4d098;
    font-style:normal
}
.candidate-score{
    font-size:10px;
    color:var(--muted)
}
.album-picker-box{
    margin-top:16px
}
.album-track-list{
    list-style:none;
    padding:0
}
.album-track-list li{
    padding:10px 0;
    border-bottom:1px solid var(--line)
}
.album-track-list label{
    display:flex;
    align-items:center;
    gap:10px
}
.track-duration{
    margin-left:auto;
    white-space:nowrap
}
.health-list{
    list-style:none;
    padding:0;
    display:grid;
    gap:10px
}
.health-item{
    display:flex;
    align-items:center;
    gap:12px;
    background:var(--panel);
    border:1px solid var(--line);
    padding:18px;
    border-radius:10px;
    overflow-wrap:anywhere
}
.health-dot{
    width:8px;
    height:8px;
    flex:none;
    border-radius:50%;
    background:#ef9688
}
.health-item.ok .health-dot{
    background:var(--accent)
}
.sync-ok{
    color:var(--accent)
}
.admin-heading{
    padding:40px 0 20px
}
.admin-panel{
    background:var(--panel);
    border:1px solid var(--line);
    padding:24px;
    border-radius:12px;
    line-height:1.8;
    margin-bottom:24px
}
.admin-panel form input{
    width:100%;
    margin:10px 0
}
.admin-panel p{
    color:var(--muted)
}
#connection-notice{
    position:fixed;
    bottom:20px;
    left:50%;
    transform:translateX(-50%);
    background:#4a302a;
    border:1px solid #ac6c5e;
    padding:14px 20px;
    border-radius:10px;
    max-width:90vw;
    z-index:5
}
.sr-only,.skip-link:not(:focus){
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%)
}
.skip-link:focus{
    display:block;
    padding:12px
}
.source-url{
    overflow-wrap:anywhere
}
.job-actions:empty{
    display:none
}
@media(min-width:900px){
    .job-card:not(:has(.candidates)) .job-info{
        position:relative;
        padding-right:85px
    }
    .job-select{
        position:absolute;
        right:0;
        top:0
    }
}
@media(max-width:700px){
    .app-header{
        padding:18px 20px;
        gap:20px;
        flex-wrap:wrap
    }
    .brand{
        font-size:22px
    }
    .header-note{
        display:none
    }
    nav{
        gap:20px;
        margin-left:auto
    }
    nav a{
        font-size:12px
    }
    main{
        padding:0 18px
    }
    .page-heading{
        padding:32px 0 26px
    }
    .record-art{
        width:110px;
        height:110px;
        margin:0 10px 0 14px
    }
    .record-label{
        width:48px;
        height:48px;
        font-size:18px;
        padding-top:9px
    }
    .record-label span{
        font-size:5px
    }
    h1{
        font-size:36px
    }
    .page-heading p:not(.eyebrow){
        max-width:260px;
        font-size:12px;
        line-height:1.6
    }
    .section-heading{
        align-items:flex-start
    }
    .add-panel{
        padding:18px
    }
    .supported{
        display:none
    }
    .add-bottom{
        align-items:flex-start;
        flex-direction:column
    }
    .add-bottom .btn{
        width:100%
    }
    .album-add-form{
        flex-direction:column
    }
    .live-label{
        max-width:130px;
        font-size:10px;
        line-height:1.5
    }
    .job-card{
        padding:14px;
        gap:12px
    }
    .job-cover{
        width:54px;
        height:54px
    }
    .job-title{
        font-size:14px
    }
    .job-select{
        float:none;
        margin-bottom:4px
    }
    .candidates{
        margin-left:-66px
    }
    .candidates li{
        gap:10px
    }
    .candidates li form{
        flex:none
    }
    #status_filter{
        min-width:115px;
        width:115px
    }
    #filters{
        gap:8px
    }
    .queue-counts{
        gap:12px
    }
    .bulk-bar{
        justify-content:flex-start
    }
    footer{
        margin:32px 18px 0
    }
    .health-item{
        flex-wrap:wrap
    }
    .health-item strong{
        min-width:100px
    }
}
@media(max-width:390px){
    nav{
        margin-left:0;
        width:100%;
        justify-content:space-between
    }
    .record-art{
        display:none
    }
    h1{
        font-size:34px
    }
    .candidates li{
        align-items:flex-start;
        flex-direction:column
    }
}
