/* Desvelo — Mini App. Mesma paleta e tipos do site público (site/assets/css/site.css). */

@font-face { font-family: "Lora"; src: url("/fonts/Lora-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-normal.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

/* Paleta escura: padrão e também a de áreas que ficam escuras nos dois temas (visualizador do card,
   barra do carrinho e selos sobre a arte). Nelas o texto sobre fundo escuro não pode virar tinta. */
:root, .viewer, .cartbar, .tile__qty, .tile__flags, .album__badge, .toast.is-error {
  --ink: #0b0b10;
  --ink-2: #101018;
  --surface: #15151d;
  --surface-2: #1c1c27;
  --line: #2a2a37;
  --ivory: #f3eee5;
  --muted: #a8a9b2;
  --faint: #6f7080;
  --wine: #c44f78;
  --rose: #f0a9c0;
  --gold: #f2c66d;
  --danger: #e0697a;
  --on-accent: #f3eee5;

  /* Vidro: preenchimento, borda, brilho especular e sombra. */
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(22, 20, 30, .58);
  --glass-line: rgba(255, 255, 255, .11);
  --glass-hi: rgba(255, 255, 255, .22);
  --glass-shade: rgba(0, 0, 0, .55);

  --r-common: #c9cad3;
  --r-uncommon: #7fd1a8;
  --r-rare: #7aa7ff;
  --r-epic: #b88cff;
  --r-legendary: #f2c66d;
  --r-birthday: #ff7fae;
  color: var(--ivory);
}

/* Tema claro: mesma base do site (desvelo.dev). "ivory" segue sendo a cor do texto e "ink" a do fundo,
   por isso as duas trocam de valor aqui. O JS (theme.js) define data-theme no <html>. */
:root[data-theme="light"] {
  --ink: #f7f3ec;
  --ink-2: #efe9de;
  --surface: #fffdf9;
  --surface-2: #ebe4d8;
  --line: #ddd5c6;
  --ivory: #1b1a21;
  --muted: #5f5a68;
  --faint: #8a8493;
  --wine: #c44f78;
  --rose: #b8526f;
  --gold: #8f6410;
  --danger: #c0392b;
  --on-accent: #fffdf9;

  --glass: rgba(255, 255, 255, .5);
  --glass-strong: rgba(255, 252, 247, .66);
  --glass-line: rgba(27, 26, 33, .09);
  --glass-hi: rgba(255, 255, 255, .95);
  --glass-shade: rgba(70, 45, 58, .22);

  --r-common: #7b7d89;
  --r-uncommon: #2e9467;
  --r-rare: #3a68cc;
  --r-epic: #7a4cc9;
  --r-legendary: #a67a14;
  --r-birthday: #d3427c;
  color-scheme: light;
}

:root {
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --gutter: 16px;
  /* Altura que a navegação flutuante ocupa no rodapé: 64 px da cápsula + 10 px de respiro. */
  --tabs-h: 74px;
  --blur: blur(24px) saturate(1.8);
  --r-card: 20px;
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  /* Movimento (docs/ANIMATION.md): o motion.js lê as durações daqui. */
  --dur-tap: 120ms;
  --dur-fast: 180ms;
  --dur-base: 350ms;
  --dur-morph: 450ms;
  --dur-roll: 500ms;
  --stagger: 40ms;
  --blur-in: 6px;
  --rise: 8px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: transparent; /* a tinta fica no <html>; aqui passaria por cima da aurora */
  color: var(--ivory);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
/* Aurora: manchas de cor vivas atrás de tudo, para o vidro ter o que refratar. Duas camadas
   andam em velocidades e sentidos diferentes; só transform anima (barato para a GPU). */
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(40% 30% at 76% 22%, color-mix(in srgb, var(--wine) 84%, transparent), transparent 70%),
    radial-gradient(36% 30% at 16% 46%, color-mix(in srgb, var(--r-epic) 70%, transparent), transparent 70%),
    radial-gradient(38% 28% at 58% 78%, color-mix(in srgb, var(--rose) 58%, transparent), transparent 70%);
}
body::after {
  background:
    radial-gradient(32% 24% at 30% 16%, color-mix(in srgb, var(--r-rare) 58%, transparent), transparent 70%),
    radial-gradient(32% 26% at 84% 58%, color-mix(in srgb, var(--gold) 38%, transparent), transparent 70%),
    radial-gradient(34% 26% at 34% 74%, color-mix(in srgb, var(--wine) 66%, transparent), transparent 70%);
}
:root[data-theme="light"] body::before { opacity: .95; }
:root[data-theme="light"] body::after { opacity: .8; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--wine); color: var(--ivory); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Estrutura ---------- */
.app { min-height: 100dvh; padding-bottom: calc(var(--tabs-h) + var(--safe-bottom) + 30px); }

.top {
  position: sticky; top: calc(var(--safe-top) + 8px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: calc(var(--safe-top) + 8px) 10px 0; padding: 7px 8px 7px 12px; border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 30%, transparent), transparent 55%), var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 34px -18px var(--glass-shade);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 28px; height: 28px; fill: var(--ivory); stroke: none; }
.mark .slit-path { fill: var(--wine); }
.who > div { min-width: 0; }
.who__name { margin: 0; font: 600 15.5px/1.15 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__title { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__title.is-vip { color: var(--gold); }

.wallet { display: flex; align-items: center; gap: 6px; flex: none; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; margin: 0; height: 34px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent);
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.pill b { color: var(--ivory); font-weight: 700; font-variant-numeric: tabular-nums; }
.pill--lume b { color: var(--gold); }
.pill--theme { width: 34px; padding: 0; justify-content: center; color: var(--ivory); cursor: pointer; transition: transform .35s var(--spring); }
.pill--theme:active { transform: scale(.9) rotate(-18deg); }
.pill--theme svg { width: 16px; height: 16px; color: var(--rose); }
/* O ícone mostra para onde o toque leva: sol no escuro, lua no claro. */
:root[data-theme="light"] .theme-sun, :root:not([data-theme="light"]) .theme-moon { display: none; }
.pill svg { width: 15px; height: 15px; }
.pill--lume svg { color: var(--gold); }
@media (max-width: 520px) {
  .pill__label { display: none; }
  .pill { padding: 0 10px; }
}

main { padding: 14px var(--gutter) 0; outline: none; }

/* Barra de abas minimalista: só a aba ativa mostra o nome. Cada aba tem um "peso" (@property, para
   poder animar): a ativa pesa --on, as outras 1. As colunas e a lente de vidro leem os mesmos
   pesos, então crescem juntas e a lente sempre cobre a aba ativa. */
@property --w1 { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --w2 { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --w3 { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --w4 { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --w5 { syntax: "<number>"; inherits: true; initial-value: 1; }
.tabs {
  --on: 1.4; --total: calc(4 + var(--on)); --lp: 0; --pad: 6px; /* a aba ativa pesa 1,4: cresce só um pouco */
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--safe-bottom) + 10px); transform: translateX(-50%);
  display: flex;
  width: min(430px, calc(100% - 24px)); height: 60px; padding: var(--pad); border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 34%, transparent), transparent 50%), var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(0, 0, 0, .14), 0 22px 44px -16px var(--glass-shade);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: --w1 .55s var(--spring), --w2 .55s var(--spring), --w3 .55s var(--spring), --w4 .55s var(--spring), --w5 .55s var(--spring);
}
/* A lente: uma gota de vidro que acompanha a aba ativa. */
.tabs::before {
  content: ""; position: absolute; top: var(--pad); bottom: var(--pad); left: var(--pad);
  width: calc((100% - 2 * var(--pad)) * var(--on) / var(--total)); border-radius: 999px;
  transform: translateX(calc(var(--lp) / var(--on) * 100%)); /* o deslocamento em % da própria largura da lente */
  background: linear-gradient(180deg, color-mix(in srgb, var(--ivory) 20%, transparent), color-mix(in srgb, var(--ivory) 8%, transparent));
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px color-mix(in srgb, var(--ivory) 10%, transparent), 0 6px 18px -8px color-mix(in srgb, var(--wine) 80%, transparent);
  transition: transform .55s var(--spring), opacity .3s; opacity: 0;
}
.tabs:has(button[aria-current="page"])::before { opacity: 1; }
.tabs:has(button:nth-child(1)[aria-current="page"]) { --w1: var(--on); --lp: 0; }
.tabs:has(button:nth-child(2)[aria-current="page"]) { --w2: var(--on); --lp: 1; }
.tabs:has(button:nth-child(3)[aria-current="page"]) { --w3: var(--on); --lp: 2; }
.tabs:has(button:nth-child(4)[aria-current="page"]) { --w4: var(--on); --lp: 3; }
.tabs:has(button:nth-child(5)[aria-current="page"]) { --w5: var(--on); --lp: 4; }
.tabs button {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  transition: color .3s, transform .35s var(--spring);
}
.tabs button:nth-child(1) { flex: var(--w1) 1 0; }
.tabs button:nth-child(2) { flex: var(--w2) 1 0; }
.tabs button:nth-child(3) { flex: var(--w3) 1 0; }
.tabs button:nth-child(4) { flex: var(--w4) 1 0; }
.tabs button:nth-child(5) { flex: var(--w5) 1 0; }
.tabs button svg { width: 23px; height: 23px; flex: none; transition: transform .45s var(--spring); }
.tabs button:active { transform: scale(.92); }
.tabs button span { max-height: 0; margin-top: 0; opacity: 0; overflow: hidden; line-height: 13px; white-space: nowrap; transition: max-height .4s var(--ease), margin-top .4s var(--ease), opacity .3s; }
.tabs button[aria-current="page"] svg { transform: translateY(-1px) scale(1.04); color: var(--rose); }
.tabs button[aria-current="page"] span { max-height: 13px; margin-top: 2px; opacity: 1; transition-delay: 0s, 0s, .12s; }
.tabs button[aria-current="page"] { color: var(--ivory); }
/* Sem :has (WebView antiga), a aba ativa ganha o próprio fundo no lugar da lente. */
@supports not selector(:has(*)) {
  .tabs::before { display: none; }
  .tabs button[aria-current="page"] { background: color-mix(in srgb, var(--ivory) 12%, transparent); }
}
/* Ponto na aba Mercado: anúncio da pessoa vencendo em breve (state.me.market.expiring_soon) */
.tabs__dot { display: none; position: absolute; top: 9px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px var(--ink), 0 0 10px var(--rose); }
.tabs button.has-dot .tabs__dot { display: block; }

/* ---------- Títulos de tela ---------- */
/* A entrada anima os filhos da tela, nunca a <section> nem o painel de filtros. Animar a seção
   (1) a deixa "transformada" e prende os painéis fixos de dentro dela, e (2) faz a tela inteira
   piscar de novo sempre que a animação é religada (era a "esmaecida" ao fechar o painel). */
.screen > :not(.filters) { animation: screen-in .5s var(--ease) backwards; }
@keyframes screen-in { from { opacity: 0; filter: blur(var(--blur-in)); transform: translateY(var(--rise)); } }
.head { margin: 14px 2px 18px; }
.head__title { margin: 0; font: 400 clamp(2.4rem, 11vw, 3.6rem)/.95 var(--serif); letter-spacing: -.02em; }
.head__line { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.head__line b { color: var(--ivory); font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { position: relative; display: block; height: 6px; margin-top: 14px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); overflow: hidden; }
.meter span { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--wine), var(--rose)); box-shadow: 0 0 14px color-mix(in srgb, var(--rose) 60%, transparent); transition: width .9s var(--ease); }

/* ---------- Filtros ---------- */
.filters {
  position: sticky; top: calc(var(--safe-top) + 68px); z-index: 20; margin: 0 -6px 16px; padding: 10px; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 22%, transparent), transparent 45%), var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 36px -22px var(--glass-shade);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
/* O respiro vertical deixa a sombra do chip ativo aparecer (a rolagem horizontal corta o que sai). */
.filters .seg { margin-inline: -10px; padding: 4px 10px; margin-block: -4px; }
.filters .rarities { margin-top: 6px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.seg::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: var(--glass); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 55%, transparent);
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--spring);
}
.chip:active { transform: scale(.94); }
/* P8: pílula que desliza entre os chips (motion.js). O chip de destino fica sem fundo enquanto ela chega. */
.seg { position: relative; }
.seg .chip { position: relative; z-index: 1; }
.seg__pill { position: absolute; z-index: 0; pointer-events: none; box-sizing: border-box; transform-origin: left center; }
.chip.is-arriving { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.chip[aria-pressed="true"] { background: var(--ivory); border-color: var(--ivory); color: var(--ink); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--ivory) 70%, transparent); }
.chip--rarity { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; }
.chip--rarity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.chip--rarity[aria-pressed="true"] { background: color-mix(in srgb, var(--rc) 22%, transparent); border-color: color-mix(in srgb, var(--rc) 75%, transparent); color: var(--ivory); box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 22px -10px var(--rc); }
.searchrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search input, .select {
  width: 100%; height: 42px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 45%, transparent);
  color: var(--ivory); font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.search input { padding: 0 12px 0 38px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus, .select:focus { border-color: color-mix(in srgb, var(--rose) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 14%, transparent); }
.select { max-width: 42vw; padding: 0 30px 0 12px; -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.rarities { margin-top: 10px; }
.select option { background: var(--surface); color: var(--ivory); }

/* ---------- Grade de cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.tile {
  --rc: var(--r-common);
  position: relative; display: block; padding: 0; border: 0; background: none; text-align: left;
  -webkit-user-select: none; user-select: none;
  animation: tile-in .55s var(--ease) both; animation-delay: calc(var(--n, 0) * 28ms);
}
/* Entrada com desfoque (ANIMATION.md, princípio 4); 4 px nos tiles porque são muitos ao mesmo tempo. */
@keyframes tile-in { from { opacity: 0; filter: blur(4px); transform: translateY(var(--rise)) scale(.97); } }
.tile__art {
  position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  background: var(--glass);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 26%, transparent), 0 16px 28px -18px var(--glass-shade);
  transition: transform .4s var(--spring), box-shadow .35s var(--ease);
}
.tile__art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.tile__art img.is-loaded { opacity: 1; }
.tile:active .tile__art { transform: scale(.95); }
@media (hover: hover) {
  .tile:hover .tile__art { transform: translateY(-3px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent), 0 18px 34px -16px color-mix(in srgb, var(--rc) 45%, transparent); }
}
.tile[data-rarity="epic"] .tile__art, .tile[data-rarity="legendary"] .tile__art, .tile[data-rarity="birthday"] .tile__art { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent), 0 10px 30px -14px color-mix(in srgb, var(--rc) 55%, transparent); }
.tile__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 8px; padding: 0 2px; }
.tile__name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__id { flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tile__qty {
  position: absolute; right: 5px; bottom: 5px; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: rgba(14, 12, 20, .55); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px) saturate(1.6); -webkit-backdrop-filter: blur(8px) saturate(1.6);
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums;
}
.tile__new {
  position: absolute; right: 5px; top: 5px; padding: 0 6px; border-radius: 999px; height: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wine) 82%, #fff), var(--wine)); color: var(--on-accent);
  font-size: 8.5px; font-weight: 800; letter-spacing: .06em; line-height: 16px; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -4px rgba(196, 79, 120, .8);
}
.tile__flags { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.tile__flags svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 72%, transparent); }
.tile__flags .is-fav { color: var(--gold); fill: var(--gold); }
.tile__flags .is-wish { color: var(--rose); fill: var(--rose); }
.tile__flags .is-lock { color: var(--ivory); }
.tile.is-missing .tile__art img { filter: grayscale(1) brightness(.42) contrast(.9); }
.tile.is-missing .tile__art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ivory) 6%, transparent); background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--ivory) 2.5%, transparent) 7px 8px); }
.tile.is-missing .tile__name { color: var(--muted); }

.sentinel { height: 1px; }
.loading-row { display: flex; justify-content: center; padding: 22px 0; }
.spinner { width: 2px; height: 26px; border-radius: 2px; background: var(--rose); box-shadow: 0 0 14px 3px rgba(240, 169, 192, .5); animation: breathe 1.1s var(--ease-in-out) infinite alternate; }
@keyframes breathe { from { transform: scaleY(.35); opacity: .45; } to { transform: scaleY(1); opacity: 1; } }

.skeleton .tile__art { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton .tile__meta span { display: block; height: 10px; width: 70%; border-radius: 4px; background: var(--surface-2); }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- Vazio e erro ---------- */
.empty { padding: 48px 12px 24px; text-align: center; color: var(--muted); }
.empty__title { margin: 0 0 8px; color: var(--ivory); font: 400 22px/1.2 var(--serif); }
.empty p { margin: 0 auto; max-width: 32ch; font-size: 14px; }
.empty .button { margin-top: 18px; }
.empty__slit { display: block; width: 2px; height: 46px; margin: 0 auto 22px; border-radius: 2px; background: linear-gradient(transparent, var(--rose), transparent); box-shadow: 0 0 18px 3px rgba(196, 79, 120, .45); }

/* ---------- Botões ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ivory) 86%, #fff), var(--ivory)); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 12px 26px -14px color-mix(in srgb, var(--ivory) 80%, transparent);
  font-size: 14.5px; font-weight: 700; white-space: nowrap; transition: transform .35s var(--spring), background .25s, opacity .2s;
}
.button:active { transform: scale(.95); }
.button:disabled { opacity: .45; }
.button--ghost { background: var(--glass); color: var(--ivory); border-color: var(--glass-line); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent); }
.button--rose { background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 80%, #fff) -20%, var(--wine)); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 32px -12px rgba(196, 79, 120, .85); }
.button--small { height: 38px; padding: 0 16px; font-size: 13px; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass-strong); color: var(--ivory); box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 22px -12px var(--glass-shade); backdrop-filter: blur(12px) saturate(1.6); -webkit-backdrop-filter: blur(12px) saturate(1.6); transition: transform .35s var(--spring); }
.icon-button:active { transform: scale(.9); }

/* ---------- Visualizador: o card sai do tile tocado e volta para ele (movimento no app.js) ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
/* Sem backdrop-filter: com o véu quase opaco o desfoque não aparecia, e no Android ele era
   recalculado a cada quadro do fade, o que travava a abertura e o fechamento.
   A transição da regra base vale para o fechamento; a de .is-open, para a abertura. */
.viewer__veil { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 35%, rgba(60, 22, 38, .96), rgba(8, 8, 12, .985) 70%); opacity: 0; transition: opacity .3s var(--ease-in-out); }
.viewer.is-open .viewer__veil { opacity: 1; transition: opacity .3s var(--ease); }
.viewer__close { position: absolute; z-index: 3; top: calc(var(--safe-top) + 12px); right: var(--gutter); opacity: 0; transition: opacity .14s linear; }
.viewer.is-open .viewer__close { opacity: 1; transition: opacity .3s .2s; }
.viewer__stage {
  position: relative; z-index: 1; display: grid; place-items: center; min-height: 0;
  padding: calc(var(--safe-top) + 64px) 28px 8px; perspective: 1200px; touch-action: pan-y;
}
.viewer__card { align-self: stretch; justify-self: stretch; display: grid; place-items: center; min-height: 0; will-change: transform; }
/* A inclinação em 3D e o brilho só existem com o card parado: durante o movimento ele é uma
   camada plana, que a GPU só reposiciona, sem redesenhar. */
.viewer.is-settled .viewer__card { transform-style: preserve-3d; }
.viewer:not(.is-settled) .holo__foil, .viewer:not(.is-settled) .holo__glare { visibility: hidden; }
/* Uma animação, e não uma transition: depois dela a opacidade volta a seguir a inclinação sem atraso. */
.viewer.is-settled .holo__foil, .viewer.is-settled .holo__glare { animation: foil-in .45s var(--ease) backwards; }
@keyframes foil-in { from { opacity: 0; } }

.holo {
  --rc: var(--r-common); --foil: 0; --hover: 0;
  position: relative; margin: 0; height: min(100%, 560px); max-width: 100%; aspect-ratio: 2 / 3; border-radius: 4.6% / 3.1%; overflow: hidden;
  background: var(--surface-2);
  /* A inclinação é escrita pelo script a cada quadro: nada de transition em transform aqui. */
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow .5s var(--ease);
  box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--rc) 60%, transparent), 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent);
}
.holo img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.holo img.is-swapping { animation: swap .4s var(--ease); }
@keyframes swap { from { opacity: .2; transform: scale(.97); } }
/* As camadas de brilho são maiores que a carta e andam por transform (o script move cada uma);
   a carta, cortada pelo overflow, nunca mostra a borda delas. */
.holo__foil, .holo__glare { position: absolute; inset: -40%; pointer-events: none; will-change: transform; }
.holo__foil {
  opacity: calc(var(--foil) * (.2 + var(--hover) * .8)); mix-blend-mode: color-dodge;
  background:
    repeating-linear-gradient(115deg, transparent 0 6%, rgba(255, 255, 255, .06) 7% 8%, transparent 9% 14%),
    linear-gradient(115deg, transparent 18%, rgba(240, 169, 192, .55) 32%, rgba(242, 198, 109, .5) 44%, rgba(122, 167, 255, .45) 56%, rgba(184, 140, 255, .5) 68%, transparent 82%);
  background-size: 100% 100%, 139% 139%;
  background-position: center;
}
.holo__glare { opacity: calc(var(--hover) * .5); mix-blend-mode: overlay; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .45), rgba(255, 255, 255, .08) 16%, transparent 31%); }
.holo[data-rarity="uncommon"] { --rc: var(--r-uncommon); --foil: .15; }
.holo[data-rarity="rare"] { --rc: var(--r-rare); --foil: .22; }
.holo[data-rarity="epic"] { --rc: var(--r-epic); --foil: .3; }
.holo[data-rarity="legendary"] { --rc: var(--r-legendary); --foil: .4; }
.holo[data-rarity="birthday"] { --rc: var(--r-birthday); --foil: .45; }
.holo.is-missing img { filter: grayscale(1) brightness(.5); }

.viewer__info {
  position: relative; z-index: 2; padding: 14px var(--gutter) calc(var(--safe-bottom) + 18px); text-align: center;
  opacity: 0; transform: translateY(10px); transition: opacity .14s linear, transform 0s .14s;
}
.viewer.is-open .viewer__info { opacity: 1; transform: none; transition: opacity .3s var(--ease) .16s, transform .4s var(--ease) .16s; }
.rarity-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--rc, var(--muted)); }
.viewer__idol { margin: 4px 0 0; font: 400 clamp(2rem, 9vw, 2.8rem)/1 var(--serif); letter-spacing: -.02em; }
.viewer__sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.viewer__copies { margin: 4px 0 0; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.act {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px; min-width: 64px; padding: 11px 8px 9px;
  border-radius: 20px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent);
  font-size: 11.5px; font-weight: 600; transition: color .2s, border-color .2s, background .2s, transform .35s var(--spring);
}
.act:active { transform: scale(.92); }
.act svg { width: 21px; height: 21px; }
.act[aria-pressed="true"] { color: var(--ivory); border-color: color-mix(in srgb, var(--rose) 50%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 22%, transparent), color-mix(in srgb, var(--wine) 18%, transparent)); box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 24px -12px var(--wine); }
.act[aria-pressed="true"][data-act="favorite"] svg { color: var(--gold); fill: var(--gold); }
.act[aria-pressed="true"][data-act="wish"] svg { color: var(--rose); fill: var(--rose); }
.act[aria-pressed="true"][data-act="showcase"] svg { color: var(--rose); }
.act:disabled { opacity: .4; }
.viewer__nav { display: none; }
.viewer__hint { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); }

/* ---------- Álbuns: a capa se desvela conforme a coleção avança ---------- */
.albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.album { --p: 0; position: relative; display: block; padding: 0; border: 0; background: none; text-align: left; animation: tile-in .55s var(--ease) both; animation-delay: calc(var(--n, 0) * 30ms); }
.album__cover { position: relative; display: block; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--glass-line), 0 20px 34px -22px var(--glass-shade); }
.album__cover img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.12);
  filter: grayscale(calc(1 - var(--p)));
  opacity: 0; transition: opacity .6s var(--ease), filter .8s var(--ease), transform .8s var(--ease);
}
.album__cover img.is-loaded { opacity: 1; }
.album.is-complete .album__cover img { transform: none; }
.album__cover::after {
  content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 2px; border-radius: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--rose) 20%, #fff 50%, var(--rose) 80%, transparent);
  box-shadow: 0 0 16px 3px rgba(240, 169, 192, .55); opacity: calc(.15 + var(--p) * .7);
}
.album.is-complete .album__cover::after { display: none; }
.album__badge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: color-mix(in srgb, var(--ink) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 11px; font-weight: 700; }
.album__badge--goal { color: var(--rose); }
.album__badge--done { color: var(--gold); }
.album__era { margin: 10px 2px 0; font: 500 16px/1.15 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album__group { margin: 2px 2px 0; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; }
.album__group b { color: var(--ivory); font-variant-numeric: tabular-nums; font-weight: 700; }
.album__meter { display: block; height: 4px; margin: 8px 2px 0; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); overflow: hidden; }
.album__meter span { display: block; height: 100%; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--wine), var(--rose)); }
.album.is-complete .album__meter span { background: var(--gold); }

.album-hero { position: relative; margin: 0 calc(var(--gutter) * -1) 18px; padding: 0 var(--gutter); }
.album-hero__back { margin: 4px 0 14px; }
.album-hero__cover { --p: 0; position: relative; max-width: 420px; aspect-ratio: 1; margin: 0 auto; border-radius: 30px; overflow: hidden; background: var(--surface-2); box-shadow: 0 30px 70px -30px rgba(196, 79, 120, .55); }
.album-hero__cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(calc(1 - var(--p))); transform: scale(calc(1.12 - var(--p) * .12)); transition: filter 1.2s var(--ease), transform 1.2s var(--ease); }
.album-hero__text { margin-top: 16px; text-align: center; }
.album-hero__era { margin: 0; font: 400 clamp(2rem, 9vw, 3rem)/1 var(--serif); letter-spacing: -.02em; }
.album-hero__group { margin: 6px 0 0; color: var(--muted); }
.album-hero__actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }

/* ---------- Top ---------- */
.chip--quiet[aria-pressed="true"] { background: color-mix(in srgb, var(--ivory) 10%, transparent); border-color: color-mix(in srgb, var(--ivory) 40%, transparent); color: var(--ivory); }
.top-picker { display: grid; gap: 10px; margin: -4px 0 18px; }
.top-picker:empty { display: none; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-list { display: grid; gap: 6px; }
.pick-list:empty { display: none; }
.pick { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); text-align: left; }
.pick[aria-current="true"] { border-color: rgba(240, 169, 192, .45); }
.pick__name { font-weight: 700; }
.pick__sub { flex: none; font-size: 12.5px; color: var(--muted); }
.grid--small { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.grid--small:empty { display: none; }
.grid--small .tile__name { font-weight: 600; font-size: 11.5px; color: var(--muted); }

.board__head { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.board__card { --rc: var(--r-common); flex: none; width: 58px; padding: 0; border: 0; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent), 0 12px 26px -14px color-mix(in srgb, var(--rc) 60%, transparent); }
.board__card--album { width: 64px; aspect-ratio: 1; }
.board__card img { width: 100%; height: 100%; object-fit: cover; }
.board__title { margin: 0; font: 400 clamp(1.7rem, 7.5vw, 2.3rem)/1.05 var(--serif); letter-spacing: -.015em; }
.board__sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.board__note { margin: 14px 0 0; font-size: 13px; color: var(--faint); text-align: center; }
.ranks { margin: 0; padding: 4px 12px; list-style: none; border-radius: 24px; border: 1px solid var(--glass-line); background: linear-gradient(170deg, color-mix(in srgb, var(--glass-hi) 16%, transparent), transparent 30%), var(--glass); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent), 0 18px 36px -24px var(--glass-shade); }
.ranks .rank:last-child { border-bottom: 0; }
.ranks--me { margin-top: 14px; }
.ranks--me::before { content: none; }
.rank {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 54px; padding: 8px 4px; border-bottom: 1px solid var(--glass-line);
  animation: tile-in .45s var(--ease) both; animation-delay: calc(var(--n, 0) * 35ms);
}
.rank__pos { font: 400 22px/1 var(--serif); color: var(--faint); font-variant-numeric: tabular-nums; text-align: center; }
.rank__name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__you { flex: none; padding: 2px 8px; border-radius: 999px; background: rgba(196, 79, 120, .22); color: var(--rose); font-size: 11px; font-weight: 700; }
.rank__count { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank__count b { color: var(--ivory); font-weight: 800; }
.rank--1, .rank--2, .rank--3 { min-height: 64px; }
.rank--1 .rank__pos, .rank--2 .rank__pos, .rank--3 .rank__pos { font-size: 34px; }
.rank--1 .rank__pos { color: var(--gold); text-shadow: 0 0 18px rgba(242, 198, 109, .45); }
.rank--2 .rank__pos { color: var(--r-common); }
.rank--3 .rank__pos { color: var(--rose); }
.rank--1 .rank__name { font-size: 16px; }
.rank.is-me { margin: 4px -6px; padding-inline: 10px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 16%, transparent), color-mix(in srgb, var(--wine) 12%, transparent)); box-shadow: inset 0 1px 0 var(--glass-hi); }
.rank__link { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__link:hover, .rank__link:focus-visible { color: var(--rose); }
.player-search { display: grid; gap: 8px; margin: 0 0 18px; }
.player-search .pick-list:empty { display: none; }
.player-top { margin: 4px 0 6px; }

/* Marcação de quem é do staff: pílula rosa, igual para os quatro integrantes */
.staff { display: inline-flex; align-items: center; margin-right: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rose) 45%, transparent); background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); font-size: 11px; font-weight: 700; letter-spacing: .03em; vertical-align: middle; white-space: nowrap; }
.staff--mark { margin: 0 0 0 6px; padding: 1px 7px; font-size: 10px; }

/* ---------- Mercado ---------- */
/* Mercado denso: três anúncios por linha (dois em "Meus anúncios", que têm mais ações). Arte em
   cima, nome, preço e uma ação; o vendedor é um link pequeno no pé do cartão. */
.listings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.listings--mine { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.listing {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px 6px 8px; border-radius: 16px;
  animation: tile-in .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 30ms);
}
.listing__art { --rc: var(--r-common); position: relative; width: 100%; padding: 0; border: 0; background: none; border-radius: 11px; overflow: hidden; aspect-ratio: 2 / 3; box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent), 0 8px 18px -12px var(--rc); }
.listing__art img { width: 100%; height: 100%; object-fit: cover; }
.listing__qty { position: absolute; top: 5px; right: 5px; padding: 2px 7px; border-radius: 999px; background: rgba(10, 10, 14, .62); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.listing__text { min-width: 0; padding: 0 3px; }
.listing__idol { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing__sub { margin: 1px 0 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing__price { margin: 4px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.listing__price b { color: var(--gold); font-size: 14px; font-weight: 800; }
.listing.is-own { border-color: color-mix(in srgb, var(--rose) 36%, transparent); }

/* ---------- Perfil ---------- */
.showcase { --rc: var(--r-common); position: relative; padding: 0; border: 0; background: var(--surface-2); aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -22px color-mix(in srgb, var(--rc) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--rc) 40%, transparent); transform: rotate(-3deg); }
.showcase img { width: 100%; height: 100%; object-fit: cover; }
.showcase--empty { display: grid; place-items: center; padding: 10px; color: var(--faint); font-size: 12px; text-align: center; transform: none; border: 1px dashed var(--glass-line); border-radius: 18px; background: transparent; box-shadow: none; }
.block { margin: 0 0 22px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.block__title { margin: 0; font: 500 21px/1.2 var(--serif); letter-spacing: -.01em; }
.block__aside { margin: 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.block__text { margin: 0; color: var(--muted); font-size: 14px; }
.block__actions { display: flex; align-items: center; gap: 10px; }
.row-toggle { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: inherit; font-size: 12px; font-weight: 600; }
.goal { display: block; width: 100%; padding: 0; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); text-align: left; }
.goal__cover { --p: 0; display: block; aspect-ratio: 16 / 7; overflow: hidden; background: var(--surface-2); }
.goal__body { display: block; padding: 12px 16px 16px; }
.goal__cover img { width: 100%; height: 100%; object-fit: cover; filter: blur(calc((1 - var(--p)) * 6px)) saturate(calc(.15 + var(--p) * .85)); transform: scale(1.1); }
.goal__era { margin: 0; font: 500 20px/1.2 var(--serif); }
.goal__sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.goal .meter { margin-top: 9px; }

.vip { position: relative; padding: 16px; border-radius: 24px; box-shadow: inset 0 1px 0 var(--glass-hi); overflow: hidden; border: 1px solid rgba(242, 198, 109, .22); background: radial-gradient(120% 140% at 100% 0%, rgba(242, 198, 109, .12), transparent 55%), color-mix(in srgb, var(--surface) 70%, transparent); }
.vip.is-off { border-color: var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.vip__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vip__level { margin: 0; font: 400 24px/1 var(--serif); }
.vip__level span { color: var(--gold); }
.vip.is-off .vip__level span { color: var(--muted); }
.pips { display: flex; gap: 5px; }
.pips i { width: 22px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.pips i.is-on { background: var(--gold); box-shadow: 0 0 10px rgba(242, 198, 109, .6); }
.vip__list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.vip__list li { display: flex; gap: 8px; }
.vip__list li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 8px; border-radius: 50%; background: var(--gold); }
.vip__next { margin: 12px 0 0; font-size: 13px; color: var(--faint); }

.sig-order { row-gap: 12px; }
.sig-order__cell { display: grid; gap: 4px; }
.sig-order__arrows { display: flex; justify-content: center; gap: 4px; }
.sig-order__move { width: 26px; height: 22px; padding: 0; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: inherit; font-size: 10px; line-height: 1; }
.sig-order__move:active { transform: scale(.96); }
.sig-order__move:disabled { opacity: .3; }
.row-toggle--primary { background: var(--ivory); color: var(--ink, #0b0b10); border-color: transparent; }
.wish-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wish-grid .tile__meta { display: none; }
.wish-slot { aspect-ratio: 2 / 3; border-radius: 12px; border: 1px dashed var(--glass-line); }

/* ---------- Folha de anúncio ---------- */
.sheet {
  width: min(520px, calc(100% - 16px)); max-width: calc(100% - 16px); margin: auto auto calc(var(--safe-bottom) + 8px); padding: 0; border-radius: 32px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 20%, transparent), transparent 22%), color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--ivory); box-shadow: inset 0 1px 0 var(--glass-hi), 0 -20px 70px rgba(0, 0, 0, .5);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.sheet::backdrop { background: rgba(5, 5, 8, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in .5s var(--ease); }
/* Aberta pelo motion.js: ele faz o morph a partir do botão tocado (P1), sem a animação do CSS. */
.sheet.is-morph[open] { animation: none; }
.sheet[open]::backdrop { animation: fade-in var(--dur-base) var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(calc(100% + 24px)); } }
.sheet__body { position: relative; padding: 30px 18px 18px; }
/* Alça: a folha parece um painel que se puxa. */
.sheet__body::before { content: ""; position: absolute; top: 10px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 999px; background: color-mix(in srgb, var(--ivory) 22%, transparent); }
.sheet__title { margin: 0; font: 400 26px/1.1 var(--serif); letter-spacing: -.02em; }
.sheet__lede { margin: 6px 0 18px; color: var(--muted); font-size: 14px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.field__label { font-size: 14px; color: var(--muted); }
.field__value { font-size: 17px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.field input { width: 120px; height: 44px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
.field input:focus { border-color: rgba(240, 169, 192, .5); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent); font-size: 18px; transition: transform .3s var(--spring); }
.stepper button:active { transform: scale(.9); }
.stepper output { min-width: 36px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.discounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; }
.discounts .chip { justify-content: center; padding: 0 6px; }
.sheet__total { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.sheet__total b { color: var(--gold); }
.sheet__note { margin: 6px 0 0; font-size: 12.5px; color: var(--faint); }
.sheet__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 20px; }

/* ---------- Título do perfil ---------- */
.title-change { display: inline-flex; align-items: center; margin-left: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted); font-size: 12px; font-weight: 600; vertical-align: middle; }
.title-change:hover, .title-change:focus-visible { color: var(--ivory); border-color: color-mix(in srgb, var(--ivory) 45%, transparent); }
.title-list { display: grid; gap: 8px; margin: 16px 0 0; }
.title-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--ivory); font: inherit; font-weight: 600; text-align: left; }
.title-option.is-selected { border-color: rgba(240, 169, 192, .45); }
.title-option__mark { flex: none; font-size: 12px; color: var(--rose); font-weight: 700; }
.title-close { width: 100%; margin-top: 16px; }
.group-list { max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.group-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 8px 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.group-pick__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 14px);
  max-width: min(420px, calc(100% - 32px)); padding: 12px 20px; border-radius: 999px;
  background: color-mix(in srgb, var(--ivory) 90%, transparent); color: var(--ink); font-size: 13.5px; font-weight: 600; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 18px 40px -12px rgba(0, 0, 0, .7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .45s var(--ease), opacity .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: rgba(58, 22, 36, .88); color: var(--ivory); border: 1px solid rgba(240, 169, 192, .3); }

/* ---------- Telas grandes: Telegram Desktop e navegador ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
  .albums { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 18px; }
  .wish-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .listings { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
  .listings--mine { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .grid--small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .board, .top-picker { max-width: 760px; }
  .passport__top { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
  .passport__top--solo { grid-template-columns: minmax(0, 1fr); }
  .passport { padding: 26px 28px 22px; }
}
@media (min-width: 1000px) {
  .app { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; padding-bottom: 40px; }
  .top { grid-column: 1 / -1; margin-inline: 20px; padding-inline: 18px 10px; }
  main { grid-column: 2; max-width: 1240px; width: 100%; padding: 6px 40px 0 12px; }
  .tabs {
    position: sticky; top: 84px; left: auto; bottom: auto; transform: none; grid-column: 1; grid-row: 2; align-self: start;
    display: flex; flex-direction: column; gap: 4px; width: auto; height: auto; margin: 12px 14px 0 20px; padding: 10px; border-radius: 26px;
  }
  .tabs::before { display: none; }
  .tabs button:nth-child(n) { flex: none; }
  .tabs button span { max-height: none; margin: 0; opacity: 1; }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 14px; border-radius: 16px; font-size: 14.5px; }
  .tabs button[aria-current="page"] { color: var(--ivory); background: linear-gradient(180deg, color-mix(in srgb, var(--ivory) 16%, transparent), color-mix(in srgb, var(--ivory) 7%, transparent)); box-shadow: inset 0 1px 0 var(--glass-hi); }
  .tabs__dot { position: static; margin-left: auto; }
  .filters { top: 78px; margin-inline: 0; }
  .seg { margin-inline: 0; padding-inline: 0; }
  .filters .seg { margin-inline: -10px; padding-inline: 10px; }
  .toast { bottom: 28px; }
  /* No desktop o visualizador vira palco + painel lateral */
  .viewer { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); grid-template-rows: 1fr; padding-inline: max(24px, calc((100vw - 1180px) / 2)); }
  .viewer__stage { padding: 64px 40px; }
  .viewer__info { align-self: center; text-align: left; padding: 0 56px 0 0; }
  .viewer__info .actions { justify-content: flex-start; }
  .viewer__nav { display: flex; gap: 8px; margin-top: 22px; }
  .sheet { margin: auto; }
  .sheet[open] { animation: sheet-pop .35s var(--ease); }
  @keyframes sheet-pop { from { transform: translateY(16px) scale(.98); opacity: 0; } }
}

/* Movimento reduzido: sem deslocamento nem desfoque, só fade curto (ANIMATION.md, seção 5).
   As animações que se movem usam --rise e --blur-in; o motion.js não anima nada neste modo. */
@media (prefers-reduced-motion: reduce) {
  :root { --rise: 0px; --blur-in: 0px; }
  *, *::before, *::after { animation-duration: var(--dur-fast) !important; animation-delay: 0ms !important; transition-duration: var(--dur-fast) !important; transition-delay: 0ms !important; }
  @keyframes tile-in { from { opacity: 0; } }
  @keyframes sheet-in { from { opacity: 0; } }
  @keyframes sheet-pop { from { opacity: 0; } }
  .roll__s { transition: none !important; }
}

/* Anúncio: ações à direita e vendedor no rodapé, em largura total. */
.listing__actions { display: flex; flex-direction: column; gap: 5px; }
.listing .button--small { width: 100%; height: 32px; padding: 0 8px; font-size: 12px; }
/* Seus anúncios na grade de 3: três ícones lado a lado; em "Meus anúncios" (2 colunas) vêm com texto. */
.listings:not(.listings--mine) .listing__actions { flex-direction: row; }
.listings:not(.listings--mine) .listing__actions .button--small { flex: 1 1 0; min-width: 0; padding: 0; }
.listings:not(.listings--mine) .listing__verb { display: none; }
.listing__seller {
  display: block; width: 100%; margin: 0; padding: 6px 3px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left;
  font: inherit; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
button.listing__seller { cursor: pointer; }
button.listing__seller:active { color: var(--ivory); }
.listing__seller b { color: var(--ivory); font-weight: 600; }

/* ---------- Conquistas ---------- */
.ach-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); color: var(--ivory); text-align: left; }
.ach-entry__hint { color: var(--muted); font-size: 13px; }
.ach-entry__go { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--rose); font-size: 13px; font-weight: 600; }
.ach-entry__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.ach-emblems { display: flex; gap: 8px; flex-wrap: wrap; }
.ach-emblem { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 55%, transparent); font-size: 20px; letter-spacing: -2px; }
.ach-emblem.is-empty { border-style: dashed; background: transparent; }
.ach-emblems--slots .ach-emblem { min-width: 64px; height: 56px; font-size: 24px; }

.ach-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin: 10px 0 18px; }
.ach-ring { --p: 0; position: relative; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--rose) calc(var(--p) * 360deg), var(--surface-2) 0); display: grid; place-items: center; }
.ach-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink); }
.ach-ring__value { position: relative; font: 400 22px/1 var(--serif); font-variant-numeric: tabular-nums; }

.ach-platinum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 0 22px; padding: 16px; border-radius: 24px; border: 1px solid rgba(242, 198, 109, .28); background: radial-gradient(120% 140% at 100% 0%, rgba(242, 198, 109, .14), transparent 55%), color-mix(in srgb, var(--surface) 70%, transparent); }
.ach-platinum__trophy { font-size: 40px; filter: grayscale(.85) opacity(.55); }
.ach-platinum.is-on .ach-platinum__trophy { filter: drop-shadow(0 0 14px rgba(242, 198, 109, .6)); }
.ach-platinum__name { margin: 0; color: var(--gold); font: 500 22px/1.1 var(--serif); }
.ach-platinum__rule { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ach-meter--gold span { background: linear-gradient(90deg, #b8893a, var(--gold)); }
.ach-meta { display: block; margin-top: 6px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.ach-emblem-block .block__head { align-items: center; }
.ach-list { display: grid; gap: 10px; margin: 14px 0 24px; }
.ach-track { display: grid; }
.ach-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); color: var(--ivory); text-align: left; }
.ach-card__emoji { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 24px; }
.ach-card.tier-0 .ach-card__emoji, .ach-card--secret:not(.is-on) .ach-card__emoji { filter: grayscale(1) opacity(.5); }
.ach-card.tier-4 { border-color: rgba(242, 198, 109, .35); }
.ach-card.tier-4 .ach-card__emoji { box-shadow: 0 0 18px -4px rgba(242, 198, 109, .7); }
.ach-card--secret.is-on { border-color: rgba(240, 169, 192, .35); }
.ach-card__body { display: grid; min-width: 0; }
.ach-card__name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 500 17px/1.2 var(--serif); }
.ach-card__tier { flex: none; color: var(--muted); font: 600 12px/1 var(--sans); }
.ach-card__rule { margin-top: 4px; color: var(--muted); font-size: 13px; }
.ach-card__rule.is-done { color: var(--gold); }
.ach-card .meter { margin-top: 10px; }
.ach-pips { display: flex; gap: 4px; margin-top: 8px; }
.ach-pips i { width: 18px; height: 4px; border-radius: 2px; background: var(--surface-2); }
.ach-pips i.is-on { background: linear-gradient(90deg, var(--wine), var(--rose)); }
.ach-card.tier-4 .ach-pips i.is-on { background: var(--gold); }
.ach-tiers { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; }
.ach-tiers li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--muted); font-size: 13px; }
.ach-tiers li.is-on { color: var(--ivory); }
.ach-tiers li:not(.is-on) .ach-tiers__icon { filter: grayscale(1) opacity(.5); }
.ach-tiers .ach-meta { margin: 0; }
.ach-tiers small { color: var(--gold); }

.ach-pick { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 0 var(--gutter); }
.ach-pick__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); color: var(--ivory); text-align: left; font-size: 14px; }
.ach-pick__item[aria-pressed="true"] { border-color: var(--rose); background: rgba(196, 79, 120, .12); }
.ach-emblems--hero { margin: 10px 0 0; }
.ach-emblems--hero .ach-emblem { min-width: 36px; height: 34px; font-size: 16px; border-radius: 10px; }
.stepper--price input { width: 96px; height: 40px; padding: 0 8px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--gold); text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.stepper--price input::-webkit-outer-spin-button, .stepper--price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--price input.is-out { border-color: var(--danger); color: var(--danger); }
.sheet__range { margin: -4px 0 12px; color: var(--faint); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Carrinho do Mercado ---------- */
.cartbar {
  position: fixed; z-index: 45; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 10px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: min(430px, calc(100% - 24px)); min-height: 54px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid rgba(240, 169, 192, .38); background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 55%), rgba(46, 20, 34, .72); color: var(--ivory);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 20px 40px -14px rgba(0, 0, 0, .75);
  font: inherit; text-align: left; animation: cartbar-in .45s var(--ease) both;
}
@keyframes cartbar-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.cartbar > svg { flex: none; width: 22px; height: 22px; color: var(--rose); }
.cartbar__text { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cartbar__text b { color: var(--ivory); font-weight: 700; }
.cartbar__text span { color: var(--gold); font-weight: 700; }
.cartbar__go { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 13px; font-weight: 700; }
.cartbar__go svg { width: 16px; height: 16px; }
/* Com o carrinho aberto na barra, o aviso sobe para não ficar por baixo dela. */
body.has-cart .toast { bottom: calc(var(--tabs-h) + var(--safe-bottom) + 72px); }
body.has-cart .app { padding-bottom: calc(var(--tabs-h) + var(--safe-bottom) + 84px); }

.cart__list { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.cart__row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 6px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.cart__row.has-problem { border-color: rgba(240, 169, 192, .4); }
.cart__art { --rc: var(--r-common); aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent); }
.cart__art img { width: 100%; height: 100%; object-fit: cover; }
.cart__text { display: grid; min-width: 0; font-size: 12.5px; color: var(--muted); }
.cart__text b { color: var(--ivory); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart__text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart__text .cart__problem { white-space: normal; color: var(--rose); }
.cart__price { font-size: 13px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart__remove { width: 34px; height: 34px; }
.cart__remove svg { width: 16px; height: 16px; }
.cart__clear { display: block; margin: 14px auto 0; padding: 6px 10px; border: 0; background: none; color: var(--faint); font-size: 12.5px; text-decoration: underline; }
@media (min-width: 1000px) {
  .cartbar { bottom: 20px; left: calc(50% + 110px); }
  body.has-cart .toast { bottom: 88px; }
  body.has-cart .app { padding-bottom: 40px; }
}
.listings__clear { margin: 0 0 10px; }
.listings__bulk { display: flex; flex-wrap: wrap; gap: 8px; }
/* Faixa de vencimento no topo do Mercado */
.market-alert { margin: 0 0 12px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--rose) 32%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--rose) 9%, transparent); color: var(--ivory); font-size: 14px; line-height: 1.45; }
.market-alert__go { padding: 0; border: 0; background: none; color: var(--rose); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Mercado da pessoa: cartão "segredo" no perfil ---------- */
.teaser {
  position: relative; padding: 14px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.teaser__arts { display: flex; justify-content: center; gap: 8px; }
.teaser__art {
  --rc: var(--r-common); flex: 0 1 62px; aspect-ratio: 2 / 3; border-radius: 7px; overflow: hidden; background: var(--surface-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 40%, transparent);
}
/* O zoom esconde a borda clara que o desfoque cria nas pontas. */
.teaser__art img { width: 100%; height: 100%; object-fit: cover; filter: blur(7px) saturate(.85); transform: scale(1.18); opacity: 0; transition: opacity .5s var(--ease); }
.teaser__art img.is-loaded { opacity: 1; }
.teaser__open { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .55); }
.teaser__open:active { transform: translate(-50%, -50%) scale(.97); }

/* ---------- Halloween (dia 31/10, ligado por data-season em theme.js) ---------- */
:root[data-season="halloween"] body {
  background:
    radial-gradient(900px 520px at 100% -8%, rgba(255, 138, 42, .16), transparent 62%),
    radial-gradient(700px 500px at -20% 40%, rgba(255, 179, 107, .06), transparent 60%);
  background-attachment: fixed;
}
:root[data-season="halloween"] { --wine: #e5401a; --rose: #ffb347; --gold: #ffc93c; }
:root[data-season="halloween"] .top { box-shadow: 0 1px 0 rgba(255, 138, 42, .6); }
:root[data-season="halloween"] .who__title::after { content: " · 🎃"; }
:root[data-season="halloween"] .mark .slit-path { fill: #ff8a2a; }


/* ---------- Cartões de vidro ----------
   Uma receita para todo cartão de lista. Sem backdrop-filter: são muitos por tela e o desfoque em
   cada um trava a rolagem no Android; o vidro "de verdade" fica nas barras fixas e nas folhas. */
.listing, .pick, .goal, .teaser, .ach-entry, .ach-card, .title-option, .group-pick, .cart__row, .ach-pick__item, .vip.is-off {
  border-radius: var(--r-card); border: 1px solid var(--glass-line);
  background: linear-gradient(165deg, color-mix(in srgb, var(--glass-hi) 18%, transparent), transparent 38%), var(--glass);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-hi) 60%, transparent), 0 16px 30px -24px var(--glass-shade);
}
.pick, .title-option, .group-pick, .trade-row, .cart__row, .ach-pick__item { border-radius: 18px; }
.pick[aria-current="true"], .title-option.is-selected, .ach-pick__item[aria-pressed="true"] { border-color: color-mix(in srgb, var(--rose) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 16%, transparent), color-mix(in srgb, var(--wine) 10%, transparent)); }
.listing.is-own { border-color: color-mix(in srgb, var(--rose) 36%, transparent); }
.cart__row.has-problem { border-color: rgba(240, 169, 192, .4); }
.ach-card.tier-4 { border-color: rgba(242, 198, 109, .4); }
.ach-card--secret.is-on { border-color: rgba(240, 169, 192, .4); }

/* Quem pede menos transparência (ou WebView sem desfoque) recebe superfícies sólidas. */
@media (prefers-reduced-transparency: reduce) {
  :root, .viewer, .cartbar { --glass-strong: var(--surface); --glass: var(--surface-2); --blur: none; }
  body::before, body::after { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, .viewer, .cartbar { --glass-strong: color-mix(in srgb, var(--surface) 96%, transparent); }
}


/* ================= Liquid Glass =================
   O que separa "translúcido" de "vidro": (1) o fundo é desfocado E saturado, (2) a borda é uma
   aresta de luz (clara em cima e à esquerda, fraca embaixo), (3) há um reflexo curvo no topo,
   (4) o vidro entorta o que passa por trás (refração, só no Chromium) e (5) o indicador da aba é uma
   lente espessa que cresce ao toque. */
:root {
  --lg-backdrop: blur(16px) saturate(2.2) brightness(1.1);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .12) 28%, rgba(255, 255, 255, .06) 62%, rgba(255, 255, 255, .5));
}
:root[data-theme="light"] {
  --lg-backdrop: blur(16px) saturate(2.2) brightness(1.04);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, .25) 30%, rgba(80, 40, 60, .12) 64%, rgba(255, 255, 255, .8));
}
:root[data-refract="on"] { --lg-backdrop: url(#lg-refract) blur(7px) saturate(2.3) brightness(1.12); }
:root[data-refract="on"][data-theme="light"] { --lg-backdrop: url(#lg-refract) blur(7px) saturate(2.3) brightness(1.04); }
@media (prefers-reduced-transparency: reduce) { :root, :root[data-refract="on"] { --lg-backdrop: none; } }

.tabs, .top, .cartbar {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    var(--rim) border-box;
  backdrop-filter: var(--lg-backdrop); -webkit-backdrop-filter: var(--lg-backdrop);
}
/* O reflexo curvo: uma faixa de luz na metade de cima, como numa cápsula de vidro de verdade. */
.tabs::after, .top::after {
  content: ""; position: absolute; inset: 1px 1px 46% 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
:root[data-theme="light"] .tabs::after, :root[data-theme="light"] .top::after { background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .15) 70%, transparent); }
.top { position: sticky; }
.tabs {
  height: 68px; padding: 7px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -8px 16px -10px rgba(255, 255, 255, .22),
    inset 0 0 22px rgba(255, 255, 255, .05),
    0 26px 50px -18px rgba(0, 0, 0, .65), 0 14px 34px -22px var(--wine);
}
.top { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -6px 14px -10px rgba(255, 255, 255, .2), 0 16px 36px -20px rgba(0, 0, 0, .6); }
:root[data-theme="light"] .tabs { box-shadow: inset 0 1px 1px #fff, inset 0 -8px 16px -10px rgba(255, 255, 255, .9), 0 24px 46px -20px rgba(90, 50, 70, .45), 0 12px 30px -22px var(--wine); }
:root[data-theme="light"] .top { box-shadow: inset 0 1px 1px #fff, 0 14px 32px -22px rgba(90, 50, 70, .4); }

/* A lente: mais espessa que a aba, com aresta de luz e brilho interno; cresce ao toque. */
.tabs::before {
  top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) * var(--on) / var(--total));
  transform: translateX(calc(var(--lp) / var(--on) * 100%));
  /* Só o transform anima, numa camada própria que já existe antes do toque: o compositor move a
     bolha sem redesenhar nada. Sombra, cor e escala mudando junto obrigavam a repintar a barra a
     cada quadro (~120 pinturas em 0,7 s no trace), e no celular isso aparecia como "30 fps". */
  will-change: transform;
  transition: transform .5s var(--spring), opacity .3s;
  background:
    radial-gradient(110% 90% at 28% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1) 46%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--rose) 26%, transparent), color-mix(in srgb, var(--wine) 30%, transparent));
  box-shadow:
    inset 1.5px 1.5px 1px rgba(255, 255, 255, .8), inset -1px -1.5px 1px rgba(255, 255, 255, .28),
    inset 0 0 16px rgba(255, 255, 255, .18),
    0 10px 24px -8px color-mix(in srgb, var(--wine) 90%, transparent), 0 0 0 1px rgba(255, 255, 255, .16);
}
:root[data-theme="light"] .tabs::before {
  background:
    radial-gradient(110% 90% at 28% 0%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .3) 46%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--rose) 20%, transparent), color-mix(in srgb, var(--wine) 24%, transparent));
}
.tabs button { color: color-mix(in srgb, var(--ivory) 80%, transparent); }
.tabs button[aria-current="page"] { color: var(--ivory); }
.tabs button[aria-current="page"] svg { color: var(--ivory); filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--wine) 80%, transparent)); }

/* O mesmo acabamento nos painéis e folhas (sem refração: são grandes e rolam). */
.filters, .sheet, .icon-button { backdrop-filter: blur(20px) saturate(2) brightness(1.06); -webkit-backdrop-filter: blur(20px) saturate(2) brightness(1.06); }
.filters, .sheet { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 -8px 16px -12px rgba(255, 255, 255, .16), 0 20px 40px -22px rgba(0, 0, 0, .6); }
@media (prefers-reduced-transparency: reduce) {
  .tabs, .top, .cartbar, .filters, .sheet, .icon-button { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (min-width: 1000px) {
  .tabs { height: auto; padding: 10px; }
  .tabs::after { display: none; }
}

/* ---------- Tema escuro: vidro preto ----------
   No escuro o vidro é fumê: quase transparente, tingido de preto, sem clarear o que passa por trás.
   O branco fica só na aresta de luz (borda fina) e num reflexo discreto. Só vale sem data-theme="light". */
:root:not([data-theme="light"]) {
  --glass: rgba(0, 0, 0, .22);
  --glass-strong: rgba(4, 4, 8, .34);
  --glass-line: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .16);
  --glass-shade: rgba(0, 0, 0, .7);
  --lg-backdrop: blur(18px) saturate(1.9) brightness(.78);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 28%, rgba(255, 255, 255, .03) 62%, rgba(255, 255, 255, .26));
}
:root[data-refract="on"]:not([data-theme="light"]) { --lg-backdrop: url(#lg-refract) blur(7px) saturate(1.9) brightness(.78); }
:root:not([data-theme="light"]) .tabs::after, :root:not([data-theme="light"]) .top::after { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 70%, transparent); }
:root:not([data-theme="light"]) .tabs {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), inset 0 -8px 16px -12px rgba(255, 255, 255, .08), 0 26px 50px -18px rgba(0, 0, 0, .85), 0 14px 34px -24px var(--wine);
}
:root:not([data-theme="light"]) .top { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .26), 0 16px 36px -20px rgba(0, 0, 0, .8); }
/* A lente da aba ativa deixa de ser um "balão branco": vidro escuro com o brilho só na aresta. */
:root:not([data-theme="light"]) .tabs::before {
  background:
    radial-gradient(110% 90% at 28% 0%, rgba(255, 255, 255, .18), rgba(255, 255, 255, .03) 46%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--rose) 14%, transparent), color-mix(in srgb, var(--wine) 22%, transparent));
  box-shadow: inset 1.5px 1.5px 1px rgba(255, 255, 255, .5), inset -1px -1.5px 1px rgba(255, 255, 255, .14), inset 0 0 14px rgba(255, 255, 255, .06), 0 10px 24px -8px color-mix(in srgb, var(--wine) 80%, transparent), 0 0 0 1px rgba(255, 255, 255, .1);
}
:root:not([data-theme="light"]) :root:not([data-theme="light"]) .filters, :root:not([data-theme="light"]) .sheet, :root:not([data-theme="light"]) .icon-button { backdrop-filter: blur(20px) saturate(1.8) brightness(.8); -webkit-backdrop-filter: blur(20px) saturate(1.8) brightness(.8); }
:root:not([data-theme="light"]) .filters, :root:not([data-theme="light"]) .sheet { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), 0 20px 40px -22px rgba(0, 0, 0, .8); }
:root:not([data-theme="light"]) .sheet { background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 22%), rgba(8, 8, 14, .62); }
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-theme="light"]) { --glass-strong: var(--surface); --glass: var(--surface-2); --lg-backdrop: none; }
}

/* ---------- Desempenho ----------
   Desfocar o fundo custa por pixel e por quadro. Fica só onde a área é pequena (cabeçalho, barra de
   navegação, folhas abertas). O painel de filtros, grande e com a lista rolando por baixo, e os
   selos de cada card, que são dezenas, usam fundo translúcido comum. */
.filters { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 22%, transparent), transparent 45%), color-mix(in srgb, var(--surface) 78%, transparent); }
:root:not([data-theme="light"]) .filters { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 45%), rgba(8, 8, 12, .74); }
.tile__qty, .icon-button, .toast, .tile__flags svg, .album__badge { backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile__qty { background: rgba(10, 8, 16, .72); }
.icon-button { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.toast { background: color-mix(in srgb, var(--ivory) 94%, transparent); }
.album__badge { background: rgba(10, 8, 16, .68); }
/* Raio de desfoque menor nas barras: o custo cresce com o raio. */
:root { --lg-backdrop: blur(12px) saturate(2) brightness(1.08); }
:root[data-theme="light"] { --lg-backdrop: blur(12px) saturate(2) brightness(1.04); }
:root:not([data-theme="light"]) { --lg-backdrop: blur(12px) saturate(1.8) brightness(.8); }
:root[data-refract="on"], :root[data-refract="on"][data-theme="light"] { --lg-backdrop: url(#lg-refract) blur(6px) saturate(2) brightness(1.06); }
:root[data-refract="on"]:not([data-theme="light"]) { --lg-backdrop: url(#lg-refract) blur(6px) saturate(1.8) brightness(.8); }
.sheet { backdrop-filter: blur(14px) saturate(1.8); -webkit-backdrop-filter: blur(14px) saturate(1.8); }


/* ---------- Celular: carteira e filtros sob demanda ----------
   O cabeçalho (nome, packs, Lumes, tema) e os filtros ocupavam o topo o tempo todo. Agora a tela é
   do conteúdo, e dois botões flutuantes abrem cada painel quando a pessoa precisa. Os painéis são os
   mesmos elementos de antes (.top e .filters); fabs.js só liga a classe do body. Do desktop pra
   cima nada muda: há espaço, e a barra lateral e o cabeçalho continuam como estavam. */
.fabs, .scrim { display: none; }
@media (max-width: 999px) {
  main { padding-top: calc(var(--safe-top) + 20px); }

  .top, .filters {
    position: fixed; z-index: 44; left: 10px; right: 10px; top: calc(var(--safe-top) + 10px); margin: 0;
    /* O painel fica sempre no lugar, numa camada própria (will-change), e só aparece ou some.
       Deslizar de fora da tela obrigava o navegador a desenhar cada faixa nova do painel a cada
       quadro (~10 repinturas por abertura no trace), o que no celular parecia travado.
       Abrir: desce 12 px e aparece em 0,18 s. Fechar: na hora, sem animação nem esmaecer. */
    visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-12px);
    will-change: transform, opacity;
    transition: none;
  }
  .filters { max-height: min(74dvh, 580px); overflow-y: auto; overscroll-behavior: contain; border-radius: 28px; }
  /* Flutuando sobre qualquer conteúdo, os painéis precisam de fundo encorpado: o vidro aqui é o
     acabamento (aresta de luz, reflexo), não a transparência. */
  .top, .filters, :root:not([data-theme="light"]) .filters {
    border: 1px solid transparent;
    background:
      linear-gradient(color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface) 96%, transparent)) padding-box,
      var(--rim) border-box;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), 0 24px 50px -16px rgba(0, 0, 0, .75);
  }
  :root[data-theme="light"] .top, :root[data-theme="light"] .filters { box-shadow: inset 0 1px 1px #fff, 0 24px 50px -18px rgba(90, 50, 70, .45); }
  body.me-open .top, body.filters-open .filters {
    visibility: visible; opacity: 1; pointer-events: auto; transform: none;
    transition: transform .18s var(--ease), opacity .12s linear;
  }

  .scrim { display: block; position: fixed; inset: 0; z-index: 43; background: rgba(0, 0, 0, .34); opacity: 0; pointer-events: none; transition: none; will-change: opacity; }
  body.me-open .scrim, body.filters-open .scrim { opacity: 1; pointer-events: auto; transition: opacity .15s linear; }

  .fabs {
    position: fixed; z-index: 41; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 10px);
    display: flex; flex-direction: column; gap: 10px; transition: bottom .4s var(--ease);
  }
  body.has-cart .fabs { bottom: calc(var(--tabs-h) + var(--safe-bottom) + 72px); }
  .fab {
    position: relative; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 50%;
    border: 1px solid transparent; color: var(--ivory);
    background: linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box, var(--rim) border-box;
    backdrop-filter: var(--lg-backdrop); -webkit-backdrop-filter: var(--lg-backdrop);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .4), 0 14px 28px -12px rgba(0, 0, 0, .7), 0 8px 20px -14px var(--wine);
    transition: transform .4s var(--spring);
    animation: fab-in .55s var(--spring) both;
  }
  @keyframes fab-in { from { opacity: 0; transform: scale(.6) translateY(10px); } }
  .fab svg { width: 23px; height: 23px; }
  .fab--me svg { color: var(--gold); }
  .fab:active { transform: scale(.9); }
  .fab { will-change: transform; }
  .fab[aria-expanded="true"] { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 0 0 1px color-mix(in srgb, var(--rose) 70%, transparent), 0 14px 30px -10px var(--wine); }
  .fab__dot { position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px var(--ink), 0 0 10px var(--rose); }
  /* Os botões ficam sempre na mesma camada (abaixo do escurecimento): trocar o z-index ao abrir o
     painel obrigava o navegador a refazer as camadas no meio da animação. */
  .fabs { z-index: 42; }
}
@media (min-width: 1000px) { .fabs, .scrim { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .fab { animation: none; } }


/* ---------- Sem animação de entrada ----------
   Na gravação do celular, trocar de aba ou refazer uma lista deixava a tela em branco por ~0,5 s:
   o conteúdo nascia com opacidade 0 e aparecia aos poucos (a seção, depois cada card, um atrás do
   outro), e as imagens ainda faziam fade ao chegar. Tudo isso se soma ao tempo de rede e parece
   lentidão. Agora o conteúdo aparece inteiro assim que é montado; só a imagem faz um fade curto. */
.screen > :not(.filters), .screen .tile, .screen .album, .screen .rank, .screen .listing { animation: none; }
.tile__art img, .album__cover img, .teaser__art img { transition-duration: .15s; }


/* Barra de navegação: nada além da bolha anima. Cor do texto, ícone e escala ao toque mudam na hora;
   animar cor ou filtro repinta a barra inteira (com o vidro por trás) a cada quadro. */
.tabs button, .tabs button svg { transition: none; }
.tabs button:active { transform: none; }
.tabs button[aria-current="page"] svg { transform: none; filter: none; }


/* Seletor de quantidade no carrinho (compra parcial de um lote). */
.cart__qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart__qty output { min-width: 56px; text-align: center; color: var(--ivory); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart__step { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); color: var(--ivory); font-size: 17px; line-height: 1; }
.cart__step:disabled { opacity: .35; }
.cart__step:active:not(:disabled) { transform: scale(.9); }

/* ---------- P4: odômetro (motion.js) ---------- */
.roll { display: inline-flex; line-height: 1; font-variant-numeric: tabular-nums; }
.roll__d { display: inline-block; height: 1em; overflow: hidden; }
.roll__s { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -10%)); transition: transform var(--dur-roll) var(--ease) var(--delay, 0ms); }
.roll__s > span { height: 1em; }
.roll__s.is-rolling { animation: roll-blur var(--dur-roll) var(--ease) var(--delay, 0ms); }
@keyframes roll-blur { 35% { filter: blur(1.4px); } }

/* ---------- P10: cartão que levanta (motion.js, listas com [data-lift]) ----------
   Um realce só por lista: anel e sombra por cima da linha ativa, sem fundo (a sombra externa não
   cobre a própria linha). Ele desliza entre as linhas com mola; a linha sobe 2 px junto. */
[data-lift] { position: relative; }
[data-lift] > * { transition: transform var(--dur-fast) var(--spring); }
[data-lift] > .is-lifted { position: relative; z-index: 1; transform: translateY(-2px); }
.lift {
  position: absolute; z-index: 2; pointer-events: none; box-sizing: border-box; transform-origin: 0 0;
  border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--ivory) 30%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 22%, transparent), 0 22px 40px -20px rgba(0, 0, 0, .75);
  opacity: 0; translate: 0 -2px; transition: opacity var(--dur-fast) var(--ease);
}
.lift.is-on { opacity: 1; }

/* ---------- P5: virada de página no álbum ----------
   A capa abre como a capa de um livro (gira na lombada, com um brilho que passa pela dobra) e a
   primeira página da grade vira em cascata. Nada começa invisível: a página já aparece inclinada
   no primeiro quadro, então a tela não fica em branco esperando a animação (regra de 12/11). */
.album-hero__cover { transform-origin: left center; animation: cover-open var(--dur-morph) var(--ease) both; }
.album-hero__cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(-110%); animation: page-sheen var(--dur-morph) var(--ease-in-out) 80ms both;
}
@keyframes cover-open { from { transform: perspective(1400px) rotateY(-38deg) scale(.96); } }
@keyframes page-sheen { to { transform: translateX(110%); } }
.screen .grid--album .tile { transform-origin: left center; animation: page-turn 300ms var(--ease-in-out) both; animation-delay: calc(min(var(--n, 0), 9) * 70ms); }
.screen .grid--album .tile:nth-child(n + 10) { animation: none; }
@keyframes page-turn { from { transform: perspective(900px) rotateY(-55deg); } }

@media (prefers-reduced-motion: reduce) {
  [data-lift] > .is-lifted, .lift { transform: none; translate: none; }
  .album-hero__cover, .album-hero__cover::after, .screen .grid--album .tile { animation: none; }
}

/* Meu estilo (sheet do perfil): prévia 16:9 do /perfil, abas por tipo e Usar/Tirar por item. */
.style-option .row-toggle--primary { background: var(--ivory); color: var(--ink); }
.style-preview { position: relative; aspect-ratio: 16 / 9; margin: 0 0 14px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.style-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(8px); transition: opacity 350ms var(--ease), filter 350ms var(--ease); }
.style-preview img.is-on { opacity: 1; filter: none; }
.style-preview.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ivory) 10%, transparent) 50%, transparent 70%); background-size: 200% 100%; animation: style-shimmer 1.2s linear infinite; }
@keyframes style-shimmer { to { background-position: -200% 0; } }
.style-tabs { margin: 0 0 12px; }
.style-option { padding: 6px 6px 6px 14px; }
.style-option__name { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; }
.style-option.is-previewing { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ivory) 40%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .style-preview img { transition: none; filter: none; }
  .style-preview.is-loading::after { animation: none; }
}

/* Social (fase 1): seguidores/seguindo no herói do perfil, e o botão Seguir. */
.social-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 0; }
.social-count { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; }
.social-count__n { color: var(--ivory); font-weight: 700; font-variant-numeric: tabular-nums; }
.follow-button { min-width: 92px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ivory); background: var(--ivory); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--spring); }
.follow-button:active { transform: scale(.96); }
.follow-button.is-on { background: transparent; color: var(--ivory); border-color: var(--glass-line); }
.social-enter { animation: social-in .35s var(--ease) both; }
@keyframes social-in { from { opacity: 0; filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  .social-enter { animation: none; }
  .follow-button { transition: none; }
}

/* Início: o feed (docs/social.md, fase 2). Cada post é um cartão de vidro com quem fez, a frase,
   o tempo e uma fileira de artes; entra com fade e desfoque em cascata, como os tiles. */
.seg--switch { margin-top: 10px; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.post { padding: 14px; border-radius: 20px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi); animation: post-in .5s var(--ease) backwards; animation-delay: calc(var(--n, 0) * 40ms); }
@keyframes post-in { from { opacity: 0; filter: blur(6px); transform: translateY(10px) scale(.98); } }
.post__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.post__avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--rose), var(--wine)); color: var(--ivory); font: 400 17px/1 var(--serif); }
.post__text { margin: 0; font-size: 14px; line-height: 1.35; color: var(--muted); }
.post__name { padding: 0; border: 0; background: none; color: var(--ivory); font: inherit; font-weight: 700; }
.post__time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.post__strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.post__art { position: relative; flex: none; width: 84px; aspect-ratio: 2 / 3; padding: 0; overflow: hidden; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--rc, var(--line)) 60%, transparent); background: var(--surface); transition: transform .2s var(--spring); }
.post__art:active { transform: scale(.96); }
.post__art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s var(--ease); }
.post__art img.is-loaded { opacity: 1; }
.post__art--signature { width: 96px; border-color: color-mix(in srgb, var(--gold) 70%, transparent); box-shadow: 0 8px 24px -12px var(--gold); }
.post__art--album { width: 120px; }
.post__art--cover { width: 208px; aspect-ratio: 16 / 9; }
.post__caption { position: absolute; inset: auto 0 0; padding: 18px 6px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.2; text-align: left; }
.post__badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--glass-line); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13px; font-weight: 600; white-space: nowrap; }
.post__emoji { font-size: 18px; }
.post__more { flex: none; display: grid; place-items: center; width: 56px; border-radius: 10px; border: 1px dashed var(--glass-line); color: var(--muted); font-weight: 700; }
.post.skeleton .post__avatar { background: var(--surface); }
.post.skeleton .post__strip { height: 126px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .post { animation: none; }
  .post__art, .post__art img { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tabs, .tabs button span, .tabs button svg { transition: none; }
}

/* ---------- Perfil: a carteirinha do colecionador ---------- */
.passport {
  --rc: var(--rose); position: relative; margin: 6px 0 24px; padding: 16px 16px 14px; overflow: hidden; border-radius: 30px;
  border: 1px solid var(--glass-line);
  background:
    radial-gradient(110% 80% at 4% 0%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 64%),
    linear-gradient(165deg, color-mix(in srgb, var(--glass-hi) 22%, transparent), transparent 42%), var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 56px -34px var(--glass-shade);
}
/* Um reflexo atravessa o cartão uma vez, ao entrar, como a luz numa carteirinha de verdade. */
.passport::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, #fff 24%, transparent), transparent);
  transform: translateX(-130%) skewX(-18deg); animation: passport-sheen 1.7s .45s var(--ease) 1 forwards;
}
@keyframes passport-sheen { to { transform: translateX(360%) skewX(-18deg); } }
.passport__top { display: grid; grid-template-columns: minmax(92px, 33%) minmax(0, 1fr); gap: 14px; align-items: center; }
.passport__card .showcase { width: 100%; transform: rotate(-2.5deg); border-radius: 16px; }
.passport__top--solo { grid-template-columns: minmax(0, 1fr); }
.passport__hint { margin: 10px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.passport__kicker { margin: 0; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.passport__name { margin: 6px 0 0; font: 400 clamp(2.1rem, 10.5vw, 3.1rem)/.98 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.passport__name--m { font-size: clamp(1.7rem, 8.4vw, 2.4rem); }
.passport__name--s { font-size: clamp(1.4rem, 6.6vw, 1.9rem); line-height: 1.04; }
.passport__name--xs { font-size: clamp(1.15rem, 5.4vw, 1.5rem); line-height: 1.08; }
.passport__title { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.passport__title.is-vip { color: var(--gold); }
.passport__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.passport__tag { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.passport__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; }
.passport__row .social-row, .passport__row .social-slot { margin: 0; }
.passport__row .title-change { margin: 0; padding: 6px 14px; font-size: 13px; }
.passport__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--glass-line); }
.passport__stats > div { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 6px; text-align: center; }
.passport__stats > div + div { border-left: 1px solid var(--glass-line); }
.passport__stats dd { margin: 0; font: 400 clamp(25px, 7.5vw, 32px)/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.passport__stats dd small { font: 500 11px/1 var(--sans); letter-spacing: 0; color: var(--faint); }
.passport__stats .is-rank dd { color: var(--wine); }
.passport__stats dt { margin-top: 7px; color: var(--muted); font-size: 12px; }
.passport__progress { margin-top: 12px; }
.passport__progress .meter { height: 8px; margin: 0; }
.passport__progress p { display: flex; justify-content: space-between; gap: 10px; margin: 8px 2px 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Seções do perfil: título em serifa, o total e a entrada para tudo no mesmo lugar. */
.block__link { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--rose); font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.block__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.strip { display: flex; gap: 8px; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip .tile { flex: 0 0 92px; scroll-snap-align: start; }
.strip .tile__meta { display: none; }
.strip__ghost { flex: 0 0 92px; aspect-ratio: 2 / 3; border-radius: 12px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.strip__more { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 2 / 3; border-radius: 12px; border: 1px dashed var(--glass-line); background: transparent; color: var(--rose); font: inherit; font-size: 12.5px; font-weight: 600; text-align: center; }
.strip__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.strip__more--solo { flex: 1; aspect-ratio: auto; height: 52px; flex-direction: row; justify-content: center; }
.ach-entry--rich { flex-direction: column; align-items: stretch; gap: 12px; }
.ach-entry__main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ach-entry--rich .meter { margin-top: 0; }
.goal .meter { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .passport::after { animation: none; display: none; }
  .strip__ghost { animation: none; }
}

.icon-pill { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); font-size: 16px; line-height: 1; transition: transform .3s var(--spring); }
.icon-pill:active { transform: scale(.9); }
.block__sub { margin: -6px 2px 10px; color: var(--muted); font-size: 12.5px; }
.pill--style { cursor: pointer; color: var(--ivory); font: inherit; font-size: 12.5px; font-weight: 600; transition: transform .3s var(--spring); }
.pill--style:active { transform: scale(.95); }
.pill--style[hidden] { display: none; }
@media (min-width: 1000px) { .pill--style span { display: none; } .pill--style { width: 34px; padding: 0; justify-content: center; } }
