/* Ranking e conquistas (gamificação). Tokens de estilo.css; mobile first; movimento só com prefers-reduced-motion liberado. */
.g2-av.g { width: 44px; height: 44px; font-size: 0.95rem; }
.jg-voce { display: grid; gap: 18px; padding: 20px; background: linear-gradient(135deg, var(--marinho) 0%, var(--t-escuro-2) 100%) !important; color: #fff; border: 0; }
.jg-nivel { display: flex; gap: 14px; align-items: center; }
.jg-nivel-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.jg-nivel-txt small { color: var(--verde-claro); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }
.jg-nivel-txt > b { font: 700 1.7rem/1.1 Sora, Inter, sans-serif; letter-spacing: -0.02em; }
.jg-dica { color: rgba(255, 255, 255, 0.72); font-size: 0.85rem; }
.jg-dica b { color: #fff; }
.jg-barra { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.jg-barra i { display: block; height: 100%; border-radius: inherit; background: var(--degrade); transition: width 0.6s cubic-bezier(.2, .8, .2, 1); }
.jg-mini { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .jg-mini { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .jg-voce { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.jg-seq, .jg-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.jg-seq b, .jg-meta b { display: block; font: 700 1.15rem Sora, Inter, sans-serif; }
.jg-seq small, .jg-meta small { color: rgba(255, 255, 255, 0.7); }
.jg-seq svg { color: rgba(255, 255, 255, 0.4); flex: none; }
.jg-seq.acesa svg { color: #ff9f43; filter: drop-shadow(0 0 8px rgba(255, 159, 67, 0.45)); }
.jg-anel { width: 46px; height: 46px; flex: none; transform: rotate(-90deg); }
.jg-anel circle { fill: none; stroke-width: 7; }
.jg-anel .fundo { stroke: rgba(255, 255, 255, 0.14); }
.jg-anel .valor { stroke: var(--verde-claro); stroke-linecap: round; transition: stroke-dashoffset 0.6s; }
.jg-meta.batida { background: color-mix(in srgb, var(--t-acento-2) 16%, transparent); }

.jg-grade { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .jg-grade { grid-template-columns: 1.5fr 1fr; } }
.jg-rank h2, .jg-destaques h2, .jg-conq h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.jg-rank .sub, .jg-conq .sub, .jg-regras .sub { margin-left: auto; font: 500 0.78rem Inter, sans-serif; color: var(--texto-3); }
/* Pódio (18/11/2026): degraus metálicos com alturas diferentes, coroa no 1º e entrada subindo. */
.jg-podio { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 6px; padding: 30px 0 4px; }
.jg-podio::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -4px; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--t-escuro-1) 20%, transparent), transparent); pointer-events: none; }
.jg-lugar { --c1: #e3eaf0; --c2: #9aa8b5; --brilho: rgba(170, 186, 200, 0.55); display: grid; justify-items: center; width: 118px; }
.jg-lugar.d1 { --c1: #ffe08a; --c2: #c8961e; --brilho: rgba(240, 190, 60, 0.6); width: 134px; }
.jg-lugar.d3 { --c1: #f3bf98; --c2: #a8673a; --brilho: rgba(220, 150, 100, 0.55); }
.jg-topo { position: relative; display: grid; justify-items: center; gap: 4px; margin-bottom: 10px; animation: jgAparece 0.5s 0.45s both; }
.jg-coroa { width: 28px; height: 28px; margin-bottom: -2px; color: #ffcf4a; filter: drop-shadow(0 2px 6px rgba(255, 190, 40, 0.65)); animation: jgCoroa 3.2s ease-in-out infinite; }
.jg-pod-anel { display: inline-grid; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px #fff, 0 8px 18px var(--brilho); }
.jg-lugar.d1 .jg-pod-anel { transform: scale(1.14); margin: 3px 0 5px; }
.jg-lugar.eu .jg-pod-anel { box-shadow: 0 0 0 3px var(--verde), 0 8px 18px var(--brilho); }
.jg-topo b { font-size: 0.95rem; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.jg-pts { padding: 2px 9px; border-radius: 99px; font: 700 0.74rem Sora, Inter, sans-serif; color: #2b1d05; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 2px 6px var(--brilho); }
.jg-lugar.d2 .jg-pts { color: #1d2a35; }
.jg-bloco { position: relative; width: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 12px 12px 4px 4px; transform-origin: bottom;
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -12px 20px rgba(0, 0, 0, 0.14), 0 12px 24px color-mix(in srgb, var(--t-escuro-1) 18%, transparent);
  animation: jgSobe 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.jg-bloco::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }
.jg-bloco::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%); transform: translateX(-130%); animation: jgBrilho 5s 1.2s ease-in-out infinite; }
.jg-lugar.d1 .jg-bloco { height: 98px; animation-delay: 0.2s; }
.jg-lugar.d2 .jg-bloco { height: 72px; animation-delay: 0.08s; }
.jg-lugar.d3 .jg-bloco { height: 54px; animation-delay: 0s; }
.jg-bloco i { position: relative; z-index: 1; font: 800 1.6rem Sora, Inter, sans-serif; font-style: normal; color: rgba(255, 255, 255, 0.96); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28); }
.jg-lugar.d1 .jg-bloco i { font-size: 2.15rem; }
@keyframes jgSobe { from { transform: scaleY(0); } }
@keyframes jgAparece { from { opacity: 0; transform: translateY(8px); } }
@keyframes jgCoroa { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(4deg); } }
@keyframes jgBrilho { 0%, 70% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .jg-bloco, .jg-bloco::after, .jg-topo, .jg-coroa { animation: none; } }
.jg-tabela td, .jg-tabela th { padding: 8px 6px; }
.jg-tabela tr.eu td { background: var(--ok-fundo); }
.jg-pos { width: 36px; color: var(--texto-3); font-weight: 700; }
.jg-quem { display: inline-flex; align-items: center; gap: 8px; }
.jg-minha { margin: 8px 0 0; text-align: center; color: var(--texto-2); }

.jg-destaques ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jg-destaques li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--fundo); }
.jg-destaques li svg { color: var(--verde); flex: none; }
.jg-destaques li div { display: grid; }
.jg-destaques small { color: var(--texto-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.jg-destaques span { color: var(--texto-2); font-size: 0.85rem; }

.jg-conq ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.jg-conq li { display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--linha); min-width: 0; }
.jg-conq li > div { min-width: 0; display: grid; gap: 3px; flex: 1; }
.jg-conq li small { color: var(--texto-3); font-size: 0.8rem; line-height: 1.3; }
.jg-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--fundo); color: var(--texto-3); }
.jg-conq li:not(.feita) b { color: var(--texto-2); }
.jg-conq li.feita { cursor: pointer; border-color: rgba(var(--t-verde-rgb), 0.35); background: linear-gradient(180deg, var(--ok-fundo), transparent); }
.jg-conq li.feita .jg-ico { background: var(--degrade); color: #fff; box-shadow: 0 6px 16px rgba(var(--t-verde-rgb), 0.3); }
.jg-barra.fina { height: 5px; background: var(--linha); margin-top: 4px; }
.jg-falta { color: var(--texto-3); font-size: 0.75rem; }
.jg-ok { color: var(--verde); font-weight: 700; font-size: 0.78rem; }
.jg-regras summary { display: flex; gap: 8px; align-items: baseline; cursor: pointer; list-style: none; min-height: 28px; }
.jg-regras summary::-webkit-details-marker { display: none; }
.jg-regras[open] summary { margin-bottom: 10px; }
.jg-regras p { margin: 10px 0 0; }

/* comemoração */
.jg-confete, .jogo-confete { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }
.jogo-aviso { position: fixed; z-index: 201; left: 50%; bottom: calc(24px + var(--base)); transform: translateX(-50%); display: grid; gap: 2px; min-width: 260px; max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 16px; background: var(--marinho); color: #fff; box-shadow: 0 18px 40px color-mix(in srgb, var(--t-escuro-1) 35%, transparent); text-align: center; animation: jg-entra 0.35s cubic-bezier(.2, .9, .3, 1.2); }
.jogo-aviso b { font: 700 1rem Sora, Inter, sans-serif; }
.jogo-aviso span { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }
.jogo-aviso.sai { opacity: 0; transform: translate(-50%, 10px); transition: 0.4s; }
@keyframes jg-entra { from { opacity: 0; transform: translate(-50%, 16px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .jogo-aviso { animation: none; } .jg-barra i, .jg-anel .valor { transition: none; } }
:root[data-tema="escuro"] .jg-degrau, :root[data-tema="escuro"] .jg-destaques li, :root[data-tema="escuro"] .jg-ico { background: #163240; }

/* ---------- Estante de troféus (16/11/2026) ----------
   Medalhas animadas em estilo de jogo (desenho próprio, tema contábil): as ganhas flutuam de leve, um reflexo de
   luz passa por cima de tempos em tempos e as de Ouro/Diamante soltam faíscas; ao tocar, a medalha pula (festa).
   As bloqueadas ficam cinza, paradas, com cadeado. Tudo para quem pede "reduzir movimento". */
.tm .tm-topo { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 900px) { .tm .tm-topo { grid-template-columns: 1fr 1.2fr; align-items: stretch; } }
.tm-contas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tm-cont { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: color-mix(in srgb, var(--marinho) 4%, var(--cartao)); border: 1px solid var(--linha); }
.tm-cont b { font: 800 22px/1 Sora, Inter, sans-serif; color: var(--texto); }
.tm-cont small { font-size: 11.5px; color: var(--texto-2); font-weight: 600; }
.tm-pip { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .12); }
.m-bronze { background: linear-gradient(135deg, #ffd2a6, #c9773b 60%, #8a4718); }
.m-prata { background: linear-gradient(135deg, #ffffff, #c2ccd4 60%, #7d8b96); }
.m-ouro { background: linear-gradient(135deg, #fff1a8, #f0b31c 60%, #a86f00); }
.m-diamante { background: linear-gradient(135deg, #e3fdff, #6fd6f2 60%, #2a8fb8); }
.tm-prox { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, var(--t-brilho) 0%, transparent 55%), linear-gradient(135deg, var(--t-escuro-1) 0%, var(--t-escuro-2) 100%); }
.tm-prox > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.tm-prox small { color: rgba(255, 255, 255, .72); font-size: 12px; }
.tm-prox b { font: 700 15px/1.25 Sora, Inter, sans-serif; }
.tm-prox .tm-barra { background: rgba(255, 255, 255, .14); }
.tm-abas { margin-bottom: 14px; flex-wrap: wrap; }
.tm-grade { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tm-cartao { display: flex; gap: 12px; align-items: center; padding: 12px 14px 12px 8px; border-radius: 16px; border: 1.5px solid var(--linha); background: var(--cartao); min-width: 0; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tm-cartao.ganha { cursor: pointer; border-color: color-mix(in srgb, var(--marinho) 30%, var(--linha)); background: linear-gradient(180deg, color-mix(in srgb, var(--marinho) 5%, var(--cartao)), var(--cartao)); }
.tm-cartao.ganha:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--t-escuro-1) 12%, transparent); }
.tm-cartao:not(.ganha) .tm-medalha { filter: grayscale(.9) opacity(.75); }
.tm-txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.tm-txt b { font: 700 14.5px/1.25 Sora, Inter, sans-serif; color: var(--texto); }
.tm-txt > small { font-size: 12px; line-height: 1.35; color: var(--texto-3); }
.tm-metal { justify-self: start; padding: 2px 9px; border-radius: 999px; font: 800 10.5px/1.6 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #3b2a12; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.tm-metal.m-prata { color: #34414b; } .tm-metal.m-diamante { color: #0c4a63; }
.tm-metal.bloq { background: color-mix(in srgb, var(--texto-3) 14%, var(--cartao)); color: var(--texto-3); box-shadow: none; }
.tm-barra { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--texto-3) 16%, var(--cartao)); overflow: hidden; margin-top: 4px; }
.tm-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--t-acento-3), var(--t-acento-2)); }
.tm-falta { font-size: 11.5px; color: var(--texto-2); }
.tm-falta b { color: var(--texto); }
.tm-max { justify-self: start; margin-top: 4px; font: 700 12px Inter, sans-serif; color: var(--verde); }
/* Medalha */
.tm-medalha { flex: none; overflow: visible; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--t-escuro-1) 22%, transparent)); }
.tm-est { fill: color-mix(in srgb, var(--t-escuro-1) 18%, transparent); }
.tm-est.acesa { fill: #ffcf33; stroke: #b07800; stroke-width: 1.2; }
.tm-faisca path { fill: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .tm-medalha.ganha .tm-corpo, .tm-medalha.ganha .tm-fita { animation: tm-flutua 3.2s ease-in-out infinite; transform-origin: 50% 58%; }
  .tm-medalha.ganha .tm-fita { animation-delay: -.25s; }
  .tm-medalha.ganha .tm-reflexo { animation: tm-reflexo 4.8s ease-in-out infinite; }
  .tm-medalha.ganha .tm-est.acesa { animation: tm-pisca 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .tm-medalha.ganha .tm-est.acesa:nth-child(2) { animation-delay: .3s; } .tm-medalha.ganha .tm-est.acesa:nth-child(3) { animation-delay: .6s; } .tm-medalha.ganha .tm-est.acesa:nth-child(4) { animation-delay: .9s; }
  .tm-medalha.ganha .tm-faisca path { animation: tm-faisca 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .tm-medalha.ganha .tm-faisca path:nth-child(2) { animation-delay: 1s; }
  .tm-cartao.ganha:hover .tm-corpo { animation: tm-balanca .6s ease-in-out; }
  .tm-cartao.festa .tm-medalha { animation: tm-pula .7s cubic-bezier(.3, 1.6, .5, 1); }
  .tm-prox .tm-medalha { animation: tm-flutua 2.6s ease-in-out infinite; }
}
@keyframes tm-flutua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tm-reflexo { 0%, 62% { transform: translateX(0) rotate(20deg); } 100% { transform: translateX(150px) rotate(20deg); } }
@keyframes tm-pisca { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes tm-faisca { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes tm-balanca { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes tm-pula { 0% { transform: scale(1); } 40% { transform: scale(1.22) translateY(-6px); } 100% { transform: scale(1); } }
/* Troféu em pé (16/11/2026, 2): medalha grande em cima, centralizada; selo do metal, nome, descrição e progresso embaixo. */
.tm-grade { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tm-cartao { flex-direction: column; align-items: center; text-align: center; padding: 14px 14px 16px; gap: 8px; }
.tm-txt { justify-items: center; width: 100%; }
.tm-metal, .tm-max { justify-self: center; }
.tm-txt > small { min-height: 2.7em; }
.tm-barra { width: 100%; }
.tm-medalha.ganha .tm-est.acesa { transform-box: fill-box; transform-origin: center; }
/* Personagens: piscam de vez em quando e dão um pulinho junto da medalha (só com movimento liberado). */
@media (prefers-reduced-motion: no-preference) {
  .tm-medalha.ganha .pz-rosto > ellipse:nth-of-type(-n+2) { animation: pz-pisca 5s infinite; transform-box: fill-box; transform-origin: center; }
  .tm-cartao:nth-child(3n) .tm-medalha.ganha .pz-rosto > ellipse:nth-of-type(-n+2) { animation-delay: 1.7s; }
  .tm-cartao:nth-child(3n+1) .tm-medalha.ganha .pz-rosto > ellipse:nth-of-type(-n+2) { animation-delay: 3.1s; }
  .tm-cartao.ganha:hover .pz { animation: pz-pulo .5s ease-out; transform-box: fill-box; transform-origin: center bottom; }
}
@keyframes pz-pisca { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pz-pulo { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-3px) scale(1.06, .96); } }

/* Personagens 3D no lugar das medalhas (18/11/2026). O canvas fixo desenha sobre a vaga; o SVG fica de reserva. */
/* A tela dos bonecos 3D fica dentro da estante e rola junto (18/11/2026: antes era fixa e atrasava na rolagem). */
.tm { position: relative; }
.pz3d-tela { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; border-radius: inherit; }
.tm-boneco { position: relative; display: grid; justify-items: center; gap: 4px; flex: none; }
.pz3d { position: relative; }
.pz3d .pz2d { display: block; }
.pz3d.ativo .pz2d { visibility: hidden; }
.tm-boneco:not(.ganha) .pz3d { opacity: 0.75; }
.tm-cadeado { position: absolute; right: 4px; top: 58%; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #6f7f79; color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--t-escuro-1) 25%, transparent); }
.tm-cadeado svg { width: 15px; height: 15px; }
.tm-estrelas-h { display: flex; gap: 2px; font-size: 14px; line-height: 1; }
.tm-estrelas-h i { font-style: normal; color: color-mix(in srgb, var(--metal) 25%, #d6dedb); }
.tm-estrelas-h i.acesa { color: var(--metal); text-shadow: 0 0 8px color-mix(in srgb, var(--metal) 60%, transparent); }
.tm-prox .tm-estrelas-h { font-size: 11px; }
/* Reserva em SVG (sem WebGL ou com "reduzir movimento"): as animações de antes, no personagem. */
@media (prefers-reduced-motion: no-preference) {
  .pz2d.ganha .pz { animation: tm-flutua 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .pz2d.ganha .pz-rosto > ellipse:nth-of-type(-n+2) { animation: pz-pisca 5s infinite; transform-box: fill-box; transform-origin: center; }
  .tm-cartao.ganha:hover .pz2d .pz { animation: pz-pulo .5s ease-out; transform-box: fill-box; transform-origin: center bottom; }
}

