/* Softline — leitor escuro, painéis arredondados, acento verde. Tema escuro fixo, por escolha. */
:root {
  color-scheme: dark;
  --bg: #0f1512;
  --panel: #161e1a;
  --raise: #1f2a24;
  --raise-2: #2a372f;
  --line: #33433a;
  --fg: #ecf5ef;
  --muted: #9bb0a3;
  --faint: #66786d;
  --accent: #4cd987;
  --accent-ink: #06240f;
  --like: #ff7598;
  --free: #8cc8ff;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 15px/1.45 var(--body);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { width: 20px; height: 20px; flex: none; }
.ico-fill { fill: currentColor; }
.ico-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- casca ---------- */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: clamp(220px, 21vw, 290px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding-block: 10px 0;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.panel { background: var(--panel); border-radius: 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 8px; font: 700 22px/1 var(--display); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.nav { display: flex; flex-direction: column; padding: 6px 8px 12px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--fg); }
.nav a.on { color: var(--fg); background: var(--raise); }
.lib { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lib-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px 20px; color: var(--muted); font-weight: 700; }
.lib-list { overflow-y: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.lib-item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; text-decoration: none; min-width: 0; }
.lib-item:hover { background: var(--raise); }
.lib-item.on { background: var(--raise-2); }
.lib-item .tt { min-width: 0; }

#main { overflow-y: auto; min-width: 0; position: relative; scroll-behavior: smooth; overscroll-behavior-y: contain; }
.view { padding: 0 24px 40px; min-height: 100%; }
.view-tint { background: linear-gradient(180deg, hsl(calc(var(--h, 150) * 1deg) 40% 26% / .55), transparent 320px); }

.tabs { display: none; }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 5vw, 56px); line-height: 1.02; font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tt { display: flex; flex-direction: column; min-width: 0; }
.tt b, .tt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt b { font-weight: 600; }
.tt small { color: var(--muted); font-size: 13px; }
.tt small a { text-decoration: none; }
.tt small a:hover { text-decoration: underline; color: var(--fg); }

/* ---------- topo ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; background: transparent; transition: background .2s; }
#main.scrolled .topbar { background: var(--panel); }
.round { width: 34px; height: 34px; border-radius: 50%; background: rgb(0 0 0 / .35); display: grid; place-items: center; }
.round:hover { background: rgb(0 0 0 / .55); }
.search-box { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--raise); border-radius: 999px; padding: 0 16px; height: 44px; border: 1px solid transparent; }
.search-box:focus-within { border-color: var(--fg); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: inherit; outline: none; }
.search-box input::placeholder { color: var(--muted); }

/* ---------- secções e cartões ---------- */
.section { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.section-head a:hover { color: var(--fg); text-decoration: underline; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; scroll-snap-align: start; position: relative; min-width: 0; }
.card:hover { background: var(--raise); }
.card .cover { width: 100%; }
.card .round-cover { border-radius: 50%; }
.card .tt b { font-size: 14px; }
.card .tt small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cw { position: relative; }
.cw .fab { position: absolute; right: 8px; bottom: 8px; opacity: 0; transform: translateY(8px); transition: .2s; }
.card:hover .fab, .card:focus-within .fab { opacity: 1; transform: none; }
.card.cur .tt b { color: var(--accent); }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 18px; }
.quick a { display: flex; align-items: center; gap: 12px; background: rgb(255 255 255 / .07); border-radius: 6px; overflow: hidden; text-decoration: none; font-weight: 700; min-width: 0; }
.quick a:hover { background: rgb(255 255 255 / .14); }
.quick .cover { width: 56px; border-radius: 0; }
.quick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }

.cover { aspect-ratio: 1; max-width: 100%; border-radius: 6px; background: var(--raise) center/cover no-repeat; flex: none; box-shadow: 0 6px 18px rgb(0 0 0 / .35); display: grid; place-items: center; overflow: hidden; }
img.cover { display: block; object-fit: cover; }
.round-cover { border-radius: 50% !important; }
.cover.s40 { width: 40px; box-shadow: none; border-radius: 4px; }
.cover.s48 { width: 48px; box-shadow: none; }
.cover.s56 { width: 56px; }
.cover.liked { background: linear-gradient(135deg, #1f7a4a, #4cd987 70%, #d4ffe6); color: #fff; }
.cover.mine { background: linear-gradient(140deg, hsl(calc(var(--h) * 1deg) 60% 52%), hsl(calc((var(--h) + 70) * 1deg) 55% 22%)); color: #fff; }
.cover.liked svg, .cover.mine svg { width: 40%; height: 40%; }
.cover.s40 svg, .cover.s48 svg { width: 18px; height: 18px; }

.fab { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 8px 20px rgb(0 0 0 / .4); transition: transform .15s; }
.fab:hover { transform: scale(1.05); }
.fab svg { width: 22px; height: 22px; }
.fab.big { width: 56px; height: 56px; }
.fab.big svg { width: 26px; height: 26px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--raise); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.chip:hover { background: var(--raise-2); }
.chip.on { background: var(--fg); color: var(--bg); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }

.badge { font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; letter-spacing: .02em; }
.badge.full { border-color: color-mix(in srgb, var(--free) 50%, transparent); color: var(--free); }

/* ---------- cabeçalho de coleção ---------- */
.hero { display: flex; align-items: flex-end; gap: 24px; padding: 20px 0 22px; }
.hero .cover { width: clamp(140px, 22vw, 232px); box-shadow: 0 14px 40px rgb(0 0 0 / .5); }
.hero .cover.circle { border-radius: 50%; }
.hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero-text h1 { overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.meta b { color: var(--fg); }
.meta a { font-weight: 700; color: var(--fg); text-decoration: none; }
.meta a:hover { text-decoration: underline; }
.actions { display: flex; align-items: center; gap: 18px; padding: 4px 0 16px; flex-wrap: wrap; }
.ib { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.ib:hover { color: var(--fg); }
.ib.on { color: var(--accent); }
.ib.like.on { color: var(--like); }
.ib.like.on svg path { fill: currentColor; }
.ib.lg svg { width: 26px; height: 26px; }
.textbtn { color: var(--muted); font-weight: 700; font-size: 13px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
.textbtn:hover { color: var(--fg); border-color: var(--fg); }
.textbtn.danger[data-armed] { color: #ffb3b3; border-color: #ff8a8a; }

/* ---------- lista de faixas ---------- */
.tracks { display: flex; flex-direction: column; }
.thead, .row { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) 36px 118px 36px; align-items: center; gap: 12px; padding: 0 12px; }
.thead { height: 36px; border-bottom: 1px solid var(--line); margin-bottom: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.thead span:nth-child(5) { text-align: right; }
.row { height: 58px; border-radius: 6px; cursor: pointer; }
.row:hover, .row:focus-visible { background: rgb(255 255 255 / .06); }
.row .num { color: var(--muted); font: 500 14px var(--mono); text-align: center; font-variant-numeric: tabular-nums; }
.row .ti { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row .alb { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.row .alb:hover { color: var(--fg); text-decoration: underline; }
.row .dur { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font: 13px var(--mono); font-variant-numeric: tabular-nums; }
.row .ib { width: 32px; height: 32px; }
.row .ib.like:not(.on), .row .ib.more { opacity: 0; }
.row:hover .ib.like, .row:hover .ib.more, .row:focus-within .ib { opacity: 1; }
.row.cur .tt b { color: var(--accent); }
.row .eq { display: none; }
.row.cur .eq { display: inline-flex; }
.row.cur .n { display: none; }
.eq { gap: 2px; align-items: flex-end; height: 14px; justify-content: center; }
.eq i { width: 3px; background: var(--accent); height: 30%; border-radius: 1px; }
body.playing .eq i { animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.tracks.compact .thead { display: none; }
.tracks.compact .row { grid-template-columns: 32px minmax(0, 1fr) 36px 118px 36px; }
.tracks.compact .alb { display: none; }

/* ---------- estados ---------- */
.empty { padding: 48px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h2 { color: var(--fg); }
.empty svg { width: 40px; height: 40px; }
.skeleton { background: linear-gradient(90deg, var(--raise) 0, var(--raise-2) 50%, var(--raise) 100%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-row { height: 46px; margin: 6px 0; }
.err { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--raise); color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.note svg { color: var(--free); margin-top: 1px; }

.genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.genre { aspect-ratio: 16 / 10; border-radius: 10px; padding: 14px; position: relative; overflow: hidden; text-decoration: none; font: 700 20px/1.1 var(--display); background: hsl(calc(var(--h) * 1deg) 55% 42%); max-width: 100%; }
.genre img { position: absolute; right: -14px; bottom: -6px; width: 46%; transform: rotate(22deg); border-radius: 6px; box-shadow: 0 6px 16px rgb(0 0 0 / .4); }

/* ---------- leitor ---------- */
.player { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 16px; padding-block: 8px 12px; }
.pinfo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pinfo .open-np { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.pctl { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pbtns { display: flex; align-items: center; gap: 16px; }
.pp { width: 36px; height: 36px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.pp:hover { transform: scale(1.05); }
.ib.rep1 { position: relative; }
.ib.rep1::after { content: "1"; position: absolute; font: 700 9px var(--mono); right: 4px; top: 3px; }
.seek { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 620px; }
.seek time { font: 11px var(--mono); color: var(--muted); min-width: 36px; font-variant-numeric: tabular-nums; }
.seek time:first-child { text-align: right; }
.pright { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pright input { width: 110px; }
.mini-bar { display: none; }
.sleep-label { font: 600 10px var(--mono); color: var(--accent); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; cursor: pointer; --p: 0%; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fg) var(--p), var(--line) var(--p)); }
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), var(--line) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--fg); opacity: 0; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--fg); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--fg); }

/* ---------- ecrã "a tocar" ---------- */
.np { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; overflow-y: auto;
  background: linear-gradient(180deg, hsl(calc(var(--h, 260) * 1deg) 45% 30%), var(--bg) 75%);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(20px, env(safe-area-inset-left, 0px));
  transform: translateY(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s; }
.np.open { transform: none; visibility: visible; }
.np-in { width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.np-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.np-top .tt { text-align: center; align-items: center; }
.np .cover.xl { width: min(100%, 46vh); margin: 8px auto 0; box-shadow: 0 20px 50px rgb(0 0 0 / .55); border-radius: 10px; }
.np-title { display: flex; align-items: center; gap: 12px; }
.np-title .tt b { font: 700 22px/1.2 var(--display); }
.np-title .tt small { font-size: 15px; }
.np .seek { max-width: none; flex-wrap: wrap; justify-content: space-between; }
.np .seek input { flex-basis: 100%; }
.np .seek time { min-width: 0; text-align: left; }
.np-btns { display: flex; align-items: center; justify-content: space-between; }
.np-btns .pp { width: 64px; height: 64px; }
.np-btns .pp svg { width: 28px; height: 28px; }
.np-btns .ib svg { width: 26px; height: 26px; }
.np-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.np-foot a { color: var(--muted); }

/* ---------- menu, modal, aviso ---------- */
.menu { position: fixed; z-index: 60; min-width: 220px; max-width: calc(100vw - 32px); background: var(--raise); border-radius: 8px; padding: 4px; box-shadow: 0 16px 40px rgb(0 0 0 / .6); display: flex; flex-direction: column; max-height: 70vh; overflow-y: auto; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px; text-align: left; text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--raise-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.menu .label { padding: 8px 12px 4px; color: var(--muted); font-size: 12px; }
.modal-bg { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / .6); display: grid; place-items: center; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.modal { background: var(--raise); border-radius: 12px; padding: 22px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.modal input { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--fg); font: inherit; padding: 12px; }
.modal input:focus { border-color: var(--fg); outline: none; }
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; }
.btn { height: 42px; padding: 0 22px; border-radius: 999px; font-weight: 700; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { color: var(--fg); }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 110px); transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- puxar para atualizar ---------- */
.ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) - 44px); z-index: 30; width: 40px; height: 40px; border-radius: 50%;
  background: var(--raise-2); color: var(--muted); display: grid; place-items: center; opacity: 0; pointer-events: none;
  transform: translate(-50%, 0); box-shadow: 0 6px 16px rgb(0 0 0 / .45); }
.ptr.ready { color: var(--accent); }
.ptr.spin { transform: translate(-50%, 64px) !important; opacity: 1 !important; color: var(--accent); }
.ptr.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- telemóvel ---------- */
@media (max-width: 780px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; gap: 0; padding-block: 0; padding-left: 0; padding-right: 0; }
  .side { display: none; }
  #main { border-radius: 0; background: var(--bg); }
  .view { padding: 0 var(--gutter-r) 24px var(--gutter-l); }
  .player { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px; margin: 0 8px; padding: 6px 8px 6px 6px; border-radius: 8px; background: var(--raise-2); position: relative; }
  .player .pctl > .seek, .player .pbtns > :not(.pp), .pright > :not(.like) { display: none; }
  .player .pctl { order: 3; }
  .player .pright { order: 2; }
  .player .pp { background: none; color: var(--fg); }
  .mini-bar { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgb(255 255 255 / .2); border-radius: 1px; overflow: hidden; }
  .mini-bar i { display: block; height: 100%; background: var(--fg); width: 0; }
  .tabs { display: flex; justify-content: space-around; padding: 8px var(--gutter-r) 6px var(--gutter-l); background: linear-gradient(180deg, transparent, var(--bg) 30%); }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 12px; }
  .tabs a.on { color: var(--fg); }
  .tabs svg { width: 24px; height: 24px; }
  .thead { display: none; }
  .row, .tracks.compact .row { grid-template-columns: minmax(0, 1fr) 32px auto 32px; padding: 0 4px; gap: 6px; }
  .row .num, .row .alb { display: none; }
  .row .ib.like:not(.on), .row .ib.more { opacity: 1; }
  .row .dur time { display: none; }
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero .cover { width: min(60vw, 240px); align-self: center; }
  h1 { font-size: clamp(26px, 8vw, 40px); }
  .shelf { grid-auto-columns: 140px; gap: 6px; }
  .card { padding: 6px; }
  .card .fab { display: none; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick .cover { width: 52px; }
  .quick span { font-size: 13px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
  .genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .genre { font-size: 16px; }
  .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 140px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Veltra (VLT): temas desbloqueados e secção da carteira ---------- */
:root[data-tema="veltra"] {
  --bg: #0b0a18; --panel: #13112a; --raise: #1c1940; --raise-2: #27235a; --line: #353070;
  --fg: #efedff; --muted: #a6a2d2; --faint: #6f6b9e; --accent: #3ff0d2; --accent-ink: #04201b;
}
:root[data-tema="ouro"] {
  --bg: #0b1020; --panel: #121a30; --raise: #1b2540; --raise-2: #263252; --line: #34405f;
  --fg: #f6f1e4; --muted: #b7ae98; --faint: #7a7364; --accent: #ffc35c; --accent-ink: #2b1a00;
}
.mono { font-family: var(--mono); }
.vlt-mark { width: clamp(140px, 22vw, 232px); border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 22%, rgb(255 255 255 / .25), transparent 60%), linear-gradient(135deg, #1a1060, #5b4cf0 45%, #12c9b4 95%); }
.vlt-mark svg { width: 46%; height: 46%; stroke-width: 2.4; }
.vlt-ligar, .vlt-conta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; border-radius: 12px; background: var(--raise); }
.vlt-conta { justify-content: space-between; }
.vlt-conta > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vlt-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.vlt-btns .textbtn, .vlt-ligar .btn { display: inline-flex; align-items: center; gap: 8px; }
.vlt-btns svg { width: 16px; height: 16px; }
.vlt-manual { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.vlt-input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 13px var(--mono); }
.vlt-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.perks { display: grid; gap: 8px; }
.perk { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--raise); }
.perk div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perk small { color: var(--muted); }
.perk-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); color: var(--faint); }
.perk.on .perk-ico { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.temas { display: flex; flex-wrap: wrap; gap: 10px; }
.tema-op { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; }
.tema-op small { color: var(--faint); font-weight: 600; }
.tema-op.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tema-op[aria-disabled="true"] { opacity: .55; }
.tema-op .sw { width: 22px; height: 22px; border-radius: 50%; }
.tema-op[data-sw="base"] .sw { background: linear-gradient(135deg, #0f1512 50%, #4cd987 50%); }
.tema-op[data-sw="veltra"] .sw { background: linear-gradient(135deg, #0b0a18 50%, #3ff0d2 50%); }
.tema-op[data-sw="ouro"] .sw { background: linear-gradient(135deg, #0b1020 50%, #ffc35c 50%); }
.vlt-mix { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; background: var(--raise); color: var(--muted); }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--raise-2); position: relative; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--fg); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(20px); background: var(--accent-ink); }
.switch[aria-disabled="true"] { opacity: .45; }
.note a { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .switch, .switch i { transition: none; } }
.vlt-conta .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.vlt-conta .eyebrow svg { width: 14px; height: 14px; color: var(--accent); }
.vlt-btns .btn { display: inline-flex; align-items: center; gap: 8px; }
.vlt-btns .btn svg { width: 16px; height: 16px; }
.vlt-aviso { margin: 10px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--raise); color: var(--muted, #a7b0aa); font-size: 14px; line-height: 1.45; }
