:root {
  color-scheme:dark; --bg:#11151b; --surface:#202630; --line:#333b47; --muted:#b4bac5;
  --accent:#93e2d4; --active-lyric:#ffe0a1;
  font:16px/1.45 -apple-system,BlinkMacSystemFont,Roboto,"Segoe UI",sans-serif;
  background:var(--bg); color:#f6f4f2;
}
* { box-sizing:border-box }
[hidden] { display:none!important }
body { margin:0 }
main { max-width:56rem; padding:clamp(16px,4vw,40px); margin:auto }
.music main { padding-bottom:8rem }
.music.has-mini main { padding-bottom:11rem }
.music:has(#library[hidden]) > .dock, .music:has(#player[hidden]) :is(.transport,.player-options) { display:none }
.music:has(#player:not([hidden])) { display:flex; flex-direction:column; height:100vh; height:100dvh }
.music:has(#player:not([hidden])) main { display:flex; flex-direction:column; flex:1 1 0; min-height:0; width:100%; margin:0 auto; padding-bottom:0; overflow-y:auto; overflow-anchor:none }
.music:has(#player:not([hidden])) main > * { flex-shrink:0 }
.music:has(#player:not([hidden])) #library { display:contents }
#player:not([hidden]) { display:flex; flex-direction:column; flex:1 0 0px; min-height:0 }
#player > * { flex-shrink:0 }
.music:has(#player:not([hidden])) > .dock { position:relative; inset:auto; flex:none }
h1,h2,p { margin:0 }
h1 { font-size:clamp(2.25rem,7vw,3.65rem); line-height:1.08; letter-spacing:-.055em }
h2 { font-size:1.17rem; letter-spacing:-.025em }
button, input, select { font:inherit; color:inherit }
button,select,.sign input { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:.58rem .9rem; min-height:44px }
button,a,summary { cursor:pointer; -webkit-tap-highlight-color:transparent }
button:focus-visible,input:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px }
a { color:var(--accent) }
label { display:block; margin:1rem 0 .35rem }
select { width:100% }
details summary { min-height:44px; align-content:center }
input[type=file] { display:block; max-width:100% }
.sign { max-width:25rem; margin:8vh auto }.sign input,.sign button { width:100% }.sign button { margin-top:1rem }
.mast,.identity,#profile,#clubBadge,.section-heading,.list-heading,.filter,.record-heading,.transport,.track { display:flex; align-items:center }
.mast { justify-content:space-between; padding-bottom:.7rem; border-bottom:1px solid #ffffff13 }
.identity { gap:.55rem; font-size:1.02rem; letter-spacing:-.025em }
.brand { width:2.45rem; height:2.45rem; object-fit:contain }
.account-menu { position:relative }
.account-menu summary,.remove { display:grid; place-content:center; width:44px; height:44px; border:0; border-radius:50%; background:#202630 }
.account-menu summary { list-style:none; color:#e7eaed; letter-spacing:.13em; padding-left:.13em }
.account-menu summary::-webkit-details-marker { display:none }
.menu-panel { position:absolute; top:calc(100% + .3rem); right:0; z-index:5; width:max-content; min-width:11.5rem; padding:.3rem; background:#252b34; border:1px solid #4a515e; border-radius:14px; box-shadow:0 12px 36px #0008 }
.menu-panel>*,.profile-actions>* { display:flex; gap:.75rem; align-items:center; width:100%; min-height:44px; padding:.65rem .85rem; background:none; border:0; color:inherit; text-decoration:none; border-radius:9px; text-align:start }
.menu-panel>*:hover,.profile-actions>*:hover,.track:hover { background:#ffffff0b }
.menu-panel svg,#profileDialog svg { width:1.35rem; height:1.35rem; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; color:var(--accent) }
#profileDialog { width:min(23rem,calc(100% - 2rem)); max-height:calc(100% - 2rem); overflow:auto; padding:1rem; border:1px solid #47545d; border-radius:20px; background:#1b232d; color:inherit; box-shadow:0 18px 60px #0006 }
#profileDialog::backdrop { background:#080d15b8 }
#profileDialog header,.profile-identity { display:flex; align-items:center; gap:.85rem }
#profileDialog header { justify-content:space-between }
.close-profile { width:44px; height:44px; display:grid; place-items:center; padding:0; border-radius:50% }
.profile-identity { padding:.8rem .3rem 1.2rem; overflow-wrap:anywhere }
.profile-portrait { display:grid; place-items:center; overflow:hidden; position:relative; width:3.4rem; height:3.4rem; flex:none; border-radius:50%; background:#233e40; border:1px solid #40605e }
.profile-portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
#profileDialog .profile-portrait svg { width:1.65rem; height:1.65rem }
#profileClub { display:flex; align-items:center; gap:.3rem; color:var(--muted) }
.profile-actions { padding-top:.4rem; border-top:1px solid var(--line) }
#status:not(:empty),#access:not([hidden]),#usb:not([hidden]) { margin-top:1rem }
#status:empty,#added:empty,#listMessage:empty { display:none }
#status,.muted,.total,details p,#added,#listMessage { color:var(--muted) }
#profile { gap:.4rem; color:var(--muted); min-height:1.8rem; font-size:.78rem; margin-top:1.25rem; flex-wrap:wrap }
.avatar,#avatarFallback { width:1.65rem; height:1.65rem; border-radius:50%; object-fit:cover }
#avatarFallback { display:grid; place-content:center; font-weight:650; background:#24413f; color:var(--accent) }
#clubBadge { gap:.3rem; margin-left:.4rem; font-size:.71rem }
.clubLogo { width:1.4rem; height:1.4rem; object-fit:contain }
.section-heading { justify-content:space-between; gap:.5rem; margin:.55rem 0 1.2rem }
#training .section-heading { margin-top:1.55rem }
.total,.eyebrow { font-size:.8rem; font-weight:600; white-space:nowrap }
#collections { display:flex; gap:clamp(6px,2vw,14px); margin-bottom:1rem }
#collections:empty { display:none }
.collection { position:relative; isolation:isolate; overflow:hidden; display:flex; flex:1; min-width:0; flex-direction:column; justify-content:end; align-items:start; text-align:left; height:clamp(105px,24vw,178px); padding:clamp(8px,2.5vw,16px); border:1px solid #ffffff22; border-radius:14px }
.collection .art,.collection::after { position:absolute; inset:0; width:100%; height:100%; border-radius:0; z-index:-2 }
.collection::after { content:""; z-index:-1; background:linear-gradient(0deg,#0a0d10e8,#0a0d1055 65%,transparent) }
.collection b { font-size:clamp(.96rem,3.9vw,1.5rem); letter-spacing:-.035em }
.collection small { color:#ece8e3; font-size:.73rem }
.collection[aria-pressed=true] { border:2px solid var(--accent) }
.filter { gap:12px; padding:0 14px; background:#212730; border:1px solid #ffffff0e; border-radius:13px }
.filter input { width:100%; border:0; background:none; min-height:44px; min-width:0 }
.filter input::placeholder { color:#b4bac5 }
.list-heading { min-height:3.45rem; justify-content:space-between }
.quiet { background:none; border:0; color:var(--accent); padding:.3rem 0 }
.tracks { padding:0; margin:0; list-style:none }
.tracks li { display:flex; align-items:center; border-bottom:1px solid #ffffff12 }
.track { flex:1; min-width:0; text-align:left; background:transparent; border:0; padding:.48rem .15rem; gap:.8rem; border-radius:8px; min-height:64px }
.track-title { flex:1; min-width:0; overflow-wrap:anywhere; font-weight:600; line-height:1.32 }
.track-title small,.track time { color:var(--muted); font-weight:400; font-size:.75rem; font-variant-numeric:tabular-nums }
.track-title small { white-space:nowrap }
.track time { margin-inline:.25rem }
.art { --disc:#47837f; --label:#f2c986; display:block; position:relative; flex:none; width:48px; height:48px; border-radius:9px; overflow:hidden; background:linear-gradient(135deg,var(--disc),#1a1e2a) }
.art::before { content:""; position:absolute; inset:10% -6% -24% 18%; border-radius:50%; background:radial-gradient(circle,#1c1b24 0 2%,var(--label) 2.8% 20%,transparent 21%),repeating-radial-gradient(circle,#202431 0 3%,#47434e 4%,#262732 5% 7%); box-shadow:-2px 3px 8px #0007 }
.tone-1 { --disc:#98566a; --label:#edac94 }.tone-2 { --disc:#c17a4b; --label:#f5d57a }.tone-3 { --disc:#71638d; --label:#c2b1df }.tone-4 { --disc:#426481; --label:#a3d2e4 }
.art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
#training .muted { font-size:.87rem; margin:0 0 1.1rem }
.remove { color:var(--muted); font-size:1.35rem; background:transparent }
.player-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:.4rem 0 }
.player-actions button { font-size:.9rem }
#added { text-align:end; margin-bottom:.45rem }
.record-heading { gap:clamp(12px,3vw,25px); padding-bottom:.7rem }
#recordArt .art { width:clamp(78px,23vw,146px); height:auto; aspect-ratio:1; border-radius:14px; box-shadow:0 8px 22px #0004 }
#title { font-size:clamp(1.5rem,6vw,2.9rem); overflow-wrap:anywhere }
.eyebrow { display:block; color:var(--accent); margin:0 0 .3rem; font-size:.77rem; letter-spacing:.025em }
.reading { flex:1 0 6rem; min-height:0; background:#1c222b; border-radius:16px; overflow:auto; overflow-wrap:anywhere; padding:1rem; margin:.8rem 0; scrollbar-width:thin; scrollbar-gutter:stable; overflow-anchor:none }
#words { white-space:pre-line }
.word { display:inline-flex; max-width:100%; vertical-align:top; align-items:center; flex-direction:column; margin:0 7px .18rem 0; font-size:clamp(1.25rem,4.4vw,1.8rem); line-height:1.3; font-weight:650 }
.word small { font-size:.78rem; color:var(--muted); font-weight:400 }
.sung { color:var(--accent) }.word .current { color:var(--active-lyric); text-decoration:underline; text-decoration-thickness:.1em; text-underline-offset:.15em }
#translation { color:#e7cd99; line-height:1.3; margin:.28rem 0 0 }
.transport { max-width:56rem; margin:auto; gap:clamp(.35rem,2vw,.8rem); padding:.25rem clamp(12px,4vw,40px); border-bottom:1px solid var(--line) }
#play,.sign button { background:var(--accent); color:#102122; font-weight:650 }
#clock { min-width:5ch; font-variant-numeric:tabular-nums; font-size:.87rem }
#seek { flex:1; min-width:36px; height:44px; margin:0; accent-color:var(--accent) }
#count { min-width:1ch; text-align:center; color:var(--accent); font-size:1.6rem; font-variant-numeric:tabular-nums }
.dock { position:fixed; inset:auto 0 0; z-index:3; background:#171c23fa; border-top:1px solid #3b424d; padding-bottom:env(safe-area-inset-bottom) }
.dock nav,#mini { display:flex; justify-content:center; max-width:53rem; margin:auto }
.dock nav button { display:flex; flex:1; max-width:15rem; flex-direction:column; gap:3px; align-items:center; height:58px; justify-content:center; font-weight:600; font-size:.72rem; background:transparent; color:var(--muted); border:0 }
.dock nav [aria-current] { color:var(--accent) }
#mini { width:100%; align-items:center; gap:.7rem; justify-content:start; padding:.3rem 1rem; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; text-align:left }
#mini .art { width:34px; height:34px; border-radius:6px }
.mini-title { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.icon { position:relative; display:inline-block; color:inherit; flex:none }
.books { width:19px; height:18px; border-inline:3px double currentColor }
.books::after { content:""; position:absolute; inset:1px 4px 0 auto; width:3px; background:currentColor; transform:rotate(-12deg) }
.queue-icon { width:21px; height:17px; background:repeating-linear-gradient(to bottom,currentColor 0 2px,transparent 2px 6px); border-radius:1px }
.search-icon { width:15px; height:15px; border:1.7px solid var(--muted); border-radius:50% }
.search-icon::after { content:""; position:absolute; width:7px; height:2px; background:var(--muted); bottom:-2px; right:-5px; transform:rotate(45deg) }
@media(min-width:700px) { .track { padding:.55rem .45rem }.art { width:54px; height:54px }.section-heading { margin-bottom:1.5rem } }
.record-heading { position:relative; isolation:isolate; min-height:8rem; overflow:hidden; padding:1rem; border-radius:18px; background:#18212b }
.record-heading::before { content:""; position:absolute; z-index:-1; inset:0; background:url("/brand/sbk.png") right -1rem center / auto 142% no-repeat; opacity:.13 }
.sleeve { position:relative; flex:none; line-height:0 }
#play { position:absolute; bottom:5px; right:5px; display:grid; place-items:center; width:44px; height:44px; border:1px solid #fffa; border-radius:50%; color:white; background:#13191eea; box-shadow:0 2px 8px #0008; padding:0 }
#play span { display:block; width:0; height:0; border-block:8px solid transparent; border-left:13px solid white; margin-left:3px }
#play[aria-pressed=true] span { width:12px; height:16px; border:0; border-inline:4px solid white; margin:0 }
#playerClub { display:flex; align-items:center; gap:.3em; margin-top:.4em; color:var(--muted) }
#playerClub img { width:22px; height:22px; object-fit:contain }
#playerClub:empty { display:none }
.record-info { min-width:0 }
.track-times { display:flex; flex-wrap:wrap; gap:.15rem .9rem; margin-top:.4rem; color:var(--muted); font-size:.8rem; font-variant-numeric:tabular-nums }
.track-times span { white-space:nowrap }
.track-times b { color:#f6f4f2; font-weight:600 }
#queueTransport { display:flex; gap:.2rem } #queueTransport button { min-width:40px }
.dock-row { max-width:56rem; margin:auto }
.player-options { min-width:0; padding-inline:clamp(.5rem,3vw,1.5rem) }
.option-bar { display:grid; grid-template-columns:1fr 1.1fr auto; align-items:center; gap:clamp(.25rem,2vw,1rem) }
#moreOptions { display:grid; place-items:center; width:44px; padding:0; background:transparent; border:0; color:var(--muted) }
#moreOptions[aria-expanded=true] { color:var(--accent); background:var(--surface) }
#moreOptions svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round }
#optionPanel { height:min(9rem,20vh); height:min(9rem,20dvh); overflow:auto; overscroll-behavior:contain; border-top:1px solid var(--line); padding:.3rem; scrollbar-width:thin }
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:48px; margin:0; cursor:pointer }
.switch-row input { appearance:none; -webkit-appearance:none; width:44px; height:26px; flex:none; margin:0; padding:3px; border:1px solid #747e89; border-radius:18px; background:#323a43; cursor:pointer }
.switch-row input::before { content:""; display:block; width:18px; height:18px; border-radius:50%; background:#eef3f4 }
.switch-row input:checked { background:var(--accent); border-color:var(--accent) }
.switch-row input:checked::before { transform:translateX(18px); background:#152223 }
.option-bar .switch-row { justify-content:center; min-width:0; min-height:44px; gap:.35rem; font-size:.83rem; line-height:1.15; hyphens:auto; overflow-wrap:anywhere }
.option-bar input { width:30px; height:18px; padding:2px }
.option-bar input::before { width:12px; height:12px }
.option-bar input:checked::before { transform:translateX(12px) }
.beat-choices,#digits,#languages { display:flex; align-items:center; gap:.25rem }
.beat-choices { padding:0 0 .65rem; border-bottom:1px solid var(--line) }
#allCounts { min-width:3.25rem; padding:.35rem; background:transparent; color:var(--accent) }
#digits { flex:1; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)) }
#digits button { min-width:0; padding:.35rem 0 }
#digits button[aria-pressed=true] { background:var(--accent); color:#102122 }
#grid { margin:.5rem 0 }
#languages { gap:1.25rem }
#languages label { display:flex; align-items:center; gap:.4rem; min-height:44px; margin:0; cursor:pointer }
#languages input { margin:0; accent-color:var(--accent) }
#edits { margin-top:.6rem }
@media (min-width:34rem) {
  .music:has(#player:not([hidden])) .dock-row { display:grid; grid-template-columns:minmax(0,2fr) minmax(9rem,1fr); align-items:start }
  .option-bar { min-height:52px }
  .dock-row nav { width:100% }
}
@media (orientation:landscape) and (max-height:36rem) and (min-width:30rem) {
  .music:has(#player:not([hidden])) main { padding-top:.35rem }
  #player:not([hidden]) {
    container-type:size; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
    grid-auto-rows:max-content; align-content:start; column-gap:1rem; min-height:7rem; overflow-y:auto;
  }
  #player > * { grid-column:1 }
  #player > .reading {
    grid-column:2; grid-row:1 / span 4; align-self:start; position:sticky; top:0;
    height:calc(100cqh - .5rem); margin:.25rem 0;
  }
  .record-heading { min-height:0; padding:.6rem }
  #recordArt .art { width:4rem }
}

#releaseDialog { width:min(90vw,32rem); max-height:85vh; overflow:auto; border:1px solid var(--line); border-radius:18px; color:inherit; background:#1b232d; padding:1.3rem }
#releaseDialog::backdrop { background:#060a10ba }
#releaseDialog label,#localGrids { display:block; margin:.8rem 0 }
#releaseDialog input,#releaseDialog select { width:100%; margin-top:.3rem }
#localGrids { color:var(--accent); text-decoration:underline }
