/* ---------- Font (incluso nell'app, funziona offline) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --c1: #7b5cff;
  --c2: #ff4fa3;
  --c3: #22d3ee;
  --bg: #08080f;
  --text: #f4f4fb;
  --muted: rgba(232, 234, 255, .62);
  --faint: rgba(232, 234, 255, .38);
  --line: rgba(255, 255, 255, .09);
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --surface-3: rgba(255, 255, 255, .13);
  --stroke: rgba(255, 255, 255, .14);
  --accent: #b7a4ff;
  --accent-strong: #8f74ff;
  --ok: #3ddc97;
  --warn: #ffb44c;
  --err: #ff5f6d;
  --radius: 24px;
  --player-h: 92px;
  --tb-h: 0px;
  --blur: blur(34px) saturate(170%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.45 "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: -.005em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
body.desktop { --tb-h: 36px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(143, 116, 255, .45); }

/* Icone a tratto */
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Sfondo liquido ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 800px at 50% 120%, #15112b, var(--bg)); }
/* Le macchie di colore sono sfumature già morbide (niente filtro blur da 100 px, niente fusione dei livelli):
   stesso aspetto, ma il telefono le disegna una volta sola invece che a ogni fotogramma */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #7b5cff; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #ff4fa3; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #22d3ee; }
:root { transition: --c1 1.6s ease, --c2 1.6s ease, --c3 1.6s ease; }
.blob {
  position: absolute; width: 80vmax; height: 80vmax; border-radius: 50%; opacity: .5;
  background: radial-gradient(closest-side, var(--blob), transparent);
  background: radial-gradient(closest-side, var(--blob), color-mix(in srgb, var(--blob) 45%, transparent) 45%, transparent);
  will-change: transform;
}
.b1 { --blob: var(--c1); top: -35vmax; left: -25vmax; }
.b2 { --blob: var(--c2); bottom: -40vmax; right: -30vmax; }
.b3 { --blob: var(--c3); top: 25%; left: 30%; width: 55vmax; height: 55vmax; opacity: .28; }
/* sul computer le macchie si muovono piano (lì la scheda video non fa fatica) */
@media (hover: hover) and (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .blob { animation: float 28s ease-in-out infinite alternate; }
  .b2 { animation-duration: 34s; animation-delay: -8s; }
  .b3 { animation-duration: 40s; animation-delay: -14s; }
}
.grain { position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12vmax, 8vmax) scale(1.15); }
  100% { transform: translate(-8vmax, 14vmax) scale(.9); }
}

/* ---------- Vetro ---------- */
.glass {
  position: relative;
  background: linear-gradient(140deg, rgba(255,255,255,.1), rgba(255,255,255,.025) 45%, rgba(255,255,255,.05));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 30px rgba(255,255,255,.03), 0 24px 60px -24px rgba(0,0,0,.7);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), rgba(255,255,255,.08), transparent 60%);
}
.glass > * { position: relative; z-index: 1; }

/* ---------- Copertine con segnaposto (mai un'immagine rotta) ---------- */
.art-box { position: relative; overflow: hidden; flex: none; background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); }
.art-box::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; background: rgba(255,255,255,.3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.art-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.art-box > img:not([src]), .art-box > img.broken { opacity: 0; }
.art-box.has-icon::before { display: none; }
.art-box.has-icon { display: grid; place-items: center; color: #fff; }

/* ---------- Barra del titolo (desktop) ---------- */
.titlebar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--tb-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; padding-left: 16px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.tb-drag { flex: 1; height: 100%; display: flex; align-items: center; gap: 9px; -webkit-app-region: drag; }
.tb-btns { display: flex; height: 100%; -webkit-app-region: no-drag; }
.tb-btns button { width: 46px; height: 100%; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.tb-btns .i { width: 15px; height: 15px; stroke-width: 1.6; }
.tb-btns button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.tb-btns .tb-close:hover { background: #e81123; color: #fff; }

/* ---------- Layout ---------- */
.shell {
  position: fixed; top: calc(var(--tb-h) + 10px); left: 10px; right: 10px; bottom: calc(var(--player-h) + 20px);
  display: grid; grid-template-columns: 264px 1fr; gap: 10px;
}
body.desktop .shell { top: var(--tb-h); }
.sidebar { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 12px; overflow: hidden; }
.logo { display: flex; align-items: center; gap: 11px; padding: 2px 12px 18px; font-weight: 800; font-size: 21px; letter-spacing: -.6px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label { padding: 0 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.nav {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px;
  color: var(--muted); font-weight: 650; transition: background .2s, color .2s; position: relative;
}
.nav .i { width: 21px; height: 21px; }
.nav:hover { color: var(--text); background: var(--surface); }
.nav.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.nav.active::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: linear-gradient(var(--accent), var(--c2)); }
.side-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex: 1; overflow-y: auto; min-height: 0; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 8px 14px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.side-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 14px; color: var(--muted); transition: background .2s, color .2s; }
.side-item:hover { background: var(--surface); color: var(--text); }
.side-item.active { background: var(--surface-2); color: var(--text); }
.side-txt { display: flex; flex-direction: column; min-width: 0; }
.side-txt b, .side-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-txt b { font-weight: 650; font-size: 14px; color: var(--text); }
.side-txt small { font-size: 12px; color: var(--faint); }
.mini-art { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; }
.mini-art .i { width: 18px; height: 18px; }
.liked-art { background: linear-gradient(135deg, #5b3cff, #c4b5ff); color: #fff; }
.liked-art .i { fill: currentColor; }
.download-btn {
  display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 10px; padding: 12px;
  border-radius: 16px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, rgba(123,92,255,.5), rgba(255,79,163,.4));
  border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .2s, filter .2s;
}
.download-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
body.desktop .download-btn { display: none; }

.main { overflow: hidden; }
.view { height: 100%; overflow-y: auto; padding: 30px 32px 48px; scroll-behavior: smooth; }
.view::-webkit-scrollbar, .side-sec::-webkit-scrollbar, #qList::-webkit-scrollbar { width: 10px; }
.view::-webkit-scrollbar-thumb, .side-sec::-webkit-scrollbar-thumb, #qList::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.view-enter { animation: enter .45s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Tipografia ---------- */
h1 { font-size: 36px; font-weight: 800; margin: 0 0 6px; letter-spacing: -1.2px; line-height: 1.1; }
h2 { font-size: 21px; font-weight: 800; margin: 36px 0 14px; letter-spacing: -.5px; }
.view > h2:first-child { margin-top: 0; }
.greet { margin-bottom: 26px; }
.mobile-only { display: none !important; }
h3 { font-weight: 750; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.h-link { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h-link a { font-size: 13px; font-weight: 700; color: var(--muted); }
.h-link a:hover { color: var(--text); }
.desc { max-width: 760px; white-space: pre-line; }

/* ---------- Card ---------- */
.row { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.card { padding: 12px 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid transparent; transition: background .3s, transform .3s var(--ease), border-color .3s; cursor: pointer; position: relative; min-width: 0; }
.card:hover { background: var(--surface-2); border-color: var(--line); transform: translateY(-3px); }
.card-art { aspect-ratio: 1; border-radius: 14px; margin-bottom: 12px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.8); }
.card.round .card-art { border-radius: 50%; }
.card-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.card .fab { position: absolute; right: 20px; top: calc(100% - 108px); opacity: 0; transform: translateY(8px); transition: .3s var(--ease); width: 46px; height: 46px; }
.card:hover .fab { opacity: 1; transform: none; }
.tile .i { width: 46%; height: 46%; stroke-width: 1.6; }
.dl-art { background: linear-gradient(135deg, #0f9b74, #46e3a5); }

.fab, .play-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, #fff, #ece7ff 45%, #c3b3ff);
  color: #140d2e; box-shadow: 0 10px 24px -8px rgba(123,92,255,.85), inset 0 -3px 6px rgba(0,0,0,.12), inset 0 2px 2px #fff;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.fab .i, .play-btn .i { width: 22px; height: 22px; }
.fab:hover, .play-btn:hover { transform: scale(1.06); }
.fab:active, .play-btn:active { transform: scale(.94); filter: url(#liquid); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--line); transition: .2s; }
.chip:hover { background: var(--surface-3); }
.chip.active { background: #fff; color: #140d2e; border-color: #fff; }

.genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.genre { height: 112px; border-radius: 20px; padding: 16px 18px; font-weight: 800; font-size: 19px; letter-spacing: -.4px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); transition: transform .25s var(--ease); }
.genre:hover { transform: scale(1.03); }
.genre::after { content: ""; position: absolute; width: 90px; height: 90px; right: -18px; bottom: -18px; border-radius: 24px; background: rgba(255,255,255,.2); transform: rotate(25deg); }

/* ---------- Elenco brani ---------- */
.tracks { display: flex; flex-direction: column; }
.t-head, .t-row { display: grid; grid-template-columns: 34px 46px 1fr auto 56px; align-items: center; gap: 14px; padding: 7px 12px; }
.t-head { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); margin-bottom: 6px; padding-bottom: 9px; }
.t-head span:first-child { text-align: center; }
.t-head span:last-child { display: flex; justify-content: flex-end; }
.t-head .i { width: 16px; height: 16px; }
.t-row { border-radius: 12px; cursor: pointer; transition: background .15s; }
.t-row:hover { background: var(--surface-2); }
.t-row.playing { background: rgba(183,164,255,.13); }
.t-row.playing .t-title { color: var(--accent); }
.t-num { color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.t-row:hover .t-num { color: var(--text); }
.thumb { width: 46px; height: 46px; border-radius: 9px; }
.t-info { min-width: 0; }
.t-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-artist { display: block; margin-top: 1px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.t-artist:hover { text-decoration: underline; color: var(--text); }
.t-actions { display: flex; align-items: center; gap: 2px; }
.t-actions > * { opacity: 0; transition: opacity .15s; }
/* sempre visibili: "mi piace" attivo e lo stato del download (scaricato o in corso) */
.t-row:hover .t-actions > *, .t-actions > .liked, .t-actions > .has { opacity: 1; }
.dl-one.done { color: var(--ok); }
.dl-one.err { color: var(--err); opacity: 1; }
.dl-one .ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--accent) var(--p, 0%), rgba(255,255,255,.2) 0);
  -webkit-mask: radial-gradient(circle, transparent 4.5px, #000 5px); mask: radial-gradient(circle, transparent 4.5px, #000 5px); }
.t-dur { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
body.offline .t-row[data-list]:not(.local):not(.on-pc) { opacity: .35; }

/* ---------- Testata di playlist / album / artista ---------- */
.hero { display: flex; gap: 28px; align-items: flex-end; margin: 0 0 28px; }
.hero-art { width: 220px; height: 220px; border-radius: 22px; box-shadow: 0 30px 70px -24px rgba(0,0,0,.9); }
.hero-art.round { border-radius: 50%; }
.hero-art .i { width: 42%; height: 42%; stroke-width: 1.5; }
.hero-kind { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(32px, 5vw, 66px); line-height: 1; margin: 8px 0 12px; letter-spacing: -2px; }
.hero .sub { margin-bottom: 18px; }
.hero .sub a:hover { text-decoration: underline; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-actions .fab { width: 58px; height: 58px; }
.hero-actions .icon-btn { width: 44px; height: 44px; }
.hero-actions .icon-btn .i { width: 22px; height: 22px; }

/* ---------- Pulsanti ---------- */
.btn, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; transition: background .2s, border-color .2s, transform .15s, filter .2s; white-space: nowrap; }
.btn { background: #fff; color: #140d2e; }
.btn:hover { filter: brightness(.92); }
.btn-ghost { border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,.32); }
.btn:active, .btn-ghost:active { transform: scale(.97); }
.btn .i, .btn-ghost .i { width: 17px; height: 17px; }
.btn-danger:hover { border-color: rgba(255,95,109,.6); color: #ff8a94; }
.dl-btn.done { border-color: rgba(61,220,151,.55); color: var(--ok); }
.more-btn { display: flex; margin: 22px auto; }

.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); transition: color .2s, background .2s, transform .15s; position: relative; flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .i { width: 17px; height: 17px; }
.liked { color: #ff5fa8 !important; }
.liked .i { fill: currentColor; }
.rep1 { display: none; position: absolute; top: 5px; right: 4px; font-size: 9px; font-weight: 800; line-height: 1; background: var(--accent); color: #140d2e; border-radius: 6px; padding: 1px 3px; }
#pRepeat.one .rep1 { display: block; }

.search-box { display: flex; align-items: center; gap: 12px; padding: 0 20px; height: 54px; border-radius: 999px; margin-bottom: 28px; max-width: 580px; background: var(--surface-2); border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); transition: border-color .2s, box-shadow .2s; }
.search-box .i { color: var(--muted); width: 22px; height: 22px; }
.search-box input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 600; }
.search-box input::placeholder { color: var(--faint); }
.search-box:focus-within { border-color: rgba(183,164,255,.7); box-shadow: 0 0 0 4px rgba(123,92,255,.2), inset 0 1px 0 rgba(255,255,255,.2); }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.empty a { text-decoration: underline; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Player ---------- */
.player {
  position: fixed; left: 10px; right: 10px; bottom: 10px; height: var(--player-h); z-index: 20;
  display: grid; grid-template-columns: 1fr minmax(320px, 1.3fr) 1fr; align-items: center; gap: 18px; padding: 0 18px 0 14px;
  border-radius: 28px;
}
.p-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.p-art { width: 62px; height: 62px; border-radius: 14px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.9); cursor: pointer; }
.p-meta { min-width: 0; }
.p-title { font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist:hover { color: var(--text); text-decoration: underline; }
body.idle .p-title { color: var(--muted); font-weight: 650; }
body.idle .p-art { cursor: default; }
.p-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.p-controls { display: flex; align-items: center; gap: 12px; }
.p-controls .play-btn { width: 44px; height: 44px; }
.p-controls .play-btn .i { width: 20px; height: 20px; }
body.idle .p-controls, body.idle .p-progress { opacity: .45; pointer-events: none; }
.p-progress { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 11.5px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.p-progress span { width: 38px; text-align: center; }
.p-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.vol { display: flex; align-items: center; gap: 4px; margin: 0 4px; }
#pVol { width: 104px; flex: none; }

input[type=range] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 16px; background: transparent; cursor: pointer; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.16) var(--p, 0%)); }
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p, 0%), rgba(255,255,255,.2) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); transform: scale(0); transition: transform .15s; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { transform: scale(1); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range]:focus-visible { outline: none; }

/* ---------- Coda ---------- */
.queue {
  position: fixed; right: 10px; top: calc(var(--tb-h) + 10px); bottom: calc(var(--player-h) + 20px); width: 360px; z-index: 25;
  display: flex; flex-direction: column; padding: 16px 8px 8px; animation: slideIn .35s var(--ease);
  background: linear-gradient(140deg, rgba(30,26,52,.72), rgba(18,16,34,.6));
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.q-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 6px 14px; }
.q-head h3 { margin: 0; font-size: 18px; }
.q-label { color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: 14px 14px 6px; }
#qList { overflow-y: auto; flex: 1; }
#qList .t-row { grid-template-columns: 42px 1fr; }
#qList .thumb { width: 42px; height: 42px; }

/* ---------- In riproduzione (schermo intero) ---------- */
.np { position: fixed; inset: 0; z-index: 40; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(60vmax 60vmax at 20% 10%, var(--c1), transparent 70%), radial-gradient(60vmax 60vmax at 90% 90%, var(--c2), transparent 70%), var(--bg);
  padding: calc(var(--tb-h) + 14px) 24px calc(var(--player-h) + 24px); animation: npIn .5s var(--ease); }
@keyframes npIn { from { opacity: 0; transform: translateY(24px); } }
.np-bg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(80px) saturate(150%) brightness(.5); transform: scale(1.1); }
.np-bg::after { content: ""; position: absolute; inset: 0; background: rgba(6,6,14,.4); }
.np-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.np-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .2s, transform .15s; }
.round-btn:hover { background: rgba(255,255,255,.18); }
.round-btn:active { transform: scale(.92); }
.round-btn .i { width: 22px; height: 22px; }
.round-btn.on { background: #fff; color: #140d2e; }
.np-inner { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 6vw; width: 100%; max-width: 1300px; margin: 0 auto; }
.np-main { text-align: center; flex: none; }
.np-art { width: min(52vh, 80vw); height: min(52vh, 80vw); border-radius: 30px; margin: 0 auto 28px; box-shadow: 0 40px 100px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.12); animation: breathe 6s ease-in-out infinite; }
.np.paused .np-art { animation-play-state: paused; transform: scale(.95); transition: transform .5s; }
@keyframes breathe { 50% { transform: scale(1.02); } }
.np-title { font-size: clamp(22px, 3.4vw, 38px); font-weight: 800; letter-spacing: -1px; }
.np-artist { color: var(--muted); font-size: 17px; font-weight: 600; margin-top: 4px; }
.player.over-np { z-index: 45; background: linear-gradient(140deg, rgba(255,255,255,.13), rgba(255,255,255,.04)); }

/* testo sincronizzato */
.np-lyrics { display: none; flex: 1; max-width: 640px; height: 100%; max-height: 680px; overflow-y: auto; padding: 30vh 10px; text-align: left; scrollbar-width: none;
  -webkit-mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.np-lyrics::-webkit-scrollbar { display: none; }
body.show-lyrics .np-lyrics { display: block; }
body.show-lyrics .np-art { width: min(44vh, 32vw); height: min(44vh, 32vw); }
.np-lyrics p { margin: 0 0 18px; font-size: clamp(20px, 2.3vw, 32px); font-weight: 800; letter-spacing: -.5px; line-height: 1.25; color: rgba(255,255,255,.32); cursor: pointer; transition: color .3s, transform .3s var(--ease); transform-origin: left; }
.np-lyrics p:hover { color: rgba(255,255,255,.65); }
.np-lyrics p.cur { color: #fff; transform: scale(1.03); text-shadow: 0 0 30px rgba(255,255,255,.3); }
.lyr-msg { color: var(--muted); font-size: 18px; font-weight: 600; text-align: center; }
.lyr-plain { white-space: pre-line; font-size: 20px; font-weight: 650; line-height: 1.6; color: rgba(255,255,255,.85); }

/* ---------- Download e offline ---------- */
.dl { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; flex: none; font-size: 10px; font-weight: 800; }
.dl .i { width: 10px; height: 10px; stroke-width: 3; }
.dl.ok { background: var(--ok); color: #062016; }
.dl.err { background: var(--err); color: #fff; }
.dl.prog { background: conic-gradient(var(--accent) var(--p, 0%), rgba(255,255,255,.18) 0); -webkit-mask: radial-gradient(circle, transparent 3.5px, #000 4px); mask: radial-gradient(circle, transparent 3.5px, #000 4px); }
.dl.prog.paused { opacity: .55; }
.dl-row { grid-template-columns: 22px 1fr auto; cursor: default; }
.dl-row .dl { width: 18px; height: 18px; }
.offline-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px; font-size: 13px; font-weight: 700; background: rgba(255,180,76,.2); border-bottom: 1px solid rgba(255,180,76,.35); border-radius: var(--radius) var(--radius) 0 0; }
.offline-bar .i { width: 16px; height: 16px; }
body.offline .view { padding-top: 58px; }

/* ---------- Pannelli, avvisi ---------- */
.panel { padding: 18px 20px; border-radius: 20px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); max-width: 820px; color: var(--muted); }
.panel b { color: var(--text); }
.panel a:not(.btn-ghost):not(.btn) { text-decoration: underline; }
.panel.warn { background: rgba(255,180,76,.1); border-color: rgba(255,180,76,.3); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--text); }
.panel.warn > .i { color: var(--warn); }
.panel.warn > span { flex: 1 1 220px; }

.menu { position: fixed; z-index: 60; min-width: 230px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); overflow-y: auto; padding: 6px; border-radius: 16px; background: rgba(26,22,44,.82); animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.menu button:hover { background: rgba(255,255,255,.09); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
.menu .menu-label { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 30px); transform: translateX(-50%); z-index: 70; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; background: #fff; color: #140d2e; box-shadow: 0 16px 40px -12px rgba(0,0,0,.7); animation: pop .22s ease-out; }
.notice { position: fixed; top: calc(var(--tb-h) + 16px); left: 50%; transform: translateX(-50%); z-index: 70; width: min(580px, calc(100% - 32px)); display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 14px 16px; border-radius: 18px; font-size: 14px; background: rgba(60,44,20,.82); border-color: rgba(255,180,76,.35); animation: pop .25s ease-out; }
.notice > .i { color: var(--warn); margin-top: 1px; }
.notice span { flex: 1; }

/* ---------- Impostazioni ---------- */
.page-head { margin-bottom: 26px; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1100px; }
.set-card { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.set-card.span-2 { grid-column: 1 / -1; }
.set-head { display: flex; align-items: flex-start; gap: 14px; }
.set-head h3 { margin: 0; font-size: 17px; }
.set-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.set-head > div:nth-child(2) { flex: 1; min-width: 0; }
.set-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; background: var(--g, linear-gradient(135deg, #5b3cff, #b7a4ff)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 22px -10px rgba(0,0,0,.8); }
.set-ico .i { width: 22px; height: 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: rgba(61,220,151,.14); color: var(--ok); }
.pill.warn { background: rgba(255,180,76,.14); color: var(--warn); }
.pill.busy::before { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; font-weight: 600; color: var(--faint); }
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > .i { color: var(--muted); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; font-weight: 700; font-size: 14px; }
.list-row .grow small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }
.list-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.list-row { transition: background .15s; }
a.list-row:hover { background: var(--surface-2); }
a.list-row > .i:last-child { color: var(--faint); width: 18px; height: 18px; }
.list-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions .msg { color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input { height: 44px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--stroke); background: rgba(0,0,0,.18); outline: 0; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: var(--faint); }
.field input:focus { border-color: rgba(183,164,255,.7); box-shadow: 0 0 0 3px rgba(123,92,255,.2); }
.copy { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 13px; background: rgba(0,0,0,.22); border: 1px solid var(--line); min-width: 0; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--text); }
.toggle { position: relative; width: 46px; height: 26px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.16); transition: background .2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .25s var(--ease); }
.toggle input:checked + span { background: linear-gradient(135deg, var(--accent-strong), var(--c2)); }
.toggle input:checked + span::after { transform: translateX(20px); }
.meter { height: 8px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent-strong), var(--c2)); min-width: 4px; }
.meter-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: -8px; }
.src-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 12px currentColor; background: currentColor; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--text); }
.steps b { color: var(--text); }
.hint { margin: 0; font-size: 13px; color: var(--faint); }
.hint b { color: var(--muted); }
.hint.version { margin-top: 20px; text-align: center; }
/* finestra per scrivere un nome */
.dialog-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(4,4,10,.55); animation: pop .15s ease-out; }
.dialog { width: min(420px, 100%); padding: 22px; border-radius: 22px; display: grid; gap: 16px; background: rgba(28,24,46,.94); }
.dialog h3 { margin: 0; font-size: 18px; }
.dialog-input { height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--stroke); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 16px; outline: 0; }
.dialog-input:focus { border-color: rgba(183,164,255,.7); box-shadow: 0 0 0 3px rgba(123,92,255,.2); }
.dialog .actions { justify-content: flex-end; }
.new-pl { text-align: left; font: inherit; color: inherit; }
.new-art { background: transparent; border: 2px dashed var(--stroke); color: var(--muted); box-shadow: none; }
.manual summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--muted); list-style: none; }
.manual summary::before { content: "+ "; }
.manual[open] summary { margin-bottom: 12px; }
.manual[open] summary::before { content: "– "; }
.manual { display: grid; gap: 12px; }
.qr-wrap { display: flex; gap: 24px; align-items: flex-start; }
.qr { flex: none; width: 200px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px -18px rgba(0,0,0,.8); }
.qr svg { display: block; width: 100%; height: auto; }
.qr-side { flex: 1; min-width: 0; display: grid; gap: 14px; }
.set-card a.ext { color: var(--accent); font-weight: 700; }
.set-card a.ext:hover { text-decoration: underline; }

/* ---------- Telefono ---------- */
@media (max-width: 980px) {
  .set-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  :root { --player-h: 64px; --nav-h: 60px; --radius: 22px; --safe-b: env(safe-area-inset-bottom, 0px); }
  .blob { opacity: .36; }
  .grain { display: none; }
  /* barra in basso e mini player sono quasi opachi: il vetro sfocato lì costava molto mentre la lista scorre */
  .sidebar, .player { -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* contenuto a tutto schermo: niente riquadri dentro riquadri */
  .shell { inset: var(--tb-h) 0 0 0; grid-template-columns: 1fr; gap: 0; }
  .main { background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .main::before { display: none; }
  .view { padding: 18px 16px calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 28px); }
  .offline-bar { border-radius: 0; }

  /* barra di navigazione in fondo, piatta */
  .sidebar { position: fixed; inset: auto 0 0 0; height: calc(var(--nav-h) + var(--safe-b)); padding: 0 0 var(--safe-b); z-index: 21;
    flex-direction: row; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: rgba(10,9,20,.86); }
  .sidebar::before { display: none; }
  .sidebar .logo, .side-sec, .download-btn, .nav-group.extra, .side-me { display: none !important; }
  .nav-group { flex-direction: row; width: 100%; height: 100%; }
  .nav { flex: 1; flex-direction: column; justify-content: center; gap: 4px; padding: 0; font-size: 11px; border-radius: 0; background: none !important; box-shadow: none !important; }
  .nav.active { color: #fff; }
  .nav.active::before { display: none; }

  /* mini player: una riga, la barra del brano è un filo sul bordo */
  .player { left: 8px; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 6px); height: var(--player-h); padding: 0 6px 0 9px;
    border-radius: 14px; grid-template-columns: 1fr auto; gap: 8px; overflow: hidden; background: rgba(36,29,64,.97); }
  .p-left { gap: 10px; }
  .p-art { width: 46px; height: 46px; border-radius: 9px; }
  .p-title { font-size: 14px; }
  .p-center { display: contents; }
  .p-controls { gap: 0; }
  #pShuffle, #pRepeat, #pPrev, #pNext, .p-right { display: none; }
  .p-controls .play-btn { width: 42px; height: 42px; background: none; box-shadow: none; color: #fff; }
  .p-progress { position: absolute; left: 9px; right: 9px; bottom: 0; gap: 0; height: 2px; }
  .p-progress span { display: none; }
  #pSeek { height: 2px; pointer-events: none; }
  #pSeek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.18) var(--p, 0%)); }
  #pSeek::-webkit-slider-thumb { display: none; }
  body.idle .player { display: none; }
  body.idle .view { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }

  /* schermo intero: copertina, titolo e tutti i comandi in basso */
  .np { padding: calc(var(--tb-h) + 12px) 22px calc(var(--safe-b) + 210px); }
  .np-inner { flex-direction: column; gap: 18px; }
  .np-art { width: min(82vw, 44vh); height: min(82vw, 44vh); border-radius: 18px; margin-bottom: 22px; }
  .np-title { font-size: 22px; }
  .np-artist { font-size: 15px; }
  body.show-lyrics .np-main { display: none; }
  .np-lyrics { width: 100%; max-height: none; padding: 18vh 4px; }
  .np-lyrics p { font-size: 24px; }
  .player.over-np { inset: auto 0 0 0; height: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 22px calc(var(--safe-b) + 18px);
    border: 0; border-radius: 0; box-shadow: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .player.over-np::before, .player.over-np .p-left { display: none; }
  .player.over-np .p-center { display: flex; flex-direction: column-reverse; gap: 14px; width: 100%; }
  .player.over-np .p-progress { position: static; height: auto; gap: 10px; }
  .player.over-np .p-progress span { display: block; }
  .player.over-np #pSeek { height: 16px; pointer-events: auto; }
  .player.over-np #pSeek::-webkit-slider-runnable-track { height: 4px; }
  .player.over-np #pSeek::-webkit-slider-thumb { display: block; transform: scale(1); }
  .player.over-np .p-controls { justify-content: space-between; width: 100%; }
  .player.over-np #pShuffle, .player.over-np #pRepeat, .player.over-np #pPrev, .player.over-np #pNext { display: inline-grid; }
  .player.over-np .p-controls .icon-btn { width: 48px; height: 48px; color: var(--text); }
  .player.over-np .p-controls .icon-btn .i { width: 26px; height: 26px; }
  .player.over-np #pShuffle:not(.on), .player.over-np #pRepeat:not(.on) { color: var(--muted); }
  .player.over-np .play-btn { width: 68px; height: 68px; background: radial-gradient(circle at 30% 25%, #fff, #ece7ff 45%, #c3b3ff); color: #140d2e; }
  .player.over-np .play-btn .i { width: 28px; height: 28px; }
  .player.over-np .p-right { display: flex; justify-content: flex-end; width: 100%; }
  .player.over-np #pLyrics, .player.over-np .vol, .player.over-np #pExpand { display: none; }
  .queue { inset: var(--tb-h) 0 0 0; width: auto; border-radius: 0; z-index: 46; padding-bottom: var(--safe-b); }

  /* testi e intestazioni */
  h1 { font-size: 26px; letter-spacing: -.8px; }
  .greet { margin-bottom: 18px; }
  h2 { font-size: 19px; margin: 28px 0 12px; }
  .search-box { height: 48px; margin-bottom: 20px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .genre { height: 96px; font-size: 17px; }

  /* copertine: griglia a due colonne, oppure carosello che scorre di lato */
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .row.scroll { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; scrollbar-width: none; }
  .row.scroll::-webkit-scrollbar { display: none; }
  .row.scroll > * { scroll-snap-align: start; }
  .card, .card:hover { padding: 0; background: none; border: 0; transform: none; }
  .card-art { margin-bottom: 8px; border-radius: 12px; }
  .card .fab { display: none; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 12.5px; }

  /* testata di album, playlist, artista: centrata */
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 16px; margin-bottom: 20px; }
  .hero > div:last-child { width: 100%; }
  .hero-art { width: min(56vw, 230px); height: min(56vw, 230px); }
  .hero-art.has-icon { width: 128px; height: 128px; }
  .hero h1 { font-size: 26px; letter-spacing: -.8px; margin: 4px 0 6px; }
  .hero .sub { font-size: 13.5px; margin-bottom: 16px; }
  .hero-actions { justify-content: center; }

  /* elenchi di brani */
  .t-head, .t-num, .t-dur { display: none; }
  .t-row { grid-template-columns: 48px 1fr auto; gap: 12px; padding: 6px 0; }
  .t-row:hover { background: none; }
  .t-row:active { background: var(--surface-2); }
  .thumb { width: 48px; height: 48px; border-radius: 8px; }
  .t-actions > * { opacity: 1; }
  .t-actions .like-btn:not(.liked) { display: none; }

  .toast { bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 18px); }
  .set-card { padding: 18px; }
  .set-head { flex-wrap: wrap; }
  .set-head > div:nth-child(2) { flex: 1 1 calc(100% - 58px); }
  .set-head > .pill { margin-left: 58px; }
  .mobile-only { display: flex !important; }
  .qr-wrap { flex-direction: column; }
}

/* schermi touch: niente effetti "al passaggio del mouse", che resterebbero attaccati dopo il tocco */
@media (hover: none) {
  .icon-btn:hover, .nav:hover, .side-item:hover, .chip:hover, .btn-ghost:hover, a.list-row:hover, .round-btn:hover { background: none; }
  .chip.active:hover { background: #fff; }
  a.t-artist:hover, .p-artist:hover, .hero .sub a:hover, .h-link a:hover { text-decoration: none; color: inherit; }
  .card:hover, .genre:hover { transform: none; }
}

/* ---------- Schermata di caricamento ---------- */
.splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(900px 600px at 50% 110%, #1a1433, var(--bg));
  -webkit-app-region: drag;   /* nell'app Windows la finestra si sposta anche durante il caricamento */
  transition: opacity .45s var(--ease), visibility .45s;
  /* paracadute: se qualcosa va storto non resta mai sopra l'app */
  animation: splashAuto .4s 8s forwards;
}
.splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash.out .splash-logo { transform: scale(1.08); }
.splash-glow {
  position: absolute; left: 50%; top: 50%; width: 420px; height: 420px; margin: -250px 0 0 -210px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c1));
  filter: blur(90px); opacity: .35; animation: splashSpin 9s linear infinite;
}
.splash-logo {
  position: relative; width: 96px; height: 96px; border-radius: 26px;
  box-shadow: 0 24px 60px -18px rgba(143, 116, 255, .75);
  animation: splashIn .7s var(--ease) both, breathe 2.4s ease-in-out .7s infinite;
  transition: transform .45s var(--ease);
}
.splash-name { position: relative; font-size: 26px; font-weight: 800; letter-spacing: -.02em; animation: splashIn .7s .12s var(--ease) both; }
.splash-bar { position: relative; width: 140px; height: 4px; border-radius: 4px; overflow: hidden; background: var(--surface-2); animation: splashIn .7s .24s var(--ease) both; }
.splash-bar i { position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); animation: splashBar 1.2s ease-in-out infinite; }
@keyframes splashIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes splashBar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes splashSpin { to { transform: rotate(1turn); } }
@keyframes splashAuto { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ---------- Animazioni e transizioni ---------- */
:root { --spring: cubic-bezier(.32, 1.25, .5, 1); --out: cubic-bezier(.4, 0, .9, .5); }

/* le pagine entrano a cascata: prima il titolo, poi le sezioni, poi le righe */
.view-enter { animation: none; }
.view-enter > * { animation: enter .5s var(--ease) both; }
.view-enter > :nth-child(2) { animation-delay: .04s; }
.view-enter > :nth-child(3) { animation-delay: .08s; }
.view-enter > :nth-child(4) { animation-delay: .12s; }
.view-enter > :nth-child(5) { animation-delay: .16s; }
.view-enter > :nth-child(n+6) { animation-delay: .2s; }
.view-enter .tracks > .t-row:nth-child(-n+14), .view-enter .row > *:nth-child(-n+10) { animation: enter .45s var(--ease) both; }
.view-enter .tracks > .t-row:nth-child(2), .view-enter .row > *:nth-child(2) { animation-delay: 0.110s; }
.view-enter .tracks > .t-row:nth-child(3), .view-enter .row > *:nth-child(3) { animation-delay: 0.135s; }
.view-enter .tracks > .t-row:nth-child(4), .view-enter .row > *:nth-child(4) { animation-delay: 0.160s; }
.view-enter .tracks > .t-row:nth-child(5), .view-enter .row > *:nth-child(5) { animation-delay: 0.185s; }
.view-enter .tracks > .t-row:nth-child(6), .view-enter .row > *:nth-child(6) { animation-delay: 0.210s; }
.view-enter .tracks > .t-row:nth-child(7), .view-enter .row > *:nth-child(7) { animation-delay: 0.235s; }
.view-enter .tracks > .t-row:nth-child(8), .view-enter .row > *:nth-child(8) { animation-delay: 0.260s; }
.view-enter .tracks > .t-row:nth-child(9), .view-enter .row > *:nth-child(9) { animation-delay: 0.285s; }
.view-enter .tracks > .t-row:nth-child(10), .view-enter .row > *:nth-child(10) { animation-delay: 0.310s; }
.view-enter .tracks > .t-row:nth-child(11), .view-enter .row > *:nth-child(11) { animation-delay: 0.335s; }
.view-enter .tracks > .t-row:nth-child(12), .view-enter .row > *:nth-child(12) { animation-delay: 0.360s; }
.view-enter .tracks > .t-row:nth-child(13), .view-enter .row > *:nth-child(13) { animation-delay: 0.385s; }
.view-enter .tracks > .t-row:nth-child(14), .view-enter .row > *:nth-child(14) { animation-delay: 0.410s; }

/* tocco: tutto risponde con una leggera pressione */
.card:active { transform: scale(.97); transition-duration: .1s; }
.t-row:active { transform: scale(.992); }
.t-row { transition: background .15s, transform .2s var(--ease); }
.nav:active, .side-item:active, .chip:active, .list-row:active { transform: scale(.96); transition: transform .1s; }
.nav, .side-item, .chip, .list-row { transition: background .2s, color .2s, transform .25s var(--spring); }

/* cuore che pulsa quando metti mi piace */
.pop svg { animation: heartPop .45s var(--spring); }
@keyframes heartPop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* cambio brano: copertina e titoli entrano morbidi */
.swap .p-art { animation: artSwap .55s var(--ease); }
.swap .np-art { animation: artSwap .55s var(--ease), breathe 6s ease-in-out .55s infinite; }
.swap .np-title, .swap .np-artist, .swap .p-meta { animation: textSwap .45s var(--ease) both; }
.swap .np-artist { animation-delay: .05s; }
@keyframes artSwap { from { opacity: .3; transform: scale(.94); } }
@keyframes textSwap { from { opacity: 0; transform: translateY(6px); } }

/* player a schermo intero: entra con una molla e esce scivolando */
.np { animation: npIn .55s var(--spring); will-change: transform, opacity; }
.np.dragging { animation: none; transition: none; }
.np:not(.dragging) { transition: transform .35s var(--ease); }
.np.leaving { animation: npOut .32s var(--out) forwards; pointer-events: none; }
@keyframes npIn { from { opacity: 0; transform: translateY(40px) scale(.98); } }
@keyframes npOut { from { transform: translateY(var(--from, 0px)); } to { opacity: 0; transform: translateY(calc(var(--from, 0px) + 60px)) scale(.98); } }
@media (max-width: 820px) {
  @keyframes npIn { from { transform: translateY(100%); } }
  @keyframes npOut { from { transform: translateY(var(--from, 0px)); } to { transform: translateY(100%); } }
  .np.leaving { animation-duration: .38s; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
}

/* coda, toast e menu: anche l'uscita è animata */
.queue { animation: slideIn .4s var(--spring); }
.queue.leaving { animation: slideOut .25s var(--out) forwards; }
@keyframes slideOut { to { transform: translateX(30px); opacity: 0; } }
.toast { animation: toastIn .35s var(--spring); }
.toast.leaving { animation: toastOut .25s var(--out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 8px) scale(.97); } }
.menu { animation: menuIn .2s var(--spring); transform-origin: top left; }
@keyframes menuIn { from { opacity: 0; transform: scale(.92) translateY(-4px); } }
.dialog-back > * { animation: dialogIn .35s var(--spring); }
@keyframes dialogIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }

/* le copertine compaiono sfumando invece di apparire di colpo */
.art-box > img { transition: opacity .45s var(--ease), transform .45s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
button:disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ---------- Account ---------- */
.acc-form { display: grid; gap: 14px; max-width: 460px; }
.acc-form .actions { margin-top: 2px; }
.set-card .msg { display: block; color: var(--muted); font-size: 13.5px; margin-top: 8px; animation: enter .3s var(--ease); }
.set-card .msg:empty { display: none; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(0,0,0,.2); border: 1px solid var(--line); justify-self: start; }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background .25s var(--ease), color .2s; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ---------- Accesso (schermata come Spotify) ---------- */
body.locked > :not(.auth):not(.splash):not(.bg):not(svg):not(audio):not(.toast) { display: none !important; }
.auth { position: fixed; inset: 0; z-index: 80; overflow-y: auto; display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px); }
.auth-bg { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(70vmax 60vmax at 15% 0%, rgba(123,92,255,.55), transparent 60%), radial-gradient(60vmax 60vmax at 100% 100%, rgba(255,79,163,.4), transparent 60%); }
.auth-card { position: relative; width: min(440px, 100%); display: flex; flex-direction: column; gap: 18px; animation: authIn .5s var(--ease) both; }
@keyframes authIn { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 28px)); } }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: clamp(34px, 9vw, 46px); line-height: 1.05; letter-spacing: -1.4px; margin: 18px 0 12px; }
.auth-card h2 { font-size: 28px; letter-spacing: -.7px; margin: 4px 0 0; }
.auth-hero { text-align: center; }
.auth-hero p { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0 auto; max-width: 360px; }
.auth-hero.small h2 { margin: 16px 0 10px; }
.auth-logo { filter: drop-shadow(0 18px 40px rgba(123,92,255,.6)); animation: breathe 4s ease-in-out infinite; }
.auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.auth-big { height: 52px; font-size: 16px; width: 100%; }
.auth-sub { color: var(--muted); margin: -6px 0 4px; }
.auth-fine { color: var(--faint); font-size: 12.5px; line-height: 1.5; margin: 0; }
.auth-back { align-self: flex-start; }
.auth-progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.auth-progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width .5s var(--ease); }
.auth-stepno { color: var(--faint); font-size: 12px; font-weight: 700; margin-top: -10px; }
.auth-input { position: relative; display: flex; }
.auth-input input { flex: 1; height: 52px; font-size: 16px; padding-right: 48px; }
.auth-input .auth-eye { position: absolute; right: 6px; top: 7px; }
.auth-eye.on { color: var(--accent); }
.auth-rules { list-style: none; margin: -4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--faint); }
.auth-rules li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.auth-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; transition: background .2s, border-color .2s; }
.auth-rules li.ok { color: var(--ok); }
.auth-rules li.ok::before { background: var(--ok); border-color: var(--ok); }
.auth-link { background: none; border: 0; color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; align-self: center; }
.auth-link.inline { padding: 0; font: inherit; font-weight: 800; }
.auth-switch { text-align: center; color: var(--muted); margin: 6px 0 0; }
.auth-err { color: var(--err); font-weight: 650; min-height: 1.2em; margin: -4px 0 0; text-align: center; }
.auth-err.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-mail { width: 76px; height: 76px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 20px 50px -14px rgba(123,92,255,.8); color: #fff; }
.auth-mail svg { width: 34px; height: 34px; }

/* ---------- Profilo ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-head h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 22px -8px rgba(123,92,255,.8), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .2s var(--spring); }
.avatar:active { transform: scale(.92); }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.big { width: 76px; height: 76px; font-size: 32px; }
.home-head .avatar { margin-bottom: 26px; }
.profile { display: flex; align-items: center; gap: 18px; }
.profile h2 { margin: 2px 0; font-size: 26px; }
.profile .sub { margin: 0; }
.profile .grow { flex: 1; min-width: 0; }
.side-me { display: flex; align-items: center; gap: 12px; padding: 8px; margin-top: 8px; border-radius: 14px; color: var(--muted); transition: background .2s; }
.side-me:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 820px) {
  .home-head .avatar { margin-bottom: 18px; }
  .profile { flex-wrap: wrap; }
}

/* ---------- Prestazioni ---------- */
/* le righe e le card fuori dallo schermo non vengono disegnate finché non ci arrivi */
.tracks > .t-row { content-visibility: auto; contain-intrinsic-size: auto 58px; }
.list-row { content-visibility: auto; contain-intrinsic-size: auto 72px; }

/* ---------- Preferenze ---------- */
.prefs-grid { margin-top: 16px; }
.pref-list { display: flex; flex-direction: column; }
.pref-row { display: flex; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pref-list > :first-child { border-top: 0; padding-top: 2px; }
.pref-row.col { flex-direction: column; align-items: stretch; gap: 10px; cursor: default; }
.pref-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pref-txt b { font-size: 14.5px; font-weight: 700; }
.pref-txt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.pref-select { flex: none; max-width: 55%; height: 38px; padding: 0 34px 0 12px; border-radius: 12px; border: 1px solid var(--stroke); color: var(--text);
  background: rgba(0,0,0,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  -webkit-appearance: none; appearance: none; font-weight: 650; font-size: 13.5px; cursor: pointer; }
.pref-select option { background: #1b1630; color: #fff; }
.seg.wrap { flex-wrap: wrap; border-radius: 16px; }
.pref-range { width: 100%; }
.eq { display: grid; gap: 4px; padding: 4px 0 8px; }
.eq-band { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: 12px; padding: 6px 0; }
.eq-band small { color: var(--muted); font-size: 12px; font-weight: 700; }
.eq-band b { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.eq-band input::-webkit-slider-thumb { transform: scale(1); }
.seg.wrap button { padding: 0 13px; }

/* ---------- Player a schermo intero: strumenti ---------- */
.np-tools { display: flex; align-items: center; gap: 8px; }
.round-btn.on { background: linear-gradient(135deg, var(--accent-strong), var(--c2)); border-color: transparent; }
.sleep-lbl { font-variant-numeric: tabular-nums; }

/* ---------- Radio e DJ ---------- */
.dj-art { background: linear-gradient(135deg, #7b5cff, #ff4fa3 60%, #ffb44c); color: #fff; }
.dj-box { max-width: 720px; padding-right: 6px; }
.dj-box input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.dj-box .btn { height: 42px; }
.dj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 8px; }
.dj-head h2 { margin: 0; }
.dj-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 0 0 26px; border-radius: 20px; max-width: 720px;
  background: linear-gradient(135deg, rgba(123,92,255,.35), rgba(255,79,163,.22)); border: 1px solid var(--stroke); }
.dj-banner > svg:first-child { width: 30px; height: 30px; color: #fff; }
.dj-banner div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.dj-banner small { color: var(--muted); }
.q-radio { display: flex; align-items: center; gap: 10px; margin: 6px 8px 2px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(123,92,255,.3), rgba(255,79,163,.18)); font-weight: 700; font-size: 13.5px; }
.q-radio span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-radio small { color: var(--muted); font-weight: 600; }

/* ---------- Home: scorciatoie ---------- */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 30px; }
.qtile { display: flex; align-items: center; gap: 12px; min-width: 0; height: 62px; padding-right: 12px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .2s, transform .2s var(--spring); }
.qtile:hover { background: var(--surface-3); }
.qtile:active { transform: scale(.97); }
.qart { width: 62px; height: 62px; flex: none; }
.qart.has-icon { display: grid; place-items: center; }
.qart.has-icon svg { width: 26px; height: 26px; color: #fff; }
.qtile b { font-size: 13.5px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.radio-art { background: linear-gradient(135deg, #ff6b3d, #ffb44c); }
.dl-art { background: linear-gradient(135deg, #0f9b74, #46e3a5); }
.home-edit { margin-top: 30px; text-align: center; }
.home-edit a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 650; }
.home-edit svg { width: 16px; height: 16px; }
.h-link { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h-link a { font-size: 13px; color: var(--muted); font-weight: 700; }
.chip svg { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.s-filters { margin: -12px 0 22px; }
@media (max-width: 820px) {
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
  .qtile { height: 56px; } .qart { width: 56px; height: 56px; }
}

/* ---------- Libreria ---------- */
.lib-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 18px; }
.lib-tools .chips { margin: 0; }
.lib-right { display: flex; align-items: center; gap: 6px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.card.pinned .card-title svg { width: 14px; height: 14px; color: var(--accent); margin-right: 5px; vertical-align: -2px; }
.card .card-art.has-icon { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; }
.card .card-art.has-icon svg { width: 40%; height: 40%; color: #fff; }
.lib-list { display: flex; flex-direction: column; gap: 2px; }
.lib-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; }
.lib-row:hover { background: var(--surface); }
.lib-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.lib-art { width: 56px; height: 56px; border-radius: 10px; flex: none; }
.lib-art.has-icon { display: grid; place-items: center; } .lib-art.has-icon svg { width: 24px; height: 24px; color: #fff; }
.lib-link .grow { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lib-link b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-link small { color: var(--muted); font-size: 13px; }
.icon-btn.on { color: var(--accent); }
@media (max-width: 820px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Coda ---------- */
#qList .t-row { grid-template-columns: 42px 1fr auto auto; }
.q-label-row { display: flex; align-items: center; justify-content: space-between; padding-right: 8px; }
.btn-ghost.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.q-rm { opacity: .6; }
.q-grip { display: grid; place-items: center; width: 30px; height: 38px; color: var(--faint); cursor: grab; touch-action: none; }
.t-row.dragging { position: relative; z-index: 5; background: var(--surface-3); box-shadow: 0 12px 30px -10px rgba(0,0,0,.7); transition: none; }
.t-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.t-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Primo accesso ---------- */
.onb { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.onb .sub { margin: 4px 0 16px; }
.onb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.onb-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .2s, transform .2s var(--spring); }
.onb-chip.on { background: linear-gradient(135deg, var(--accent-strong), var(--c2)); border-color: transparent; color: #fff; }
.onb-chip svg { width: 15px; height: 15px; }
.onb-chip:active { transform: scale(.94); }

/* ---------- Wrapped ---------- */
.wr-art { background: linear-gradient(135deg, #22d3ee, #7b5cff 55%, #ff4fa3); color: #fff; }
#wrP { margin: 0 0 22px; }
.wr-cards { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.wr-card { padding: 18px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wr-card.big { background: linear-gradient(135deg, rgba(123,92,255,.45), rgba(255,79,163,.3)); }
.wr-card small { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.wr-card b { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.wr-card b.sm { font-size: 22px; letter-spacing: -.4px; }
.wr-card span { color: var(--muted); font-size: 13px; }
.wr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.wr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wr-list li { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; }
.wr-list li[data-wrplay] { cursor: pointer; } .wr-list li[data-wrplay]:hover { background: var(--surface); }
.wr-list .n { width: 22px; text-align: right; color: var(--faint); font-weight: 800; }
.wr-list .thumb { width: 44px; height: 44px; border-radius: 8px; }
.wr-list .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wr-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-list small { color: var(--muted); font-size: 12.5px; }
.wr-bars { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.wr-bar { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 12px; font-weight: 700; font-size: 13.5px; }
.wr-bar i { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-strong), var(--c2)); }
.wr-bar small { color: var(--muted); text-align: right; }
.wr-hours { display: flex; align-items: flex-end; gap: 4px; height: 120px; max-width: 640px; padding: 8px 0; }
.wr-hours i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--surface-3); }
.wr-hours i.peak { background: linear-gradient(180deg, var(--c2), var(--accent-strong)); }
.wr-hlab { display: flex; justify-content: space-between; max-width: 640px; color: var(--faint); font-size: 11.5px; font-weight: 700; }
.wr-actions { margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .wr-cards { grid-template-columns: 1fr 1fr; }
  .wr-card.big, .wr-card.persona { grid-column: span 2; }
  .wr-cols { grid-template-columns: 1fr; gap: 6px; }
  .wr-bar { grid-template-columns: 96px 1fr 40px; }
}

/* ---------- Testi: karaoke, grandezza, traduzione ---------- */
.lyr-tools { display: none; position: relative; z-index: 2; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
body.show-lyrics .lyr-tools { display: flex; }
.lyr-tools .seg { background: rgba(0,0,0,.25); }
.lyr-tools .chip { background: rgba(255,255,255,.1); }
.lyr-tools .chip.busy { animation: blink 1s infinite; }
.np-lyrics .lo { transition: color .3s; }
.np-lyrics .tr { display: block; margin-top: 4px; font-size: .58em; font-weight: 650; letter-spacing: 0; color: rgba(255,255,255,.5); }
.np-lyrics p.cur .tr { color: rgba(255,255,255,.8); }
/* karaoke: la riga cantata si riempie di bianco da sinistra a destra */
.np-lyrics.mode-karaoke p.cur .lo { color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #fff var(--k, 0%), rgba(255,255,255,.38) var(--k, 0%)); }
.np-lyrics.mode-full p { color: rgba(255,255,255,.85); cursor: default; }
.np-lyrics.mode-full p.cur { transform: none; text-shadow: none; }
.np-lyrics.size-s p { font-size: clamp(17px, 1.8vw, 24px); }
.np-lyrics.size-l p { font-size: clamp(26px, 3vw, 40px); }
.lyr-plain > div { margin-bottom: 4px; }
@media (max-width: 820px) {
  .np-lyrics.size-s p { font-size: 19px; } .np-lyrics.size-l p { font-size: 30px; }
  .lyr-tools { margin-top: 8px; gap: 6px; }
  .lyr-tools .seg button { padding: 0 11px; font-size: 12.5px; }
}
@media (max-width: 820px) { .np-lyrics p.cur { transform: none; } .np-lyrics { padding-right: 14px; } }

/* ---------- Import e condivisione ---------- */
.imp-art { background: linear-gradient(135deg, #1db954, #22d3ee); color: #fff; }
.imp-text { width: 100%; min-height: 160px; padding: 14px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(0,0,0,.2); color: var(--text); font: inherit; font-size: 14px; resize: vertical; outline: 0; }
.imp-text:focus { border-color: rgba(183,164,255,.7); }
.imp-list { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; max-height: 420px; overflow-y: auto; }
.imp-row { display: grid; grid-template-columns: 20px 1fr; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.imp-row svg { width: 16px; height: 16px; } .imp-row.ok svg { color: var(--ok); } .imp-row.no { opacity: .6; } .imp-row.no svg { color: var(--err); }
.imp-row small { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.imp-done { margin: 18px 0 6px; }
.meter { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--c2)); transition: width .3s; }
label.btn-ghost { cursor: pointer; }

/* ---------- Jam e amici ---------- */
.jam-art { background: linear-gradient(135deg, #ff6b3d, #ff4fa3 55%, #7b5cff); color: #fff; }
.fr-art { background: linear-gradient(135deg, #1c8de0, #5fd0ff); color: #fff; }
.jam-pill { position: fixed; right: 16px; bottom: calc(var(--player-h) + 26px); z-index: 30; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 999px; background: linear-gradient(135deg, #ff6b3d, #ff4fa3); color: #fff; font-weight: 800; font-size: 13.5px; box-shadow: 0 12px 30px -10px rgba(255,79,163,.8); animation: toastIn .4s var(--spring); }
.jam-pill svg { width: 18px; height: 18px; }
@media (max-width: 820px) { .jam-pill { bottom: calc(var(--nav-h) + var(--player-h) + var(--safe-b) + 18px); right: 12px; } }
.jam-remote { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 28px 0 10px; }
.jam-remote .play-btn { width: 72px; height: 72px; }
.jam-mem, .fr-list { display: flex; flex-direction: column; gap: 6px; }
.jam-m, .fr-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: var(--surface); }
.jam-m b, .fr-row b { font-weight: 750; }
.jam-m small { color: var(--muted); margin-left: auto; font-size: 12.5px; }
.fr-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-row small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar img, img.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
img.avatar { width: 40px; height: 40px; flex: none; }
.avatar { overflow: hidden; }
button.avatar.big { position: relative; cursor: pointer; border: 0; }
.avatar .cam { position: absolute; inset: auto 0 0 0; height: 30%; display: grid; place-items: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.avatar .cam svg { width: 16px; height: 16px; }
button.avatar.big:hover .cam, button.avatar.big:focus-visible .cam { opacity: 1; }
@media (hover: none) { .avatar .cam { opacity: 1; } }

/* ---------- Modalità ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 16px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .2s, transform .2s var(--spring), border-color .2s; }
.mode-card svg { width: 22px; height: 22px; color: var(--accent); }
.mode-card b { font-size: 15px; } .mode-card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.mode-card.on { background: linear-gradient(135deg, rgba(123,92,255,.4), rgba(255,79,163,.25)); border-color: rgba(255,255,255,.25); }
.mode-card.on svg { color: #fff; }
.mode-card:active { transform: scale(.97); }
.mode-chip { margin-left: auto; margin-right: 10px; align-self: flex-start; display: inline-flex; align-items: center; }
.home-head .mode-chip { margin-top: 4px; }
@media (max-width: 820px) { .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mode-chip { padding: 7px 12px; font-size: 12.5px; } }

/* Auto */
.car { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; gap: 18px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
  background: radial-gradient(80vmax 60vmax at 20% 0%, color-mix(in srgb, var(--c1) 55%, transparent), transparent 70%), #05050b; color: #fff; }
.car-top { display: flex; align-items: center; justify-content: space-between; }
.car-clock { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.car-main { flex: 1; min-height: 0; display: flex; align-items: center; gap: 28px; }
.car-art { width: min(42vh, 40vw); aspect-ratio: 1; border-radius: 24px; flex: none; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.car-meta { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.car-meta b { font-size: clamp(28px, 5vw, 56px); line-height: 1.05; letter-spacing: -1px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.car-meta span { font-size: clamp(20px, 3vw, 30px); color: rgba(255,255,255,.7); }
.car-ctl { display: flex; justify-content: center; gap: 4vw; }
.car-ctl button { width: min(22vw, 140px); height: min(22vw, 140px); border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.car-ctl .car-play { background: #fff; color: #111; }
.car-ctl svg { width: 44%; height: 44%; }
.car-extra { display: flex; justify-content: center; gap: 14px; }
.car-extra button { min-width: 88px; height: 64px; padding: 0 18px; border-radius: 20px; background: rgba(255,255,255,.08); font-size: 20px; font-weight: 800; display: grid; place-items: center; }
.car-extra button svg { width: 28px; height: 28px; } .car-extra .on { color: #ff4fa3; }
.car-ctl button:active, .car-extra button:active { transform: scale(.94); }
@media (orientation: portrait) { .car-main { flex-direction: column; justify-content: center; text-align: center; } .car-art { width: min(70vw, 38vh); } .car-meta { align-items: center; } }

/* Concentrazione */
.focus-pill { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--tb-h) + env(safe-area-inset-top, 0px) + 12px); z-index: 30; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 999px; background: linear-gradient(135deg, #0f9b74, #22d3ee); color: #fff; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; box-shadow: 0 12px 30px -10px rgba(34,211,238,.7); }
.focus-pill.rest { background: linear-gradient(135deg, #ffb44c, #ff6b3d); }
.focus-pill svg { width: 17px; height: 17px; }

/* ---------- Aspetto ---------- */
body.theme-black { --bg: #000; --surface: rgba(255,255,255,.035); --surface-2: rgba(255,255,255,.07); }
body.theme-black .bg { background: #000; } body.theme-black .blob, body.theme-black .grain { display: none; }
body.theme-black .glass { background: rgba(14,14,18,.92); }
body.no-glass .glass { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #15122a; }
body.no-glass.theme-black .glass { background: #0d0d10; }
body.no-glass .glass::before { display: none; }
body.motion-reduced *, body.motion-reduced *::before, body.motion-reduced *::after { animation-duration: .15s !important; animation-delay: 0s !important; transition-duration: .12s !important; }
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation: none !important; transition: none !important; }
body.big-text .view, body.big-text .np-meta, body.big-text .player { zoom: 1.12; }
body.compact .t-row { padding-top: 3px; padding-bottom: 3px; }
body.compact .tracks .thumb { width: 36px; height: 36px; }
body.compact .tracks > .t-row { contain-intrinsic-size: auto 46px; }
.car-extra button { flex: 1; min-width: 0; max-width: 130px; padding: 0 8px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; font-weight: 700; margin: 4px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-prov { box-shadow: none; }

/* =====================================================================
   Ritocchi grafici: menu e fogli, intestazioni, impostazioni, testi
   ===================================================================== */
body { text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
h1 { letter-spacing: -1.3px; }
h2 { font-size: 20px; letter-spacing: -.45px; margin: 34px 0 14px; }
.sub, .hint { line-height: 1.5; }
.hint { color: var(--muted); font-size: 13px; }
.t-title { font-weight: 700; letter-spacing: -.1px; }
.t-artist { font-size: 13px; }
.chip { height: 34px; display: inline-flex; align-items: center; padding: 0 15px; }
.chip.active { background: #fff; color: #120d24; border-color: #fff; }
.toast, .notice { z-index: 96; }

/* ---------- Menu (computer) e fogli (telefono) ---------- */
.menu-wrap { position: fixed; inset: 0; z-index: 88; }
.menu.pop { position: fixed; width: 300px; min-width: 0; max-height: min(72vh, 580px); overflow-y: auto; padding: 8px; border-radius: 20px;
  background: rgba(24,20,42,.94); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px -20px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.12); animation: menuIn .22s var(--spring); }
.sheet-back { position: fixed; inset: 0; z-index: 88; display: flex; align-items: flex-end; background: rgba(4,4,10,.55); animation: fadeIn .2s ease-out; }
.menu.sheet { position: relative; inset: auto; width: 100%; max-width: none; max-height: 84vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 10px calc(env(safe-area-inset-bottom, 0px) + 14px); border-radius: 26px 26px 0 0; background: #1b1631;
  border: 1px solid rgba(255,255,255,.1); border-bottom: 0; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8); animation: sheetIn .34s var(--spring); transition: transform .25s var(--ease); }
.sheet-back.leaving { animation: fadeOut .25s forwards; }
.sheet-back.leaving .menu.sheet { animation: sheetOut .25s var(--out) forwards; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } } @keyframes sheetOut { to { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.22); margin: 8px auto 6px; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-head .grow { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.menu-head b { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head small { color: var(--muted); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-art { width: 48px; height: 48px; border-radius: 10px; flex: none; overflow: hidden; }
.mh-art.round { border-radius: 50%; }
.mh-art.initial { display: grid; place-items: center; font-weight: 800; font-size: 21px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.mh-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu .menu-label { padding: 10px 12px 6px; }
.menu hr { margin: 6px 8px; }
.menu .mi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; font-size: 14.5px; font-weight: 650; color: var(--text); transition: background .15s; }
.menu .mi:hover { background: rgba(255,255,255,.08); }
.menu .mi:active { background: rgba(255,255,255,.12); }
.mi-ic { width: 22px; height: 22px; display: grid; place-items: center; flex: none; color: var(--muted); }
.mi-ic svg { width: 20px; height: 20px; }
.mi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mi-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-t small { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: normal; }
.mi-v { flex: none; color: var(--muted); font-size: 13px; font-weight: 650; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-go { display: grid; place-items: center; flex: none; color: var(--faint); }
.mi-go svg { width: 16px; height: 16px; }
.mi-go.on, .menu .mi.on .mi-ic { color: var(--accent); }
.menu .mi.danger, .menu .mi.danger .mi-ic { color: var(--err); }
.menu .menu-back { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 6px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 15.5px; }
.menu .menu-back svg { width: 20px; height: 20px; }
.menu-body.slide-l { animation: menuSlideL .24s var(--ease); }
.menu-body.slide-r { animation: menuSlideR .24s var(--ease); }
@keyframes menuSlideL { from { opacity: 0; transform: translateX(24px); } }
@keyframes menuSlideR { from { opacity: 0; transform: translateX(-24px); } }
@media (max-width: 820px) {
  .menu .mi { padding: 13px 10px; font-size: 15.5px; }
  .mi-ic svg { width: 22px; height: 22px; }
  .menu-head { padding: 6px 10px 14px; }
}

/* ---------- Intestazione delle pagine (data, titolo, modalità, profilo) ---------- */
.home-head { align-items: flex-start; margin-bottom: 24px; }
.hh-txt { min-width: 0; }
.hh-date { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.hh-date::first-letter { text-transform: uppercase; }
.home-head h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.home-head .greet { margin: 0; }
.hh-actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 2px; }
.home-head .avatar { margin: 0; }
.mode-chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; margin: 0; padding: 0 15px; border-radius: 999px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 750; font-size: 13px; color: var(--text); transition: background .2s, transform .2s var(--spring); }
.mode-chip svg { width: 17px; height: 17px; }
.mode-chip:active { transform: scale(.95); }
.mode-chip.active { background: linear-gradient(135deg, var(--accent-strong), var(--c2)); border-color: transparent; color: #fff; }
button.avatar { border: 0; cursor: pointer; padding: 0; }
@media (max-width: 820px) {
  .home-head { margin-bottom: 18px; }
  .home-head h1 { font-size: 27px; letter-spacing: -.9px; }
  .mode-chip:not(.active) { width: 40px; padding: 0; justify-content: center; }
  .mode-chip:not(.active) span { display: none; }
  .mode-chip.active { padding: 0 12px; font-size: 12.5px; }
}

/* ---------- Impostazioni a schede ---------- */
.set-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 30px; align-items: start; max-width: 1180px; }
.set-side { position: sticky; top: 0; }
.set-nav { display: flex; flex-direction: column; gap: 3px; }
.set-tab { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; transition: background .2s; }
.set-tab:hover { background: var(--surface); }
.set-tab.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.set-tab .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-tab b { font-size: 14.5px; font-weight: 750; }
.set-tab small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-tab > svg:last-child { width: 16px; height: 16px; color: var(--faint); flex: none; }
.set-side .set-tab > svg:last-child { display: none; }
.set-ico.sm { width: 36px; height: 36px; border-radius: 11px; }
.set-ico.sm svg { width: 18px; height: 18px; }
.set-title { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.set-title small { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.set-title h2 { margin: 2px 0 0; font-size: 30px; letter-spacing: -1px; }
.set-back { display: none; }
.set-main .set-grid { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
.set-main .set-card.span-2 { grid-column: auto; }
.set-me { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; margin: 6px 0 18px; border-radius: 22px; text-align: left;
  background: linear-gradient(135deg, rgba(123,92,255,.28), rgba(255,79,163,.16)); border: 1px solid var(--stroke); }
.set-me .avatar.big { width: 58px; height: 58px; font-size: 24px; }
.set-me .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.set-me b { font-size: 18px; font-weight: 800; } .set-me small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-me > svg { width: 18px; height: 18px; color: var(--faint); }
.pref-group { margin: 14px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 820px) {
  .set-layout { display: block; }
  .set-side { display: none; }
  .set-back { display: grid; }
  .set-title h2 { font-size: 24px; }
  /* elenco delle categorie come su iPhone */
  .view > .set-nav { gap: 0; padding: 4px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
  .view > .set-nav .set-tab { padding: 12px 10px; border-radius: 16px; }
  .view > .set-nav .set-tab + .set-tab { box-shadow: inset 0 1px 0 var(--line); }
  .view > .set-nav .set-tab:active { background: var(--surface-2); }
}
/* scheda con una sola sezione: niente intestazione ripetuta nel riquadro */
.set-grid.solo > .set-card > .set-head { display: none; }
.set-grid.solo > .set-card { padding-top: 14px; }
@media (max-width: 820px) {
  /* righe più pulite: la freccia di download compare solo se il brano si sta scaricando o è già sul telefono (sempre nel menu ⋯) */
  .tracks .dl-one:not(.has):not(.err) { display: none; }
  .np-label { display: none; }
  .np-tools { gap: 6px; }
}
.np-label { font-size: 11px; letter-spacing: .14em; }

/* =====================================================================
   Jam
   ===================================================================== */
.jam-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,79,163,.18); color: #ff7ab8;
  font-size: 11px; font-weight: 900; letter-spacing: .14em; flex: none; }
.jam-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4f8b; box-shadow: 0 0 0 0 rgba(255,79,139,.7); animation: livePulse 1.6s infinite; }
.jam-live.big { height: 30px; padding: 0 13px; font-size: 12px; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(255,79,139,0); } 100% { box-shadow: 0 0 0 0 rgba(255,79,139,0); } }
.face { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; object-fit: cover; font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 2px #15112b; }
.face.more { background: var(--surface-3); font-size: 11px; }

/* pagina iniziale */
.jam-start { max-width: 560px; margin: 10px auto 0; display: flex; flex-direction: column; gap: 16px; }
.jam-hero { text-align: center; padding: 34px 26px 28px; border-radius: 30px; border: 1px solid var(--stroke);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,107,61,.35), transparent 60%), radial-gradient(120% 100% at 50% 100%, rgba(123,92,255,.35), transparent 60%), var(--surface); }
.jam-hero-ic { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #ff6b3d, #ff4fa3 55%, #7b5cff); box-shadow: 0 22px 50px -16px rgba(255,79,163,.8); }
.jam-hero-ic svg { width: 40px; height: 40px; }
.jam-hero h1 { font-size: 44px; letter-spacing: -1.6px; margin: 0 0 8px; }
.jam-hero p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0 auto 18px; max-width: 420px; }
.jam-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.jam-feats span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,.22); font-size: 13px; font-weight: 700; }
.jam-feats svg { width: 15px; height: 15px; color: var(--accent); }
.jam-go { height: 52px; padding: 0 28px; font-size: 16px; }
.jam-code { padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.jam-code-row { display: flex; gap: 8px; }
.jam-code input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(0,0,0,.2); color: var(--text);
  font: inherit; font-size: 18px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; outline: 0; }
.jam-code input:focus { border-color: rgba(183,164,255,.7); }
.jam-code .btn-ghost { height: 46px; }

/* stanza */
.jam-room { max-width: 1120px; }
.jam-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.jam-head .grow { flex: 1; min-width: 0; }
.jam-head h1 { margin: 0; font-size: 30px; letter-spacing: -1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-head small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 3px; }
.jam-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.jam-left { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.jam-right { display: flex; flex-direction: column; gap: 14px; }
.jam-now { padding: 22px; border-radius: 28px; text-align: center; border: 1px solid var(--stroke);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 30%, transparent), color-mix(in srgb, var(--c2) 18%, transparent) 70%), var(--surface); }
.jam-cover { width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto 18px; border-radius: 22px; box-shadow: 0 30px 70px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.1); }
.jam-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.jam-meta b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-meta span { color: var(--muted); font-size: 15px; }
.jam-meta small { color: var(--accent); font-size: 12.5px; font-weight: 700; }
.jam-prog { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jam-bar-t2 { height: 5px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.jam-bar-t2 i { display: block; height: 100%; width: 0; border-radius: 4px; background: #fff; transition: width .5s linear; }
.jam-ctl { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.jam-ctl .round-btn { width: 50px; height: 50px; }
.jam-ctl .play-btn { width: 68px; height: 68px; }
.jam-now.locked .jam-ctl { opacity: .4; }
.jam-hint { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.jam-sync { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; }
.jam-sync i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); flex: none; }
.jam-sync.busy i { background: var(--warn); box-shadow: 0 0 12px var(--warn); animation: blink 1s infinite; }
.jam-sync.warn i { background: #ff8a4c; box-shadow: 0 0 12px #ff8a4c; }
.jam-sync:empty { display: none; }
.jam-card { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.jam-card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.jam-card h3 { margin: 0; font-size: 16px; }
.jam-people { display: flex; flex-direction: column; gap: 8px; }
.jam-person { display: flex; align-items: center; gap: 12px; }
.jam-person .face { width: 36px; height: 36px; box-shadow: none; }
.jam-person b { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { color: #ffcf6e; font-size: 12px; font-weight: 800; }
.jam-q { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.jam-q .thumb { width: 42px; height: 42px; border-radius: 8px; }
.jam-q .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jam-q b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-q small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-inv { display: flex; align-items: center; gap: 18px; }
.jam-qr { width: 128px; height: 128px; flex: none; padding: 8px; border-radius: 16px; background: #fff; }
.jam-qr svg { width: 100%; height: 100%; display: block; }
.jam-inv .grow { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.jam-inv small { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.jam-codebig { font-size: 32px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.jam-inv .actions { margin-top: 8px; flex-wrap: wrap; }

/* barra della Jam sopra il mini player */
.jam-bar { position: fixed; z-index: 22; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + 20px); display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 8px 0 10px; border-radius: 999px; max-width: calc(100vw - 24px); color: #fff;
  background: linear-gradient(135deg, rgba(255,107,61,.95), rgba(255,79,163,.95)); box-shadow: 0 14px 34px -12px rgba(255,79,163,.75); animation: toastIn .4s var(--spring); }
.jam-bar .jam-live { background: rgba(0,0,0,.22); color: #fff; }
.jam-bar .jam-live i { background: #fff; }
.jam-bar-t { font-weight: 800; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-faces { display: flex; padding-left: 6px; }
.jam-faces .face { width: 28px; height: 28px; margin-left: -8px; font-size: 12px; box-shadow: 0 0 0 2px #ff5c8f; }
body:has(#jamBar) .view { padding-bottom: calc(var(--player-h) + 110px); }
@media (max-width: 820px) {
  .jam-cols { grid-template-columns: 1fr; }
  .jam-left { position: static; }
  .jam-head h1 { font-size: 24px; }
  .jam-hero h1 { font-size: 36px; }
  .jam-now { padding: 18px; }
  .jam-cover { width: min(78vw, 300px); }
  .jam-inv { flex-direction: column; text-align: center; }
  .jam-inv .actions { justify-content: center; }
  .jam-bar { bottom: calc(var(--nav-h) + var(--player-h) + var(--safe-b) + 14px); }
  body:has(#jamBar) .view { padding-bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 90px); }
}
body.on-jam #jamBar { display: none; }
body.on-jam .view { padding-bottom: calc(var(--player-h) + 48px); }
@media (max-width: 820px) { body.on-jam .view { padding-bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 28px); } }
.jam-listen { height: 50px; width: 100%; font-size: 15px; }
.jam-left, .jam-right, .jam-now, .jam-card { min-width: 0; }
@media (max-width: 820px) { .jam-cols { grid-template-columns: minmax(0, 1fr); } .jam-codebig { font-size: 28px; } }

/* ---------- Download delle playlist ---------- */
.auto-btn { gap: 7px; }
.auto-btn svg { width: 16px; height: 16px; }
.auto-btn.on { background: linear-gradient(135deg, rgba(15,155,116,.55), rgba(70,227,165,.35)); border-color: rgba(70,227,165,.6); color: #fff; }
.dl-btn.done { color: var(--ok); border-color: rgba(61,220,151,.45); }
.dl-btn.busy span { font-variant-numeric: tabular-nums; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row-actions .btn-ghost { height: 34px; padding: 0 12px; font-size: 12.5px; }
@media (max-width: 820px) { .row-actions .auto-btn span { display: none; } .row-actions .auto-btn { width: 34px; padding: 0; } }

/* =====================================================================
   Grafica 2: benvenuto con muro di copertine, testate colorate, libreria, player
   ===================================================================== */
/* ---------- Benvenuto ---------- */
.auth-wall { position: fixed; inset: -10% -10%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; transform: rotate(-12deg) scale(1.15);
  opacity: .42; pointer-events: none; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.wall-col { display: flex; flex-direction: column; gap: 14px; animation: wallUp var(--d, 60s) linear infinite; }
.wall-col:nth-child(even) { animation-direction: reverse; }
.wall-col img { width: 100%; aspect-ratio: 1; border-radius: 18px; object-fit: cover; box-shadow: 0 20px 40px -20px rgba(0,0,0,.9); }
@keyframes wallUp { to { transform: translateY(-50%); } }
.auth .auth-bg { z-index: 0; }
.auth-card { z-index: 1; }
.auth::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(70% 60% at 50% 55%, rgba(8,8,15,.55), rgba(8,8,15,.92)); z-index: 0; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.auth-brand .auth-logo { animation: none; }
.auth-card.step-welcome h1 { font-size: clamp(40px, 10vw, 64px); line-height: 1; letter-spacing: -2px; margin: 0 0 16px; }
.auth-card.step-welcome h1 em { font-style: normal; background: linear-gradient(90deg, #b7a4ff, #ff7ab8, #ffb44c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-perks { list-style: none; padding: 0; margin: 20px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.auth-perks li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  font-size: 13px; font-weight: 700; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.auth-perks svg { width: 15px; height: 15px; color: var(--accent); }
.auth-card.step-welcome .auth-actions { margin-top: 26px; }
@media (min-width: 900px) {
  .auth-card.step-welcome { width: min(1000px, 92vw); display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 60px; }
  .auth-card.step-welcome .auth-hero { text-align: left; }
  .auth-card.step-welcome .auth-hero p { margin: 0; max-width: 460px; }
  .auth-card.step-welcome .auth-perks { justify-content: flex-start; }
  .auth-card.step-welcome .auth-actions { margin: 0; padding: 30px; border-radius: 28px; background: rgba(20,16,38,.72); border: 1px solid rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
  .auth-card:not(.step-welcome) { padding: 32px; border-radius: 28px; background: rgba(20,16,38,.78); border: 1px solid rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
}
body.motion-off .wall-col, body.motion-reduced .wall-col { animation: none; }
@media (prefers-reduced-motion: reduce) { .wall-col { animation: none; } }

/* ---------- Testate colorate dalla copertina ---------- */
.view { position: relative; }
.view.has-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 460px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgb(var(--hero-rgb, 123 92 255) / .55), rgb(var(--hero-rgb, 123 92 255) / .18) 55%, transparent);
  transition: background .6s ease; border-radius: inherit; }
.view.has-hero > * { position: relative; z-index: 1; }
.hero { padding-top: 12px; }
.hero-art { box-shadow: 0 34px 80px -26px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.08); }
.hero-kind { color: rgba(255,255,255,.75); }
.hero .sub { color: rgba(255,255,255,.72); }
.hero-actions .fab { box-shadow: 0 16px 34px -12px rgba(0,0,0,.8); }
@media (max-width: 820px) {
  .view.has-hero::before { height: 520px; }
  /* telefono come le app vere: copertina grande al centro, titolo a sinistra, play grande a destra */
  .hero { align-items: stretch; text-align: left; gap: 18px; padding-top: 4px; }
  .hero > .hero-art, .hero > .art-box { align-self: center; }
  .hero-art { width: min(64vw, 260px); height: min(64vw, 260px); border-radius: 16px; }
  .hero h1 { font-size: 26px; line-height: 1.1; letter-spacing: -.8px; margin: 2px 0 6px; overflow-wrap: anywhere; }
  .hero-kind { font-size: 11px; }
  .hero .sub { margin-bottom: 14px; }
  .hero-actions { justify-content: flex-start; gap: 8px; flex-wrap: wrap; row-gap: 10px; }
  .hero-actions .auto-btn span { display: none; }
  .hero-actions .auto-btn { width: 38px; padding: 0; }
  .hero-actions .fab { order: 99; margin-left: auto; width: 56px; height: 56px; flex: none; }
  .hero-actions .btn-ghost { height: 38px; padding: 0 13px; font-size: 13px; flex: none; }
  .hero-actions .btn-ghost.dl-btn span, .hero-actions .auto-btn span { white-space: nowrap; }
  .hero-actions .icon-btn { flex: none; }
}

/* ---------- Libreria: scorciatoie in fila ---------- */
.lib-shortcuts { display: flex; gap: 10px; overflow-x: auto; margin: 2px -16px 18px; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.lib-shortcuts::-webkit-scrollbar { display: none; }
.lib-short { flex: none; width: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 18px; scroll-snap-align: start;
  background: var(--surface-2); border: 1px solid var(--line); transition: transform .2s var(--spring); position: relative; }
.lib-short:active { transform: scale(.95); }
.ls-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 22px -10px rgba(0,0,0,.8); }
.ls-ic svg { width: 19px; height: 19px; }
.lib-short b { font-size: 13px; font-weight: 750; line-height: 1.2; }
.lib-short small { position: absolute; top: 10px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.14); font-size: 11px; font-weight: 800; }

/* ---------- Player a schermo intero: titolo con "mi piace" ---------- */
.np-meta-row { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: min(52vh, 80vw); margin: 0 auto; }
.np-text { min-width: 0; text-align: center; }
.np-like { width: 44px; height: 44px; flex: none; }
.np-like svg { width: 26px; height: 26px; }
.np-like.liked { color: #ff4f8b; }
.np-like.liked svg { fill: currentColor; }
@media (max-width: 820px) {
  .np-meta-row { justify-content: space-between; max-width: min(82vw, 44vh); width: 100%; }
  .np-text { text-align: left; }
  .np-title { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .np-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
