* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #0b0620; color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
#cv { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Boutons tactiles pause / quitter (téléphone) : en bas à droite, sur le public, pour ne cacher aucune note */
#touch-bar { position: fixed; right: 10px; bottom: 10px; z-index: 6; display: flex; gap: 8px; }
#touch-bar.up { bottom: auto; top: 44px; }
#touch-bar.hidden { display: none; }
#touch-bar button { width: 46px; height: 46px; padding: 0; font-size: 18px; border-radius: 50%; border-width: 1px; background: rgba(11,6,32,.7); }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  gap: 18px; padding: 24px; text-align: center; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 20%, #2a1260 0%, #0b0620 70%); }
.hidden { display: none; }

h1 { font-size: clamp(44px, 9vw, 96px); font-weight: 900; letter-spacing: -2px; line-height: 1; }
h1 span { color: #c77dff; text-shadow: 0 0 30px rgba(199,125,255,.6); }
.tag { color: rgba(255,255,255,.7); font-size: 18px; }

.diffs { display: flex; gap: 8px; background: rgba(255,255,255,.07); padding: 5px; border-radius: 14px; }
.diffs button { border: 0; background: none; color: rgba(255,255,255,.65); padding: 9px 20px; border-radius: 10px; font-size: 15px; }
.diffs button.on { background: #c77dff; color: #0b0620; }

.poses { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; }
.pose { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; font-size: 11px; color: rgba(255,255,255,.75); }
.pose canvas { width: 56px; height: 56px; border-radius: 12px; border: 2px solid; background: rgba(255,255,255,.05); }
.extras { color: rgba(255,255,255,.55); font-size: 14px; min-height: 18px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
button, .btn { font: inherit; font-weight: 700; font-size: 17px; color: #fff; cursor: pointer;
  padding: 14px 26px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06);
  transition: transform .08s, background .15s; }
button:hover, .btn:hover { background: rgba(255,255,255,.14); }
button:active, .btn:active { transform: scale(.97); }
button.primary { background: #c77dff; border-color: #c77dff; color: #0b0620; box-shadow: 0 0 30px rgba(199,125,255,.45); }
button.primary:hover { background: #d89bff; }
.actions.small button { font-size: 14px; padding: 9px 18px; font-weight: 600; }

.status { min-height: 20px; font-size: 14px; color: #ffe066; }
.hint { font-size: 12px; color: rgba(255,255,255,.4); max-width: 640px; }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,.15); border-top-color: #c77dff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.rank { font-size: 150px; font-weight: 900; line-height: 1; color: #ffe066; text-shadow: 0 0 50px rgba(255,224,102,.5); }
.score { font-size: 44px; font-weight: 800; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; color: rgba(255,255,255,.8); font-size: 17px; font-weight: 600; }
.stats > div { min-width: 132px; padding: 14px 20px 12px; border-radius: 18px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.1); }
.stats b { display: block; font-size: 54px; font-weight: 900; line-height: 1.05; color: #fff; }
.stats small { display: block; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); }
.stats .ok { border-color: rgba(181,228,140,.6); background: rgba(181,228,140,.12); } .stats .ok b { color: #b5e48c; }
.stats .bad { border-color: rgba(255,77,109,.6); background: rgba(255,77,109,.12); } .stats .bad b { color: #ff4d6d; }
.stats .ok b, .stats .bad b { font-size: 72px; }
.res-gestures { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; }
.res-gestures:empty { display: none; }
.res-gestures span { font-size: 20px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.14); }
.res-gestures i { font-style: normal; font-size: 26px; vertical-align: middle; }
.res-gestures .bad { border-color: #ff4d6d; color: #ff4d6d; } .res-gestures .mid { border-color: #ffd166; color: #ffd166; } .res-gestures .ok { border-color: rgba(181,228,140,.5); }
body.dropping::after { content: 'Dépose tes musiques ou un dossier'; position: fixed; inset: 12px; border: 3px dashed #c77dff; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; background: rgba(11,6,32,.85); z-index: 9; }

#lab-panel { position: fixed; right: 24px; bottom: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); font-size: 12px; color: rgba(255,255,255,.75); }
#lab-panel.hidden { display: none; }
#lab-panel label { display: block; }
#lab-panel b { color: #fff; float: right; }
#lab-panel input { display: block; width: 100%; margin-top: 3px; accent-color: #c77dff; }
#lab-panel button { font-size: 12px; padding: 7px 10px; font-weight: 600; border-width: 1px; }

.library { display: flex; flex-direction: column; gap: 6px; width: min(520px, 100%); }
.library:empty { display: none; }
.library h2 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; }
.library .row { display: flex; gap: 6px; }
.library .song { flex: 1; text-align: left; font-size: 15px; padding: 10px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library .del { font-size: 13px; padding: 10px 13px; color: rgba(255,255,255,.6); border-width: 1px; }

.library .tempo { font-size: 13px; padding: 10px 12px; border-width: 1px; color: rgba(255,255,255,.75); white-space: nowrap; }
.library .tempo.on { border-color: #ffe066; color: #ffe066; }

.actions.small a.btn { font-size: 14px; padding: 9px 18px; font-weight: 600; text-decoration: none; }

.stars { font-size: 54px; line-height: 1; color: #ffe066; letter-spacing: 6px; text-shadow: 0 0 24px rgba(255,224,102,.45); }
.rank { font-size: 84px; }

/* Bibliothèque : favoris, tri, playlists, soirée */
.library .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.library .row { align-items: stretch; flex-wrap: wrap; }
.library .mini { font-size: 13px; padding: 10px 12px; border-width: 1px; color: rgba(255,255,255,.75); white-space: nowrap; font-weight: 600; }
.library .head .mini { padding: 6px 12px; }
.library .mini.on { border-color: #ffe066; color: #ffe066; }
.library .song.on { border-color: #c77dff; background: rgba(199,125,255,.18); }
.library input[type=text] { flex: 1; min-width: 120px; font: inherit; font-size: 14px; color: #fff; padding: 9px 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.library input[type=text]::placeholder { color: rgba(255,255,255,.4); }
.library .note { font-size: 12px; color: rgba(255,255,255,.5); text-align: left; }
.library h2 { margin-top: 10px; text-align: left; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); }
.chip.turn { background: #c77dff; color: #0b0620; font-weight: 700; }
.chip button { font-size: 11px; padding: 2px 7px; border: 0; background: rgba(0,0,0,.25); border-radius: 999px; }
.board { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); font-size: 15px; }
.board:empty { display: none; }
.board div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 14px; border-radius: 10px; background: rgba(255,255,255,.07); }
.board div.me { background: rgba(199,125,255,.28); }
.board span { color: rgba(255,255,255,.7); }
.turn-name { font-size: clamp(54px, 12vw, 130px); font-weight: 900; line-height: 1; color: #ffe066; text-shadow: 0 0 50px rgba(255,224,102,.5); overflow-wrap: anywhere; }
button.hidden { display: none; }

#stats { justify-content: flex-start; padding-top: 34px; }
.stats-title { font-size: 30px; }
#stats-body { width: min(1100px, 100%); text-align: left; }
#stats-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
#stats-body th, #stats-body td { padding: 7px 9px; border-bottom: 1px solid rgba(255,255,255,.12); vertical-align: top; }
#stats-body th { color: rgba(255,255,255,.55); font-weight: 600; text-align: left; font-size: 12px; }
#stats-body tr.bad td:nth-child(3) b { color: #ff4d6d; } #stats-body tr.mid td:nth-child(3) b { color: #ffd166; }
#stats-body tr.bad { background: rgba(255,77,109,.08); }
#stats-body .em { font-size: 22px; vertical-align: middle; }
#stats-body small { color: rgba(255,255,255,.55); }
#stats-body h3 { margin: 22px 0 8px; font-size: 17px; color: #c77dff; }
#stats-body .chips { display: flex; flex-wrap: wrap; gap: 8px; }
#stats-body .chips > span { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
#stats-body pre { white-space: pre-wrap; background: rgba(0,0,0,.35); padding: 12px; border-radius: 10px; font-size: 12px; user-select: all; }

button.cam.on { border-color: #b5e48c; color: #b5e48c; }
button.cam.err { border-color: #ff4d6d; color: #ff4d6d; }

.diffs.small button { font-size: 13px; padding: 6px 14px; }
.diffs.hidden { display: none; }

.diffs .who { align-self: center; padding: 0 8px 0 10px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); }

/* Vignette du lecteur YouTube (le lecteur doit rester visible quand il joue) */
#yt-box { position: fixed; left: 16px; bottom: 16px; width: 200px; height: 200px; z-index: 5; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); background: #000; }
#yt-box.off { left: -9999px; }
#yt-box iframe { display: block; }

.library .go { font-size: 14px; padding: 10px 14px; white-space: nowrap; background: #c77dff; border-color: #c77dff; color: #0b0620; }
.library .go:hover { background: #d89bff; }

.library .seek { display: flex; align-items: center; gap: 10px; padding: 2px 6px 8px 46px; }
.library .seek input[type=range] { flex: 1; accent-color: #c77dff; height: 22px; cursor: pointer; }
.library .seek .time { font-size: 12px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.library .seek .mini { padding: 4px 10px; }

/* Liste des musiques : plus large, titres lisibles en entier (sur deux lignes au besoin), boutons annexes discrets */
.library { width: min(940px, 100%); gap: 8px; }
.library h2 { font-size: 14px; }
.library .row { align-items: center; gap: 8px; padding: 5px; border-radius: 18px; background: rgba(255,255,255,.04); transition: background .15s; }
.library .row:hover { background: rgba(255,255,255,.09); }
.library .song { flex: 1 1 280px; min-width: 0; font-size: 18px; line-height: 1.25; padding: 12px 16px; border-color: transparent; background: none;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.library .song:hover { background: rgba(255,255,255,.08); }
.library .song.on { border-color: #c77dff; }
.library .go { font-size: 16px; padding: 12px 20px; border-radius: 12px; }
.library .mini, .library .tempo, .library .del { flex: none; font-size: 14px; padding: 10px 12px; border-radius: 12px; border-color: rgba(255,255,255,.14); background: none; }
.library .tempo { min-width: 68px; font-variant-numeric: tabular-nums; }
.library .del { color: rgba(255,255,255,.4); border-color: transparent; }
.library .del:hover { color: #ff4d6d; background: rgba(255,77,109,.12); }
.library .head { padding: 0 6px; }
.library .head .mini { padding: 6px 12px; }
.library input[type=text] { font-size: 15px; }
.library .seek { padding-left: 62px; }

/* Organisation : bacs et playlists en colonnes, cartes à glisser */
#organize { justify-content: flex-start; align-items: stretch; text-align: left; gap: 10px; padding: 18px; }
#organize .hint { max-width: none; }
.org-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.org-top h2 { font-size: 24px; flex: 1; white-space: nowrap; }
.org-top button, .org-top .btn { font-size: 14px; padding: 9px 16px; }
#organize input[type=text] { font: inherit; font-size: 14px; color: #fff; padding: 9px 14px; border-radius: 12px; min-width: 0;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
#organize input[type=text]::placeholder { color: rgba(255,255,255,.4); }
#org-sel { color: #c77dff; }
#org-board { flex: 1; min-height: 260px; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.col { flex: 1 0 230px; max-width: 360px; display: flex; flex-direction: column; min-height: 0; border-radius: 14px;
  background: rgba(255,255,255,.05); border: 2px solid rgba(255,255,255,.1); transition: border-color .12s, background .12s; }
.col.over { border-color: #c77dff; background: rgba(199,125,255,.14); }
.col.bin-fav { border-top-color: #ffe066; } .col.bin-keep { border-top-color: #b5e48c; } .col.bin-out { border-top-color: #ff4d6d; }
.col.pl { border-style: dashed; }
.col-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 12px 6px; }
.col-head b { font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-head small { order: 3; flex-basis: 100%; font-size: 11px; color: rgba(255,255,255,.45); }
.col-head button, .card button { font-size: 12px; padding: 4px 8px; border-width: 1px; border-radius: 8px; font-weight: 600; }
.cards { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding: 4px 8px 10px; min-height: 60px; }
.cards .empty { font-size: 12px; color: rgba(255,255,255,.35); text-align: center; padding: 18px 6px; }
.cards .row { display: flex; gap: 6px; } .cards .row input { flex: 1; } .cards .row button { font-size: 13px; padding: 8px 12px; border-width: 1px; }
.card { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 10px; font-size: 14px; cursor: grab; user-select: none;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.card:hover { background: rgba(255,255,255,.14); }
.card .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { font-size: 11px; color: #ffe066; white-space: nowrap; }
.card.sel { border-color: #c77dff; background: rgba(199,125,255,.25); }
.card.playing { border-color: #b5e48c; }
.card.dragging { opacity: .4; }
.card.ins { box-shadow: 0 -3px 0 #c77dff; }
.card.ghost { cursor: default; opacity: .55; border-style: dashed; }
.card.ghost .name { text-decoration: line-through; }
.bin-out .card:not(.ghost) .name { color: rgba(255,255,255,.7); }
.bin-out .col-head button { order: 4; }

/* Pochettes : image trouvée dans le dossier de la musique */
.cover { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.07); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.cover.none { display: flex; align-items: center; justify-content: center; font-size: 22px; color: rgba(255,255,255,.25); box-shadow: none; }
.card .cover { width: 30px; height: 30px; border-radius: 6px; }

/* Lecteur de l'écran Organiser : écouter, avancer dans le morceau, classer */
#org-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px;
  background: rgba(199,125,255,.14); border: 1px solid rgba(199,125,255,.5); }
#org-player.hidden { display: none; }
#org-player .name { flex: 0 1 260px; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#org-player .cover { width: 40px; height: 40px; border-radius: 8px; }
#org-player .seek { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; }
#org-player .seek input[type=range] { flex: 1; min-width: 120px; accent-color: #c77dff; height: 26px; cursor: pointer; }
#org-player .seek .time { font-size: 13px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; white-space: nowrap; }
#org-player .mini { font-size: 13px; padding: 7px 11px; border-width: 1px; font-weight: 600; white-space: nowrap; }
#org-player .mini.on { border-color: #ffe066; color: #ffe066; }
#org-player .mini:disabled { opacity: .35; cursor: default; }


/* ================= Accueil : barre de marque, colonne « partie » à gauche, bibliothèque à droite ================= */
#home { display: block; padding: 0 clamp(14px, 3vw, 36px) 28px; text-align: left;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(199,125,255,.30), transparent 62%),
    radial-gradient(760px 480px at 96% 4%, rgba(255,143,171,.16), transparent 60%),
    #0b0620; }
#home.hidden { display: none; }      /* l'identifiant l'emporte sur .hidden : sans cette règle, l'accueil resterait affiché par-dessus le jeu */
#home > * { max-width: 1320px; margin-left: auto; margin-right: auto; }

.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap;
  padding: 16px 0 14px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(rgba(11,6,32,.94), rgba(11,6,32,.82)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; white-space: nowrap; }
.brand .logo { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 4px 18px rgba(199,125,255,.55)); }
.brand span { color: #fff; text-shadow: none; }
.brand b { font-weight: 800; margin-left: 5px; background: linear-gradient(90deg, #c77dff, #ff8fab); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .tag { flex: 1 1 240px; font-size: 15px; color: rgba(255,255,255,.6); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top-actions button, .top-actions .btn { font-size: 14px; font-weight: 600; padding: 9px 14px; border-width: 1px; border-radius: 999px; text-decoration: none; }
#version { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; white-space: nowrap; }
#version:empty { display: none; }

#home > .status { min-height: 0; margin-bottom: 14px; padding: 10px 16px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: rgba(255,224,102,.1); border: 1px solid rgba(255,224,102,.35); }
#home > .status:empty { display: none; }

.home-grid { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.side, .content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { padding: 20px; border-radius: 22px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.panel:empty { display: none; }
.panel-title, #home .library h2 { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(255,255,255,.5); text-align: left; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head .panel-title { margin: 0; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-actions .btn { font-size: 14px; font-weight: 600; padding: 9px 16px; border-width: 1px; border-radius: 12px; }

/* colonne « Ta partie » */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field .label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); }
#home .diffs { width: 100%; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); }
#home .diffs button { flex: 1; padding: 10px 8px; font-size: 14px; font-weight: 700; white-space: nowrap; border-radius: 10px; }
#home .diffs button.on { box-shadow: 0 4px 16px rgba(199,125,255,.4); }
#home .diffs.small button { font-size: 12.5px; padding: 8px 6px; font-weight: 600; }
#home .diffs.small button.on { background: rgba(199,125,255,.25); color: #fff; box-shadow: inset 0 0 0 1px #c77dff; }
#home .poses { justify-content: flex-start; gap: 8px; max-width: none; }
#home .pose { width: 62px; font-size: 10.5px; text-align: center; line-height: 1.2; }
#home .pose canvas { width: 54px; height: 54px; border-radius: 14px; background: rgba(0,0,0,.25); }
#home .extras { font-size: 13px; min-height: 0; line-height: 1.4; }
.cta { width: 100%; font-size: 19px; padding: 17px 20px; border-radius: 16px; border: 0;
  background: linear-gradient(100deg, #c77dff, #e39bff 55%, #ff8fab); box-shadow: 0 10px 34px rgba(199,125,255,.5); }
.cta:hover { filter: brightness(1.08); }
.cta-note { margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,.45); text-align: center; }

/* tuiles de réglages et d'outils */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles button { font-size: 13.5px; font-weight: 600; padding: 12px 12px; border-width: 1px; border-radius: 13px; text-align: left;
  border-color: rgba(255,255,255,.1); background: rgba(0,0,0,.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles button:hover { background: rgba(255,255,255,.1); border-color: rgba(199,125,255,.6); }

/* bibliothèque et sections voisines : pleine largeur dans leur panneau */
#home .library { width: 100%; }
#home .library h2 { margin-top: 18px; margin-bottom: 4px; }
#home .library > h2:first-child, #home .library .head h2 { margin-top: 0; }
#home .library .head { padding: 0; margin-bottom: 4px; }
#home .library .head h2 { margin-bottom: 0; }
.empty-state { display: none; padding: 34px 16px; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.18); text-align: center; font-size: 15px; color: rgba(255,255,255,.55); }
#library:empty + .empty-state { display: block; }
#home .hint { max-width: 1320px; margin-top: 22px; text-align: center; }

@media (min-width: 981px) {
  .side { position: sticky; top: 92px; max-height: calc(100dvh - 104px); overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
}
@media (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar { position: static; }
  .topbar .tag { order: 3; flex-basis: 100%; }
}
@media (max-width: 520px) {
  .brand { font-size: 24px; } .brand .logo { width: 34px; height: 34px; }
  .panel { padding: 14px; border-radius: 18px; }
  #home .diffs button { font-size: 13px; padding: 10px 4px; min-width: 0; }
  #home .diffs.small button { font-size: 11.5px; padding: 8px 2px; white-space: normal; line-height: 1.15; }
  #home .library .head { flex-wrap: wrap; }
  #home .library .song { flex: 1 1 130px; font-size: 16px; padding: 8px 6px; }
  #home .library .cover { width: 44px; height: 44px; }
  .top-actions { width: 100%; }
}
