#menu{position:fixed!important;left:-300vw!important;visibility:hidden}
#hub,#settings{position:fixed;inset:0;z-index:20;color:#fff3de;font:600 15px system-ui,sans-serif;background:#0d0b1b;overflow:hidden;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#hub .bg{position:absolute;inset:-20%;background:radial-gradient(circle at 20% 30%,var(--a,#e8455b)55,transparent 45%),radial-gradient(circle at 85% 80%,#5fb3ff33,transparent 40%);filter:blur(30px);transition:background .6s;animation:drift 18s ease-in-out infinite alternate}
@keyframes drift{to{transform:translate(4%,3%) scale(1.08)}}
#hub header,#settings header{position:relative;display:flex;gap:12px;align-items:center;padding:14px 22px;flex-wrap:wrap}
.logo{font:1000 italic 28px system-ui;letter-spacing:-.05em;color:#f0ddbc}.logo span{color:var(--a,#e8455b);margin-left:3px}
#hq{flex:1;min-width:160px;max-width:420px;padding:11px 16px;border-radius:99px;border:1px solid #ffffff2a;background:#ffffff14;color:inherit;font:inherit;outline:none}#hq:focus{border-color:var(--a,#e8455b)}
.tabs{display:flex;gap:6px}#hub button,#settings button{cursor:pointer;color:inherit;font:inherit;border:1px solid #ffffff22;background:#ffffff12;border-radius:99px;padding:9px 15px;transition:.2s}
#hub button:hover,#settings button:hover{background:#ffffff26;transform:translateY(-1px)}.tabs .on,#hbands .on{background:var(--a,#e8455b)!important;border-color:transparent!important;color:#fff}
#hbands{position:relative;display:flex;gap:7px;overflow-x:auto;padding:0 22px 10px;scrollbar-width:none}#hbands button{white-space:nowrap;font-size:13px;padding:7px 13px}
#hub main{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:minmax(300px,380px) 1fr;gap:22px;padding:6px 22px 22px}
#hdet{border-radius:24px;padding:20px;background:#ffffff10;border:1px solid #ffffff1c;backdrop-filter:blur(14px);overflow:auto;animation:rise .5s}
@keyframes rise{from{opacity:0;transform:translateY(14px)}}
#hdet .cv{width:100%;aspect-ratio:1;border-radius:18px}#hdet h2{margin:16px 0 2px;font:900 28px/1.05 system-ui;letter-spacing:-.03em}#hdet p{margin:0 0 12px;color:#ffffffaa}
.chips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.chips span{padding:5px 11px;border-radius:99px;background:#ffffff14;font-size:12px}
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}.seg .on{background:#ffffff30;border-color:#fff8}
#hplay{width:100%;padding:15px!important;font-size:18px!important;font-weight:900!important;background:var(--a,#e8455b)!important;border-color:transparent!important;color:#fff;box-shadow:0 8px 30px var(--a,#e8455b)66}#hplay:disabled{opacity:.5}
#hgrid{overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px;align-content:start;padding:4px 6px 30px 4px;scrollbar-width:thin}
.card{position:relative;text-align:left;padding:10px!important;border-radius:18px!important;background:#ffffff10!important;display:flex!important;flex-direction:column;gap:3px;animation:rise .45s backwards}
.card:hover{transform:translateY(-4px) scale(1.02)!important;box-shadow:0 12px 30px #0007}.card.on{outline:2px solid var(--a);background:#ffffff22!important}
.card b{font-size:14px;line-height:1.2}.card span,.card em{font:500 12px system-ui;color:#ffffffa0;font-style:normal}.fv{position:absolute;right:14px;top:14px;font-size:20px;color:#fff9;text-shadow:0 1px 6px #000}.fv.on{color:#ffd35f}
.cv{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:linear-gradient(135deg,var(--a),#1a1530);display:grid;place-items:center}.cv i{font:1000 italic 64px system-ui;color:#fff6}.cv img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sc{margin:0 0 14px;padding:16px;border-radius:18px;background:#ffffff0e;border:1px solid #ffffff18}.sc h3{margin:0 0 10px}#sbody{overflow-y:auto;padding:6px 22px 30px;columns:380px;column-gap:16px}.sc{break-inside:avoid}
#settings{background:#0d0b1b}#settings h2{margin:0}#settings .sc label{display:block;margin:10px 0}#settings select,#settings input[type=file]{width:100%;margin-top:4px;color:inherit;background:#25273b;border:1px solid #ffffff22;border-radius:9px;padding:8px}
@media(max-width:760px){#hub main{grid-template-columns:1fr;grid-template-rows:auto 1fr;gap:10px;padding:4px 12px 12px}#hdet{display:grid;grid-template-columns:90px 1fr;gap:4px 12px;padding:12px;max-height:44dvh}#hdet .cv{grid-row:1/4}#hdet h2{font-size:19px;margin:0}.seg,#hplay,.chips,#hbest{grid-column:1/3}#hgrid{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:9px}#hub header{padding:10px 12px}.logo{display:none}}

body.battle-dialog #menu{left:50%!important;top:50%;transform:translate(-50%,-50%);visibility:visible!important;z-index:25;max-width:92vw;width:420px!important;}
body.battle-dialog #menu h1{font-size:42px!important;}

#hub .bg{background:radial-gradient(ellipse at 10% 0%,var(--a,#e8455b),transparent 42%),radial-gradient(ellipse at 90% 90%,#281950,transparent 60%);opacity:.28;filter:blur(60px)}#hub header{border-bottom:1px solid #ffffff14;background:#0b0b17aa}#hsort{width:auto;max-width:160px;margin:0;padding:8px 10px}#hdet{background:linear-gradient(155deg,#ffffff16,#111121ef);border:1px solid #ffffff22}#hdet .cv{max-height:38vh;aspect-ratio:1;object-fit:contain}#hpreview{margin-top:8px;width:100%}.album{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:#bbb7ce!important}.coverhint{font-size:11px;margin-top:10px!important}.card .cv{width:100%;background:linear-gradient(145deg,var(--a),#151527 65%)}.card .cv i{font-size:76px;opacity:.65}.card:hover .cv{filter:brightness(1.12)}@media (max-height:540px) and (orientation:landscape){#hub main{grid-template-columns:230px 1fr;grid-template-rows:1fr;gap:8px;padding:4px 10px}#hdet{display:block;max-height:none;padding:10px}#hdet .cv{max-height:100px;max-width:100px;float:left;margin-right:10px}#hdet h2{font-size:19px}#hub header{padding:5px 10px;gap:5px}#hbands{padding-bottom:4px}#hgrid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}.card{padding:6px!important}.card .cv{max-height:110px}}

#hcover{width:100%;margin-top:8px}#hub .bg:after{content:"";position:absolute;inset:0;background-image:var(--album-art,none);background-size:cover;background-position:center;opacity:.35;filter:blur(28px)}

/* Mobile catalogue: compact list rows and explicitly bounded scroll containers. */
@media (pointer:coarse), (max-width:760px) {
 #hub,#settings{height:100dvh;max-height:100dvh;min-height:0;min-width:0;overflow:hidden;touch-action:auto}
 #hub .bg{pointer-events:none}
 #hub header,#hbands{flex:0 0 auto;min-width:0}
 #hub main{flex:1 1 0;min-height:0;min-width:0;overflow:hidden}
 #hgrid{min-width:0;min-height:0;height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start;align-items:start;gap:6px;padding:2px 4px 18px}
 #hub .card{display:grid!important;grid-template-columns:54px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:10px;row-gap:2px;align-items:center;min-width:0;min-height:70px;width:100%;height:auto;padding:7px 36px 7px 7px!important;border-radius:11px!important;touch-action:pan-y;animation:none;transform:none!important;box-shadow:none!important}
 #hub .card .cv{grid-column:1;grid-row:1/4;width:54px;height:54px;min-width:0;max-width:54px;max-height:54px;aspect-ratio:1;border-radius:7px;pointer-events:none}
 #hub .card .cv i{font-size:28px}
 #hub .card b,#hub .card span,#hub .card em{grid-column:2;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2;pointer-events:none}
 #hub .card b{font-size:13px;grid-row:1}#hub .card span:not(.album){font-size:11px;grid-row:2}#hub .card .album{display:none}#hub .card em{font-size:10px;grid-row:3}
 #hub .card .fv{right:5px;top:50%;transform:translateY(-50%);width:29px;height:38px;display:grid;place-items:center;touch-action:pan-y;font-size:20px}
 #hdet{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior-y:contain;animation:none}
 #hbands{overflow-x:auto;touch-action:pan-x;scrollbar-width:none}#hbands button{flex:none;touch-action:pan-x}
 #hub header{overflow-x:auto;touch-action:auto;scrollbar-width:none}#hub header button{white-space:nowrap}
 #settings header{flex:none}#sbody{flex:1 1 0;min-height:0;overflow-y:auto;touch-action:pan-y;overscroll-behavior-y:contain;columns:auto}
}
@media (max-width:760px) and (orientation:portrait){
 #hub header{display:flex;flex-wrap:wrap;gap:5px;padding:7px 10px;overflow:visible}
 #hub header #hq{flex:1 0 100%;width:100%;max-width:none;min-width:0;padding:7px 12px;font-size:16px}
 #hub header .tabs{flex:1 0 auto;gap:3px}#hub header button,#hub header select{font-size:11px;padding:6px 8px}#hub header #hsort{max-width:94px;min-width:0;flex:0 1 auto}#hub header #hset,#hub header #offlineButton{flex:none}
 #hbands{padding:3px 10px 6px;gap:5px}#hbands button{font-size:11px;padding:6px 10px}
 #hub main{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:6px;padding:3px 9px 7px}
 #hdet{display:grid;grid-template-columns:50px minmax(0,1fr) minmax(0,1fr);gap:3px 8px;align-items:center;padding:8px;border-radius:12px;max-height:34dvh}
 #hdet .cv{grid-column:1;grid-row:1/3;width:50px;height:50px;max-width:50px;max-height:50px;border-radius:8px}
 #hdet h2{grid-column:2/4;font-size:16px;line-height:1.15;margin:0;overflow-wrap:anywhere}#hdet p{margin:0;font-size:11px;line-height:1.2}#hdet>p:not(.album):not(#hbest):not(.coverhint){grid-column:2/4}#hdet .album{grid-column:1/4}#hdet .chips{grid-column:1/4;gap:4px;margin:0}#hdet .chips span{font-size:10px;padding:2px 6px}#hdet .seg{grid-column:1/4;margin:2px 0;gap:3px}#hdet .seg button{font-size:11px;padding:5px 3px}#hdet #hbest{grid-column:1/4}#hdet #hplay{grid-column:1/3;padding:8px!important;font-size:15px!important}#hdet #hpreview{grid-column:3;margin:0;padding:8px 3px;font-size:11px}#hdet #hcover{grid-column:1/4;margin:0;padding:4px;font-size:10px}#hdet .coverhint{display:none}
}
@media (orientation:landscape) and (max-height:540px){
 #hub main{grid-template-columns:minmax(155px,29%) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:7px;padding:3px 8px 6px}
 #hub header{flex-wrap:nowrap;gap:4px;padding:4px 8px;min-height:36px}#hub header>*{flex-shrink:0}#hub header #hq{width:130px;min-width:100px;font-size:16px;padding:4px 8px}#hub header button,#hub header select{font-size:11px;padding:5px 8px}#hbands{padding:2px 8px 5px}#hbands button{font-size:11px;padding:4px 9px}
 #hdet{display:block;max-height:100%;padding:8px;border-radius:12px}#hdet .cv{float:none;width:50px;height:50px;max-width:50px;max-height:50px;margin:0 0 5px}#hdet h2{font-size:16px;margin:0 0 3px}#hdet p{font-size:11px;margin:0 0 4px}#hdet .chips{gap:3px;margin-bottom:4px}#hdet .chips span{padding:3px 5px;font-size:10px}#hdet .seg{gap:3px;margin:5px 0}#hdet .seg button{font-size:10px;padding:5px 2px}#hdet #hplay{padding:8px!important;font-size:14px!important}#hdet #hpreview,#hdet #hcover{margin-top:5px;font-size:10px;padding:5px}#hdet .coverhint{display:none}
 #hgrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr))}
}
