/*
  .___  ___.  __    __       _______. __   _______ ____    ____
  |   \/   | |  |  |  |     /       ||  | |   ____|\   \  /   /
  |  \  /  | |  |  |  |    |   (----`|  | |  |__    \   \/   /
  |  |\/|  | |  |  |  |     \   \    |  | |   __|    \_    _/
  |  |  |  | |  `--'  | .----)   |   |  | |  |         |  |
  |__|  |__|  \______/  |_______/    |__| |__|         |__|
  ..................... Much More Than a Web Player .....................
*/

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-top: rgba(255, 255, 255, 0.10);
  --glass-bottom: rgba(255, 255, 255, 0.025);
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-spec: rgba(255, 255, 255, 0.20);
  --glass-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --on-a: #06080c;
  --tabs-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
}

html[data-scheme="light"] {
  --glass-top: rgba(255, 255, 255, 0.85);
  --glass-bottom: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(10, 13, 18, 0.10);
  --glass-spec: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 18px 50px rgba(10, 13, 18, 0.14);
}

html, body, button, input, select, textarea {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1 { font-weight: 800; letter-spacing: -0.025em; }
h2 { font-weight: 700; letter-spacing: -0.02em; }
h3 { font-weight: 600; letter-spacing: -0.01em; }
b, strong, .m-medium { font-weight: 500; }

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--a);
  outline-offset: 3px;
}

.ib,
.login-pill-btn,
.rate-pill-btn,
.search,
.pop,
.modal-glass-card,
#player,
.library-sidebar,
.artist,
.m-glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), var(--gl);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-spec), inset 0 -1px 0 rgba(255, 255, 255, 0.03), var(--glass-shadow);
}

.ib { width: 44px; height: 44px; color: var(--tx); }
.ib svg { width: 21px; height: 21px; stroke-width: 2; }
.ib.sm { width: 38px; height: 38px; background: none; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ib.sm svg { width: 19px; height: 19px; }
.ib.sm:hover { background: rgba(255, 255, 255, 0.07); }

.login-pill-btn { height: 46px; padding: 0 16px 0 6px; gap: 10px; border-radius: 999px; }
.login-pill-btn .pf-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--t); color: var(--a); }
.login-pill-btn .pf-icon svg { width: 18px; height: 18px; }
.login-pill-btn span.pf-icon { display: grid; place-items: center; flex: none; line-height: 0; padding: 0; }
.login-pill-btn span.pf-icon svg { display: block; width: 18px; height: 18px; margin: 0; opacity: 1; }
.pf-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.pf-text small { opacity: 0.68; }

.rate-pill-btn { border-color: var(--glass-line); background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)); box-shadow: inset 0 1px 0 var(--glass-spec); }
.rate-pill-btn:hover, .rate-pill-btn:focus-visible { transform: none; border-color: color-mix(in srgb, var(--tx) 28%, transparent); box-shadow: inset 0 1px 0 var(--glass-spec); }
.rate-pill-btn .pf-text small { opacity: 0.68; }

.pbtn, .cta, .m-btn.primary {
  background: var(--a);
  color: var(--on-a);
  border: 0;
  font-weight: 700;
  box-shadow: none;
}

.m-btn {
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tx);
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.2s;
}
.m-btn:hover { background: rgba(255, 255, 255, 0.11); }
.m-btn.primary:hover { background: color-mix(in srgb, var(--a) 88%, #fff); }
.m-btn.ghost { background: transparent; }
.m-btn.danger { background: #e5484d; color: #fff; border: 0; }
.m-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.m-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.m-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--tabs-h) + var(--safe-b));
  translate: -50% 20px;
  opacity: 0;
  z-index: 900;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), var(--gl);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-spec), var(--glass-shadow);
  color: var(--tx);
  font-size: 0.84rem;
  font-weight: 500;
  pointer-events: none;
  transition: translate 0.5s var(--ease), opacity 0.35s var(--ease);
}
.m-toast.show { translate: -50% 0; opacity: 1; }

.m-dialog-wrap, .m-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 10, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.m-dialog-wrap.show, .m-sheet-wrap.show { opacity: 1; }
.m-sheet-wrap[hidden] { display: none; }
.m-dialog, .m-sheet {
  width: min(420px, 100%);
  padding: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(34px) saturate(1.8);
  backdrop-filter: blur(34px) saturate(1.8);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-spec), 0 40px 90px rgba(0, 0, 0, 0.55);
  color: var(--tx);
  translate: 0 18px;
  scale: 0.97;
  transition: translate 0.55s var(--ease), scale 0.55s var(--ease);
}
.show > .m-dialog, .show > .m-sheet { translate: 0 0; scale: 1; }
.m-dialog h2 { font-size: 1.2rem; margin-bottom: 8px; }
.m-dialog p { color: var(--mu); font-size: 0.9rem; line-height: 1.55; }
.m-dialog-actions, .m-sheet-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.m-sheet { width: min(480px, 100%); max-height: min(720px, calc(100dvh - 40px)); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
/* Conteúdo maior que a janela: rola em vez de esmagar botões e campos */
.m-sheet > * { flex-shrink: 0; }
.m-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-sheet-head h2 { font-size: 1.25rem; }
.m-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-line); position: relative; }
.m-seg button { position: relative; z-index: 1; height: 38px; border: 0; border-radius: 999px; background: none; color: var(--mu); font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: color 0.3s var(--ease); }
.m-seg button[aria-selected="true"] { color: var(--on-a); }
.m-seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2)); border-radius: 999px; background: var(--a); translate: calc(var(--i, 0) * 100%) 0; transition: translate 0.5s var(--ease); }

.m-field { display: flex; flex-direction: column; gap: 7px; }
.m-field > span { font-size: 0.78rem; font-weight: 600; color: var(--mu); }
.m-field input, .m-field textarea, .m-field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--tx);
  font: inherit;
  font-size: 0.92rem;
  outline: 0;
  user-select: text;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.m-field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.m-field input:focus, .m-field textarea:focus, .m-field select:focus { border-color: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.m-field option { background: #10141c; color: #f5f7fa; }
.m-field small { font-size: 0.74rem; color: var(--mu); }
.m-field .m-err { color: #ff8a8a; }

.m-cover-pick { display: flex; align-items: center; gap: 14px; }
.m-cover-pick img, .m-cover-pick .m-cover-empty { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; background: linear-gradient(135deg, var(--t), rgba(255, 255, 255, 0.04)); border: 1px dashed var(--glass-line); display: grid; place-items: center; color: var(--mu); }
.m-cover-pick .m-cover-empty svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.m-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.m-colors button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: border-color 0.2s, scale 0.3s var(--ease); }
.m-colors button[aria-checked="true"] { border-color: var(--tx); scale: 1.08; }

.m-consent {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--tabs-h) + var(--safe-b));
  width: min(760px, calc(100% - 24px));
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(1.7);
  backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-spec), 0 30px 70px rgba(0, 0, 0, 0.5);
  color: var(--tx);
  translate: -50% 30px;
  opacity: 0;
  transition: translate 0.6s var(--ease), opacity 0.4s var(--ease);
}
.m-consent.show { translate: -50% 0; opacity: 1; }
.m-consent p { font-size: 0.8rem; line-height: 1.55; color: var(--mu); }
.m-consent p b { color: var(--tx); font-weight: 600; }
.m-consent a { color: var(--a); font-weight: 600; }
.m-consent-actions { display: flex; gap: 8px; flex: none; min-width: 0; }
.m-consent p { min-width: 0; }

.m-tabs { display: none; }
.sb-scrim { display: none; }
.m-group { display: flex; flex-direction: column; gap: 16px; }
.m-group[hidden] { display: none; }
.m-note { font-size: 0.76rem; line-height: 1.5; color: var(--mu); }
.m-cover-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.install-pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-seg button { position: relative; z-index: 1; }
.pop-title { display: block; font-weight: 600; font-size: 0.86rem; margin: 2px 4px 6px; }

.install-pill[hidden] { display: none !important; }
.install-pill {
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tx);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), var(--gl);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  border: 1px solid color-mix(in srgb, var(--a) 40%, var(--glass-line));
  box-shadow: inset 0 1px 0 var(--glass-spec), var(--glass-shadow);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.install-pill svg { color: var(--a); }
.install-pill:hover { border-color: var(--a); }

/* Intro: a logo nasce grande e viaja até encaixar no topo da busca (--p: 0 → 1) */
#intro {
  --e: calc(var(--p, 0) * (2 - var(--p, 0)));
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}
#intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 45% at 50% 45%, color-mix(in srgb, var(--a) 20%, transparent), transparent 70%), radial-gradient(120% 100% at 50% 50%, transparent 35%, color-mix(in srgb, var(--bg) 80%, transparent));
  opacity: calc(1 - var(--p, 0) * 1.3);
  pointer-events: none;
}
#intro[hidden] { display: none; }
.intro-stage { position: relative; display: grid; place-items: center; gap: 18px; text-align: center; }
.intro-logo { position: relative; z-index: 1; transform-origin: 50% 50%; translate: calc(var(--dx, 0px) * var(--e)) calc(var(--dy, 0px) * var(--e)); scale: calc(1 + (var(--ds, 1) - 1) * var(--e)); will-change: translate, scale; }
.intro-logo .hero-wm, .intro-logo svg { height: clamp(72px, 13vw, 132px); width: auto; display: block; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)); }
.intro-cue {
  position: absolute;
  bottom: calc(36px + var(--safe-b));
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--mu);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: calc(1 - var(--p, 0) * 3);
}
.intro-cue i { width: 26px; height: 42px; border-radius: 999px; border: 1.5px solid currentColor; position: relative; }
.intro-cue i::after { content: ""; position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--a); animation: cueDrop 1.8s var(--ease) infinite; }
@keyframes cueDrop { 0% { translate: 0 0; opacity: 0; } 30% { opacity: 1; } 80% { translate: 0 14px; opacity: 0; } 100% { opacity: 0; } }

/* Intro: a interface surge junto com o primeiro scroll, desfocada e quase transparente,
   e entra em foco conforme a logo encaixa. --ui vai de 0 a 1 entre p=0.06 e 1; --sui (busca) entre p=0.15 e 1.
   --uiblur/--suiblur: desfoque que zera no fim (curva quadrática: some mais rápido no final) */
html.intro-on {
  --ui: clamp(0, (var(--p, 0) - 0.06) / 0.94, 1);
  --sui: clamp(0, (var(--p, 0) - 0.15) / 0.85, 1);
  --uiblur: calc((1 - var(--ui)) * (1 - var(--ui)) * 16px);
  --suiblur: calc((1 - var(--sui)) * (1 - var(--sui)) * 16px);
}
html.intro-on header, html.intro-on #mTabs, html.intro-on .library-sidebar, html.intro-on #status {
  opacity: var(--ui);
  filter: blur(var(--uiblur));
  pointer-events: none;
  transition: none;
}
html.intro-on #mTabs { translate: 0 calc((1 - var(--ui)) * 18px); }
html.intro-on header { translate: 0 calc((1 - var(--ui)) * -12px); }
html.intro-on .search {
  opacity: var(--sui);
  filter: blur(var(--suiblur));
  translate: 0 calc((1 - var(--sui)) * 24px);
  scale: calc(0.94 + var(--sui) * 0.06);
  pointer-events: none;
  transition: none;
}
html.intro-on .hero { opacity: 0; transition: none; }

/* Órbita: na intro os anéis entram levemente girados e assentam com --p. Sem escala:
   o espaçamento calculado no script vale igual na intro e na home */
.orb {
  rotate: var(--ax, 0 0 1) calc((1 - var(--p, 1)) * var(--ia, 0deg));
  transition: rotate 0.9s var(--ease);
}
html.intro-on .orb { transition: none; }
/* Órbita co/* Órbita contida: o topo nunca recebe capa solta. Na intro só o 1º anel aparece, em volta
   da logo (--hr = raio do 1º anel + capa, definido no script); com --p a máscara se abre
   até cobrir a tela toda, sem salto ao sair da intro */
.orbit {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
}
html.intro-on .orbit {
  --halo: radial-gradient(circle calc(var(--hr, 360px) * 1.2 + var(--p, 0) * 200vmax) at 50% 50%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%), var(--halo);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%), var(--halo);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
kground: linear-gradient(135deg, color-mix(in srgb, var(--a) 30%, transparent), rgba(255, 255, 255, 0.03)); }

.gate { z-index: 500; background: rgba(4, 6, 10, 0.55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transition: opacity 0.35s var(--ease); }
.gate.show { opacity: 1; }
.gate-card { position: relative; border-radius: var(--r-lg); }
.gate-close { position: absolute; top: 14px; right: 14px; }
.gate-hint { opacity: 0.78; }
.gate-legal { font-size: 0.74rem; color: var(--mu); }
.gate-legal a { color: var(--a); }
.terms-card { border-radius: var(--r-lg); }

.sb-folder { list-style: none; }
.sb-folder-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--tx); font: inherit; text-align: left; cursor: pointer; transition: background 0.25s var(--ease), border-color 0.25s var(--ease); }
.sb-folder-head:hover, .sb-folder.drop .sb-folder-head { background: rgba(255, 255, 255, 0.06); border-color: var(--glass-line); }
.sb-folder.drop .sb-folder-head { border-color: var(--a); }
.sb-folder-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--fc) 22%, transparent); color: var(--fc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.sb-folder-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.sb-folder-head .sb-meta { display: none; }
/* Sidebar: nada cortado em modo compacto ou expandido */
.library-sidebar { overflow: hidden; }
.sb-list { padding: 2px; scroll-padding: 8px; }
.library-sidebar:not(.expanded) .sb-list { overflow-x: hidden; }
.library-sidebar:not(.expanded) .sb-move, .library-sidebar:not(.expanded) .sb-folder-items { display: none; }
.library-sidebar:not(.expanded) .sb-folder-head { width: 44px; height: 44px; padding: 0; justify-content: center; }
.library-sidebar:not(.expanded) .sb-folder-ico { width: 40px; height: 40px; border-radius: 10px; }
.library-sidebar.expanded .sb-item, .library-sidebar.expanded .sb-folder-head { min-width: 0; }
.library-sidebar.expanded .sb-meta { flex: 1; min-width: 0; }
.library-sidebar.expanded .sb-meta b, .library-sidebar.expanded .sb-meta small { max-width: 100%; }
.sb-folder-items .sb-item { padding-right: 4px; }
.library-sidebar.expanded .sb-folder-head .sb-meta { display: flex; }
.sb-folder-items { display: grid; min-width: 0; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.45s var(--ease), opacity 0.3s var(--ease), margin 0.3s; }
.sb-folder-items > ul { list-style: none; overflow: hidden; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.library-sidebar.expanded .sb-folder.open .sb-folder-items, .library-sidebar.expanded .sb-folder.peek .sb-folder-items { grid-template-rows: 1fr; opacity: 1; margin: 4px 0 6px 12px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--fc) 45%, transparent); }
.sb-folder-items .sb-empty { font-size: 0.74rem; color: var(--mu); padding: 6px 8px; }
.sb-item[draggable="true"] { cursor: grab; }
.sb-item.dragging { opacity: 0.4; }
.sb-move { margin-left: auto; opacity: 0; }
.library-sidebar.expanded .sb-item:hover .sb-move, .sb-move:focus-visible { opacity: 1; }
#movePop { width: 240px; }
#movePop button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border-radius: 10px; border: 0; background: none; color: var(--tx); font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; }
#movePop button:hover { background: rgba(255, 255, 255, 0.07); }
#movePop i { width: 12px; height: 12px; border-radius: 4px; flex: none; }

@media (hover: hover) and (pointer: fine) {
  .ib:hover { border-color: color-mix(in srgb, var(--a) 50%, var(--glass-line)); }
}

/* Busca da home mais translúcida: o fundo e as capas aparecem através do vidro */
body[data-view="home"] .search {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)), color-mix(in srgb, var(--gl) 38%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}

/* Desktop fora da home: busca alinhada após a logo, nunca por baixo dos botões */
@media (min-width: 761px) {
  body:not([data-view="home"]) .search { left: 150px; transform: translateY(-50%); width: clamp(220px, calc(100vw - 820px), 420px); }
  body:not([data-view="home"]) #status { left: 150px; transform: none; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .rate-pill-btn .pf-text, .login-pill-btn .pf-text, .install-pill span { display: none; }
  .rate-pill-btn { padding: 0; width: 44px; justify-content: center; }
  .install-pill { width: 44px; padding: 0; justify-content: center; }
  .login-pill-btn { padding: 0 5px; }
  body:not([data-view="home"]) .search { width: clamp(200px, calc(100vw - 560px), 420px); }
}

@media (max-width: 760px) {
  :root { --tabs-h: 68px; --safe-t: env(safe-area-inset-top, 0px); --head-h: 58px; }
  body.has-tabs { padding-bottom: calc(var(--tabs-h) + var(--safe-b)); }
  .m-tabs {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + var(--safe-b));
    height: 60px;
    z-index: 600;
    display: grid;
    grid-template-columns: 1fr 1fr 74px 1fr 1fr;
    overflow: visible;
    padding: 6px;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), var(--gl);
    -webkit-backdrop-filter: blur(30px) saturate(1.8);
    backdrop-filter: blur(30px) saturate(1.8);
    border: 1px solid var(--glass-line);
    box-shadow: inset 0 1px 0 var(--glass-spec), 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  .m-tabs a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 18px; color: var(--mu); text-decoration: none; font-size: 0.66rem; font-weight: 600; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
  .m-tabs a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .m-tabs a[aria-current="page"] { color: var(--a); background: color-mix(in srgb, var(--a) 14%, transparent); }
  .m-tabs a span { white-space: nowrap; }
  /* Rate e Music: ícones oficiais em cor única (seguem a cor da aba) */
  .m-tabs a svg.m-tab-brand { width: auto; height: 18px; fill: currentColor; stroke: none; }
  /* + no centro, elevado: avaliar uma música */
  .m-tabs a.m-tab-plus { justify-self: center; align-self: center; width: 58px; height: 58px; margin-top: -26px; padding: 0; gap: 0; border-radius: 50%; border: 4px solid var(--bg); background: var(--a); color: var(--on-a); box-shadow: 0 12px 30px color-mix(in srgb, var(--a) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: box-shadow 0.3s var(--ease); }
  .m-tabs a.m-tab-plus svg { width: 26px; height: 26px; stroke-width: 2.6; }
  .m-tabs a.m-tab-plus[aria-current="page"] { color: var(--on-a); background: var(--a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 35%, transparent), 0 12px 30px color-mix(in srgb, var(--a) 45%, transparent); }
  /* Sem o Musify Music: Rate · + · Space numa barra mais curta, centralizada */
  .m-tabs.m-tabs--trio { left: 0; right: 0; margin: 0 auto; width: min(320px, calc(100% - 20px)); grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr); }
  .m-consent { flex-direction: column; align-items: stretch; gap: 12px; }
  /* Botões empilhados na largura toda: lado a lado, "Permitir estatísticas" vazava da tela em celulares de até ~400px */
  .m-consent-actions { flex-direction: column; min-width: 0; }
  .m-consent-actions .m-btn { width: 100%; min-width: 0; }
  .m-sheet-wrap, .m-dialog-wrap { align-items: end; padding: 0; }
  .m-sheet, .m-dialog { width: 100%; border-radius: 28px 28px 0 0; padding-bottom: calc(26px + var(--safe-b)); max-height: 92dvh; translate: 0 40px; }

  /* Linha 1: logo + ícones (respeitando o notch). Linha 2: busca. Nada se sobrepõe */
  header { height: calc(var(--head-h) + var(--safe-t)); padding: var(--safe-t) 12px 0; gap: 8px; }
  header .brand { flex: none; min-width: 0; }
  header .brand .wordmark-svg { height: 22px; }
  header nav { gap: 4px; flex: none; }
  header nav #supportBtn, header nav #rateLink { display: none; }
  .login-pill-btn { padding: 0 4px; height: 40px; }
  .login-pill-btn .pf-text { display: none; }
  .ib { width: 38px; height: 38px; }
  .install-pill { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .install-pill span { display: none; }

  .library-sidebar { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(78dvh, 640px); border-radius: 28px 28px 0 0; padding: 16px 14px calc(16px + var(--safe-b)); align-items: stretch; translate: 0 105%; transition: translate 0.55s var(--ease); z-index: 700; }
  .library-sidebar.expanded { width: auto; translate: 0 0; }
  body.player-on .library-sidebar { bottom: 0; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 690; background: rgba(4, 6, 10, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease); }
  .sb-scrim.show { opacity: 1; pointer-events: auto; }

  .hero { top: 30%; width: calc(100% - 32px); }
  .hero-wm { height: 64px; }
  .search { top: 46%; width: calc(100% - 32px); }
  /* Fora da home, a busca vira uma segunda linha abaixo do cabeçalho: nada se sobrepõe */
  body:not([data-view="home"]) .search { top: calc(var(--head-h) + var(--safe-t) + 28px); left: 50%; transform: translate(-50%, -50%); width: calc(100% - 24px); max-width: 560px; height: 44px; }
  body:not([data-view="home"]) #status { top: calc(var(--head-h) + var(--safe-t) + 56px); }
  .artist { top: calc(122px + var(--safe-t)); max-width: calc(100% - 24px); }
  .artist h1 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .artist > div { min-width: 0; }

  #player { left: 8px; right: 8px; bottom: calc(var(--tabs-h) + 6px + var(--safe-b)); height: auto; padding: 10px 12px; grid-template-columns: 1fr; gap: 6px; border-radius: 20px; }
  #player .vol { display: none; }
  #player .np { min-width: 0; }

  #album { inset: calc(122px + var(--safe-t)) 12px calc(var(--tabs-h) + 150px) 12px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px; overflow-x: hidden; overflow-y: auto; align-items: start; justify-items: center; scrollbar-width: none; }
  #album::-webkit-scrollbar { display: none; }
  .rec { width: 180px; height: 180px; margin: 0 auto; }
  .cv { width: 180px; height: 180px; }
  .disc { width: 166px; height: 166px; left: 70px; top: 7px; }
  .plat { width: 58px; height: 58px; }
  .cap { width: 100%; text-align: center; margin-top: 12px; }
  .tracks { width: 100%; height: auto; min-height: 380px; justify-content: center; overflow: hidden; }
  /* Faixas centralizadas, sem a curva lateral do desktop e sem scroll horizontal */
  #list { width: min(420px, 100%); margin: 0 auto; }
  #list li { --x: 0px !important; left: 0; right: 0; padding: 0 12px; }
  #more { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .intro-logo { translate: none; scale: none; }
  .orb, .orb img, .orb i { animation: none !important; }
}

/* Radial Sound: a onda viva atrás da logo e dos álbuns */
/* Líquido e viscoso: gradientes sem contorno, desfoque alto e opacidade baixa */
#ripple { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 1; filter: blur(12px) saturate(1.2); transition: opacity 0.6s ease, filter 0.6s ease; }
body:not([data-view="home"]) #ripple { opacity: 0.3; filter: blur(20px); }
/* A capa só boia: deslocamento máx. 1.5px, escala 0.012 e brilho 0.03 */
.orb img, .orb i {
  translate: 0 calc(var(--wy, 0) * -1.5px);
  scale: calc(1 + var(--w, 0) * 0.012);
  opacity: calc((0.26 + (1 - var(--p, 1)) * 0.16 + var(--w, 0) * 0.03) * var(--fade, 1));
}

/* Logos provisórias até as oficiais ficarem prontas.
   Musify Music: selo "music" preenchido. Musify Rate: estrela + selo "rate" vazado */
/* Selo pequeno "MUSIC" ao lado da logo oficial, no cabeçalho do player */
.bp-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-family: "Montserrat", system-ui, sans-serif; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.16em; line-height: 1; text-transform: uppercase; }
.bp-tag--music { color: var(--on-a); background: var(--a); border: 2px solid var(--a); }
.brand .bp-tag--music { margin-left: 8px; }

/* ---------- Logos oficiais (SVG inline, temáveis via .svg-dark-part / .svg-accent-part) ---------- */
/* Logos full (marca + slogan no idioma atual). O espaço é reservado pela proporção do arquivo */
.logo-lockup { --ar: 1558.61 / 462.54; display: block; aspect-ratio: var(--ar); max-width: 100%; }
.logo-lockup[data-svg="logo-music-full.svg"] { --ar: 1558.61 / 468.6; }
.inline-logo-slot.logo-lockup svg { width: 100%; height: auto; max-width: none; display: block; }
/* Mesmo corpo do arquivo original (Montserrat SemiBold/Bold 55.88). Mais específico que .wordmark-svg text (style.css) */
.inline-logo-slot .logo-tagline { font-family: "Montserrat", system-ui, sans-serif; font-size: 55.88px; font-weight: 600; letter-spacing: 0; }
.inline-logo-slot .logo-tagline .svg-accent-part { font-weight: 700; }
.intro-logo.logo-lockup { width: min(680px, calc(100vw - 48px)); }
.rh-logo, #heroBox .logo-lockup { width: clamp(280px, 30vw, 380px); }
@media (max-width: 760px) { .rh-logo, #heroBox .logo-lockup { width: min(320px, calc(100vw - 64px)); } }
.rate-icon-wrap { display: inline-flex; }
.rate-icon-wrap svg { height: 24px; width: auto; display: block; }
.rt-brand { display: inline-flex; align-items: center; }
.rate-brand { display: inline-flex; border-radius: 8px; transition: opacity 0.25s var(--ease); }
.rate-brand:hover, .rate-brand:focus-visible { opacity: 0.82; outline: 0; }
.rate-brand .wordmark-svg { height: 28px; width: auto; display: block; }
.pill-logo { display: inline-flex; align-items: center; flex: none; }
/* Mais específico que .rate-pill-btn svg / #rateLink svg / .sp-nav .ib svg (caixa 20px fixa e contorno): a logo mantém proporção e não ganha traço */
.pill-logo svg,
.rate-pill-btn .pill-logo svg, .rate-pill-btn:hover .pill-logo svg,
#rateLink .pill-logo svg, #rateLink:hover .pill-logo svg,
.sp-nav .ib .pill-logo svg { height: 17px; width: auto; display: block; stroke: none; }

/* Conta Musify: modal Entrar / Criar conta (auth.js) */
.au-sheet { gap: 14px; }
.au-reason { padding: 10px 14px; border-radius: 14px; font-size: 0.84rem; line-height: 1.5; color: var(--tx); background: color-mix(in srgb, var(--a) 12%, transparent); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent); }
.m-field > label { font-size: 0.78rem; font-weight: 600; color: var(--mu); }
.m-at, .m-pass { display: flex; align-items: center; min-width: 0; border-radius: var(--r-sm); border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.05); transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.m-at:focus-within, .m-pass:focus-within { border-color: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.m-at b { padding-left: 14px; color: var(--mu); font-weight: 600; }
.m-field .m-at input, .m-field .m-pass input { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; }
.m-field .m-at input { padding-left: 4px; }
.m-pass-eye { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--mu); cursor: pointer; }
.m-pass-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-pass-eye[aria-pressed="true"] { color: var(--a); }
#auUserMsg.ok { color: #4ade80; }
#auUserMsg.bad { color: #ff8a8a; }
.au-terms { display: flex; align-items: flex-start; gap: 10px; font-size: 0.8rem; line-height: 1.5; color: var(--mu); cursor: pointer; }
.au-terms input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--a); }
.au-terms a, .au-foot a { color: var(--a); font-weight: 600; }
.au-ok { padding: 10px 14px; border-radius: 14px; font-size: 0.84rem; line-height: 1.5; color: var(--tx); background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.35); }
.au-ok[hidden] { display: none; }
.au-submit, .au-google { width: 100%; height: 48px; min-height: 48px; }
.au-submit { margin-top: 8px; }
.au-divider { margin: 4px 0; }
.au-google { margin-bottom: 4px; }
/* Botão oficial do Google (auth.js, GOOGLE_POPUP): centralizado, com a mesma altura do botão antigo */
.au-gis { display: flex; justify-content: center; min-width: 0; min-height: 44px; margin-bottom: 4px; color-scheme: normal; }
.au-gis[hidden] { display: none; }
.au-submit[aria-busy="true"] { opacity: 0.7; }
.au-google svg { width: 18px; height: 18px; stroke: none; }
.au-divider { display: flex; align-items: center; gap: 12px; font-size: 0.76rem; color: var(--mu); }
.au-divider::before, .au-divider::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.au-foot { font-size: 0.74rem; line-height: 1.5; color: var(--mu); text-align: center; }
.au-note { margin: -4px 0 0; font-size: 0.76rem; line-height: 1.5; color: var(--mu); }

/* Menu da conta no cabeçalho */
.acct-pop { width: 250px; top: 76px; right: clamp(16px, 2.5vw, 32px); padding: 8px; gap: 2px; z-index: 900; }
.acct-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--glass-line); }
.acct-head b { font-weight: 700; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-head small { font-size: 0.78rem; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-pop a, .acct-pop button { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--tx); font: inherit; font-size: 0.86rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background 0.2s var(--ease); }
.acct-pop a:hover, .acct-pop button:hover { background: rgba(255, 255, 255, 0.07); }
.acct-pop .danger { color: #ff8a8a; }

/* Links do rodapé: área de toque de 44px (recomendação da Apple) sem mudar o visual */
.rate-foot nav, .sp-foot nav { gap: 4px; flex-wrap: wrap; justify-content: center; }
.rate-foot nav a, .sp-foot nav a, .lg-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* Musify Music desligado em config.js (FEATURES.MUSIC): tudo marcado com [data-music] some */
html:not(.music-on) [data-music] { display: none !important; }

/* Abas segmentadas (Entrar / Criar conta, Rate / Space, Público / Privado): 44px de toque no celular */
@media (max-width: 760px) {
  .m-seg button { height: 44px; font-size: 0.9rem; }
}

/* ---------- Configurações (engrenagem): janela central, lista agrupada no estilo dos Ajustes do iPhone ---------- */
:root { --fill: rgba(255, 255, 255, 0.06); --fill-hi: rgba(255, 255, 255, 0.1); --sep: rgba(255, 255, 255, 0.08); }
html[data-scheme="light"] { --fill: rgba(10, 13, 18, 0.045); --fill-hi: rgba(10, 13, 18, 0.08); --sep: rgba(10, 13, 18, 0.08); }
.m-set-wrap { position: fixed; inset: 0; z-index: 850; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 10, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.28s var(--ease); }
html[data-scheme="light"] .m-set-wrap { background: rgba(10, 13, 18, 0.28); }
.m-set-wrap[hidden] { display: none; }
.m-set-wrap.show { opacity: 1; }
.m-set { width: min(440px, 100%); max-height: min(640px, calc(100dvh - 32px)); display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)), color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(34px) saturate(1.8); backdrop-filter: blur(34px) saturate(1.8); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-spec), 0 40px 90px rgba(0, 0, 0, 0.45); color: var(--tx); overflow: hidden; translate: 0 14px; scale: 0.97; transition: translate 0.5s var(--ease), scale 0.5s var(--ease); }
.m-set-wrap.show .m-set { translate: 0 0; scale: 1; }
.m-set:focus { outline: 0; }
.m-set-view { display: flex; flex-direction: column; min-height: 0; animation: setIn 0.38s var(--ease) both; }
.m-set-view.is-back { animation-name: setBack; }
.m-set-view[hidden] { display: none; }
@keyframes setIn { from { opacity: 0; translate: 24px 0; } }
@keyframes setBack { from { opacity: 0; translate: -24px 0; } }
.m-set-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; min-height: 60px; padding: 10px 12px 6px 20px; }
.m-set-head h2 { grid-column: 2; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; text-align: center; white-space: nowrap; }
.m-set-view[data-view="main"] .m-set-head h2 { grid-column: 1 / 3; text-align: left; font-size: 1.3rem; letter-spacing: -0.02em; }
.m-set-head .ib { grid-column: 3; justify-self: end; color: var(--mu); }
.m-set-head .ib:hover { background: var(--fill-hi); color: var(--tx); }
.m-set svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-set-back { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; min-height: 44px; margin-left: -10px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: var(--a); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.m-set-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-set-back svg { width: 20px; height: 20px; flex: none; }
.m-set-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 4px 16px 20px; overscroll-behavior: contain; }
.m-set-caption { display: block; margin: 10px 4px 0; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mu); }
.m-set-group { display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: var(--fill); overflow: hidden; }
.m-set-group + .m-set-group { margin-top: 10px; }
.m-set-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 52px; padding: 8px 14px; border: 0; background: none; color: var(--tx); font: inherit; font-size: 0.92rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background 0.2s var(--ease); }
.m-set-row[hidden] { display: none; }
.m-set-row:hover, .m-set-row:focus-visible { background: var(--fill-hi); outline: 0; }
/* Separador fino entre linhas visíveis, alinhado ao texto (como no iOS) */
.m-set-row ~ .m-set-row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--sep); }
.m-set-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--a) 16%, transparent); color: var(--a); }
.m-set-ico svg { width: 18px; height: 18px; }
.m-set-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-set-value { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--mu); font-size: 0.86rem; white-space: nowrap; }
.m-set-swatch i { width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.m-set-chev { display: grid; color: var(--mu); opacity: 0.7; }
.m-set-chev svg { width: 16px; height: 16px; }
.m-set-extra .danger { color: #ff8a8a; }
html[data-scheme="light"] .m-set-extra .danger { color: #d1343a; }
.m-set-check { display: grid; color: var(--a); opacity: 0; }
.m-set-check svg { width: 20px; height: 20px; stroke-width: 2.4; }
[aria-checked="true"] > .m-set-check { opacity: 1; }
.m-set-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.m-set-theme { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px 8px 10px; border-radius: 16px; border: 1.5px solid transparent; background: var(--fill); color: var(--tx); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.m-set-theme:hover { background: var(--fill-hi); }
.m-set-theme[aria-checked="true"] { border-color: var(--a); }
.m-set-preview { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 58px; padding: 10px; border-radius: 10px; background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.22); overflow: hidden; }
.m-set-preview i { position: absolute; top: 9px; right: 9px; width: 16px; height: 16px; border-radius: 50%; background: var(--sw-a); }
.m-set-preview b { display: block; height: 5px; width: 70%; border-radius: 4px; background: var(--sw-a); }
.m-set-preview b + b { width: 45%; opacity: 0.45; }
.m-set-color { cursor: default; }
.m-set-color:hover { background: none; }
.m-set-color input[type="color"] { width: 34px; height: 34px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.m-set-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.m-set-color input[type="color"]::-webkit-color-swatch { border: 2px solid var(--glass-line); border-radius: 50%; }
.m-set-color input[type="color"]::-moz-color-swatch { border: 2px solid var(--glass-line); border-radius: 50%; }
.m-set-note { margin: 4px 4px 0; font-size: 0.76rem; line-height: 1.5; color: var(--mu); }
@media (max-width: 760px) {
  .m-set-wrap { padding: 12px; }
  .m-set { max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - var(--safe-b)); }
  .m-set-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .m-set-view, .m-set { animation: none; transition: none; } }

/* ---------- Tema claro: tudo que estava fixo em branco segue o contraste do tema (--tx / --mu / --logo-main) ---------- */
.modal-top h2, .support-creator-box h4, .support-mail, .provider-btn strong, .secondary-pbtn, .login-form input,
.auth-brand-lockup, .auth-heading h2, .auth-switch-line .auth-link, .auth-phone-panel h3 { color: var(--tx); }
.modal-top p, .provider-btn .prov-status, .login-form h3, .support-pill, .support-content { color: var(--mu); }
.full-modal { background: color-mix(in srgb, var(--bg) 62%, transparent); }
html[data-scheme="light"] .modal-glass-card { border-color: var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-spec), var(--glass-shadow); }
html[data-scheme="light"] .support-creator-box, html[data-scheme="light"] .support-contact-box { background: var(--fill); border-color: var(--sep); }
html[data-scheme="light"] .m-btn:not(.primary):not(.danger), html[data-scheme="light"] .m-seg, html[data-scheme="light"] .m-at, html[data-scheme="light"] .m-pass { background: var(--fill); }
html[data-scheme="light"] .m-btn:not(.primary):not(.danger):hover, html[data-scheme="light"] .ib.sm:hover, html[data-scheme="light"] .acct-pop a:hover, html[data-scheme="light"] .acct-pop button:hover { background: var(--fill-hi); }
html[data-scheme="light"] .acct-pop .danger { color: #d1343a; }
html[data-scheme="light"] .m-set, html[data-scheme="light"] .m-dialog, html[data-scheme="light"] .m-sheet { box-shadow: inset 0 1px 0 var(--glass-spec), 0 30px 70px rgba(10, 13, 18, 0.18); }

/* ---------- Compartilhar nos stories (story.js) ---------- */
.row2 { flex-wrap: wrap; }
.st-open { height: 46px; }
.m-btn.st-open svg { width: 19px; height: 19px; }
.st-sheet { width: min(460px, 100%); gap: 14px; }
.st-sheet svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-preview { position: relative; display: grid; place-items: center; min-height: 0; height: min(44dvh, 420px); padding: 12px; border-radius: 20px; background: var(--fill); overflow: hidden; }
/* Xadrez discreto atrás do sticker, para mostrar que o fundo é transparente */
.st-preview[data-mode="sticker"] { background: repeating-conic-gradient(var(--fill-hi) 0 25%, transparent 0 50%) 0 0 / 22px 22px, var(--fill); }
/* A imagem ocupa a caixa inteira e encolhe proporcionalmente (a sombra segue só a parte visível) */
.st-preview img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35)); transition: opacity 0.25s var(--ease); }
.st-preview[data-mode="sticker"] img { filter: none; }
.st-preview img:not([src]) { display: none; }
.st-preview.loading img { opacity: 0.35; }
.st-spin { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill-hi); border-top-color: var(--a); opacity: 0; animation: stSpin 0.8s linear infinite; transition: opacity 0.2s; }
.st-preview.loading .st-spin { opacity: 1; }
@keyframes stSpin { to { rotate: 360deg; } }
.st-hint { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--mu); text-align: center; }
.st-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.st-actions .m-btn { flex: 1 1 140px; min-width: 0; }
.st-actions .m-btn.primary { flex-basis: 100%; }
.st-actions .m-btn[hidden] { display: none; }
@media (max-width: 760px) {
  .st-preview { height: min(44dvh, 400px); }
}
@media (prefers-reduced-motion: reduce) { .st-spin { animation-duration: 2s; } }
