/* Lumora: estilo */
:root {
  --bg: #0b0a1a; --bg2: #15122e; --painel: #1d1940; --painel2: #282352; --linha: #3a3470;
  --tx: #f4f1ff; --tx2: #b9b3e0; --mudo: #8a84b8; --ouro: #ffd447; --acento: #7c5cff; --acento2: #22d3ee;
  --ok: #34d399; --mau: #f87171; --raio: 16px;
  --fogo: #ff6b35; --agua: #2f9bff; --planta: #3fbf5a; --trovao: #f5c400; --pedra: #a8805a; --sombra: #8b5cf6;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
body { background: radial-gradient(120% 70% at 50% -10%, #2b1f6b 0%, var(--bg) 60%) fixed; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; }
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: env(safe-area-inset-top) 0 calc(16px + env(safe-area-inset-bottom)); }
h1, h2, h3 { margin: 0; letter-spacing: .01em; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 800;
  background: linear-gradient(180deg, #8f74ff, #5b3df0); box-shadow: 0 4px 0 #3a23a8, 0 8px 20px rgba(91, 61, 240, .35); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3a23a8; }
.btn.grande { min-height: 54px; font-size: 1.08rem; width: 100%; }
.btn.sec { background: var(--painel2); box-shadow: 0 4px 0 #15122e; }
.btn.perigo { background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 4px 0 #7f1d1d; }
.btn.off, .abtn.off, .alvo-btn.off, .at-btn.off { opacity: .45; filter: grayscale(.6); }
.lbtn { color: var(--tx2); font-weight: 700; padding: 10px 6px; }
.moedas { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; background: rgba(0, 0, 0, .35); padding: 6px 12px 6px 8px; border-radius: 99px; border: 1px solid var(--linha); }
.moeda-ico { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc107 45%, #b07800); box-shadow: inset 0 0 0 2px #c48a00; }

/* ---------- topo ---------- */
.topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(180deg, var(--bg) 70%, transparent); }
.topo h1 { flex: 1; font-size: 1.25rem; font-weight: 900; }
.voltar { width: 40px; height: 40px; border-radius: 12px; background: var(--painel); font-size: 1.8rem; line-height: 1; }

/* ---------- logotipo ---------- */
.logo, .logo-grande { text-align: center; }
.logo span, .logo-grande span { font-weight: 1000; letter-spacing: .14em; background: linear-gradient(100deg, #ffd447, #ff7ad9 45%, #7cc7ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 14px rgba(255, 122, 217, .35)); }
.logo span { font-size: 2.2rem; }
.logo-grande span { font-size: 3.2rem; display: block; }
.logo-grande small { color: var(--tx2); letter-spacing: .3em; text-transform: uppercase; font-size: .75rem; }

/* ---------- boas-vindas ---------- */
.bv { padding: 28px 18px; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.bv p { color: var(--tx2); line-height: 1.5; margin: 0; }
.bv-arte { display: flex; justify-content: center; gap: 4px; }
.bv-cri { width: 110px; animation: flutua 3s ease-in-out infinite; }
.bv-cri:nth-child(2) { animation-delay: .4s; } .bv-cri:nth-child(3) { animation-delay: .8s; }
.campo { display: flex; flex-direction: column; gap: 8px; text-align: left; font-weight: 700; color: var(--tx2); }
.campo input { height: 50px; border-radius: 14px; border: 2px solid var(--linha); background: var(--bg2); color: var(--tx); padding: 0 14px; font-size: 1.05rem; }
.campo input:focus { outline: none; border-color: var(--acento); }
.bv-escolha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bv-op { display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .15s; }
.bv-op:active { transform: scale(.96); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .85rem; padding: 4px 10px; border-radius: 99px; background: var(--painel2); }

/* ---------- menu ---------- */
.menu-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px; }
.perfil { display: flex; align-items: center; gap: 10px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; background: linear-gradient(135deg, #7c5cff, #22d3ee); }
.avatar.peq { width: 28px; height: 28px; border-radius: 9px; font-size: .9rem; }
.xp { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--tx2); }
.xp-barra { width: 90px; height: 7px; border-radius: 9px; background: var(--painel2); overflow: hidden; }
.xp-barra i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #a78bfa); border-radius: 9px; }
.destaque { margin: 10px 14px 16px; border-radius: 22px; overflow: hidden; position: relative; display: block; background: var(--painel); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); cursor: pointer; }
.dest-arte svg { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.dest-txt { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(0deg, rgba(8, 6, 20, .95), transparent); display: flex; flex-direction: column; gap: 2px; }
.dest-txt small { color: var(--acento2); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.dest-txt b { font-size: 1.25rem; }
.dest-txt span { align-self: flex-end; font-weight: 900; background: var(--ouro); color: #3b2a00; padding: 8px 16px; border-radius: 12px; margin-top: -26px; }
.grelha-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.mbtn { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 18px; text-align: left;
  background: linear-gradient(160deg, var(--painel2), var(--painel)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 16px rgba(0, 0, 0, .3); transition: transform .1s; }
.mbtn:active { transform: scale(.97); }
.mbtn .mi { width: 34px; height: 34px; margin-bottom: 4px; color: #c4b5fd; }
.mbtn .mi .ico { width: 100%; height: 100%; }
.ico { width: 1.15em; height: 1.15em; vertical-align: middle; flex: none; }
.mbtn small { color: var(--tx2); font-size: .8rem; }
.ponto { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 4px rgba(255, 77, 109, .25); animation: pulso 1.4s infinite; }
.menu-baixo { display: flex; align-items: center; gap: 10px; padding: 14px; }
.stats { margin-left: auto; color: var(--mudo); font-size: .8rem; }

/* ---------- campanha ---------- */
.mapa { display: flex; flex-direction: column; gap: 10px; padding: 4px 14px 20px; }
.rival { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; text-align: left; position: relative; background: var(--painel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.rival.atual { box-shadow: inset 0 0 0 2px var(--cor), 0 0 24px color-mix(in srgb, var(--cor) 40%, transparent); }
.rival.bloq { opacity: .55; }
.r-arte { width: 92px; flex: none; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; display: grid; place-items: center; background: var(--bg2); }
.r-arte svg { width: 100%; height: 100%; display: block; }
.cadeado { width: 34px; height: 34px; color: var(--mudo); } .cadeado .ico { width: 100%; height: 100%; }
.r-txt { display: flex; flex-direction: column; gap: 1px; }
.r-txt small { color: var(--cor); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.r-txt b { font-size: 1.1rem; } .r-txt > span { color: var(--tx2); font-size: .85rem; }
.r-tipos { display: flex; align-items: center; gap: 4px; color: var(--ouro); font-size: .8rem; margin-top: 3px; }
.medalha { position: absolute; right: 12px; width: 34px; height: 34px; } .medalha .ico { width: 100%; height: 100%; }

/* ---------- ícones de tipo e energia ---------- */
.ico-tipo { width: 1.3em; height: 1.3em; border-radius: 50%; padding: .18em; vertical-align: middle; flex: none; }
.ico-tipo.t-fogo { background: var(--fogo); } .ico-tipo.t-agua { background: var(--agua); } .ico-tipo.t-planta { background: var(--planta); }
.ico-tipo.t-trovao { background: var(--trovao); } .ico-tipo.t-pedra { background: var(--pedra); } .ico-tipo.t-sombra { background: var(--sombra); }
i.en { display: inline-block; width: .95em; height: .95em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffe066 35%, #f59f00); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); vertical-align: middle; }
i.en.vazio { background: rgba(255, 255, 255, .25); }
i.en.rc { background: radial-gradient(circle at 35% 30%, #fff, #cbd5e1 40%, #64748b); }

/* ---------- carta ---------- */
.carta { --c1: #e8e8f0; --c2: #a9adc4; --cf: #2a2d40; position: relative; width: 100%; aspect-ratio: 63/88; container-type: inline-size; border-radius: 5cqw; padding: 3.2cqw;
  display: flex; flex-direction: column; gap: 1.6cqw; overflow: hidden; color: #1a1530; text-align: left;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 0 0 1.4cqw #f6d55c inset, 0 4px 14px rgba(0, 0, 0, .45); }
.carta.t-fogo { --c1: #ffd1a8; --c2: #ff8a4c; } .carta.t-agua { --c1: #c9e8ff; --c2: #5fb0ff; } .carta.t-planta { --c1: #d4f7c5; --c2: #6fd17d; }
.carta.t-trovao { --c1: #fff5b8; --c2: #ffd43b; } .carta.t-pedra { --c1: #efdcc4; --c2: #c09a74; } .carta.t-sombra { --c1: #e2d4ff; --c2: #a37bff; }
.carta.obj { --c1: #e7ecf5; --c2: #9aa7c0; box-shadow: 0 0 0 1.4cqw #c3ccdc inset, 0 4px 14px rgba(0, 0, 0, .45); }
.carta.lendaria { box-shadow: 0 0 0 1.4cqw #ffd447 inset, 0 0 0 2.2cqw #fff3 inset, 0 4px 18px rgba(255, 212, 71, .45); background: linear-gradient(160deg, #fff4c4, var(--c2) 55%, #ffcf4a); }
.c-cab { display: flex; align-items: center; gap: 1.6cqw; padding: 0 1.2cqw; margin-top: .8cqw; }
.c-fase { font-size: 4.2cqw; font-weight: 800; background: rgba(255, 255, 255, .55); border-radius: 2cqw; padding: .4cqw 1.6cqw; white-space: nowrap; }
.c-nome { font-size: 6.6cqw; font-weight: 900; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-pv { font-size: 6.4cqw; font-weight: 900; color: #b0122c; white-space: nowrap; }
.c-pv small { font-size: 3.6cqw; margin-right: .4cqw; }
.c-cab .ico-tipo { width: 8cqw; height: 8cqw; padding: 1.3cqw; }
.c-arte { border-radius: 2.4cqw; overflow: hidden; box-shadow: 0 0 0 1cqw #f6e7a8, 0 0 0 1.4cqw rgba(0, 0, 0, .25); margin: 1cqw; line-height: 0; }
.c-arte svg { width: 100%; height: auto; display: block; }
.c-evo { font-size: 3.7cqw; font-style: italic; text-align: center; color: rgba(26, 21, 48, .8); background: rgba(255, 255, 255, .4); border-radius: 2cqw; padding: .4cqw; margin: 0 2cqw; }
.c-ats { display: flex; flex-direction: column; gap: 1.6cqw; flex: 1; padding: 0 1.4cqw; justify-content: center; }
.c-at-l { display: flex; align-items: center; gap: 1.6cqw; }
.c-at-l b { font-size: 5.4cqw; flex: 1; }
.c-dano { font-size: 7cqw; font-weight: 900; }
.custo { display: inline-flex; gap: .6cqw; }
.carta .custo i.en { width: 4.6cqw; height: 4.6cqw; }
.c-ef { font-size: 3.5cqw; line-height: 1.25; color: rgba(26, 21, 48, .85); margin-top: .4cqw; }
.c-rod { display: flex; justify-content: space-between; gap: 1cqw; font-size: 3.4cqw; font-weight: 700; border-top: .4cqw solid rgba(0, 0, 0, .2); padding: 1.2cqw 1cqw 0; }
.c-rod span { display: inline-flex; align-items: center; gap: .6cqw; white-space: nowrap; }
.c-rod .ico-tipo { width: 4.6cqw; height: 4.6cqw; padding: .7cqw; }
.c-rod i.en { width: 3.6cqw; height: 3.6cqw; }
.c-num { position: absolute; right: 4cqw; bottom: 1.4cqw; font-size: 3cqw; opacity: .7; font-weight: 800; }
.c-texto { font-size: 4.6cqw; line-height: 1.35; padding: 1cqw 2.4cqw; flex: 1; font-weight: 600; }
.c-regra { font-size: 3.4cqw; text-align: center; opacity: .7; margin-bottom: 4cqw; font-style: italic; }
.rar { letter-spacing: -.1em; }
.r-rara .rar, .r-lendaria .rar { color: #b8860b; }
.carta .brilho { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }

/* holográfica: reflexo arco-íris que segue o toque / a inclinação */
.carta.holo .brilho { background: linear-gradient(115deg, transparent 20%, rgba(255, 0, 170, .35) 35%, rgba(0, 255, 230, .35) 45%, rgba(255, 240, 0, .35) 55%, rgba(120, 80, 255, .35) 65%, transparent 80%);
  background-size: 250% 250%; background-position: var(--mx, 50%) var(--my, 50%); mix-blend-mode: color-dodge; opacity: .75; animation: holo 5s ease-in-out infinite; }
.carta.holo.grande .brilho { animation: none; }
.carta.holo::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255, 255, 255, .55), transparent 45%); mix-blend-mode: overlay; }
.carta.brilhante { box-shadow: 0 0 0 1.4cqw #e5e7eb inset, 0 0 0 2.4cqw rgba(255, 255, 255, .5) inset, 0 0 22px rgba(167, 139, 250, .8); }
.cintila { transform-box: fill-box; transform-origin: center; animation: cintila 1.6s ease-in-out infinite; }

/* verso */
.carta.verso { background: radial-gradient(circle at 50% 40%, #6d4aff, #24125e 70%); box-shadow: 0 0 0 1.6cqw #ffd447 inset, 0 4px 14px rgba(0, 0, 0, .5); display: grid; place-items: center; }
.verso-logo { width: 44cqw; height: 44cqw; border-radius: 50%; display: grid; place-items: center; font-size: 26cqw; font-weight: 1000; color: #24125e;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffd447 55%, #c58b00); box-shadow: 0 0 0 3cqw rgba(255, 255, 255, .15), 0 0 30px rgba(255, 212, 71, .6); }
.carta.silhueta { background: var(--painel); box-shadow: inset 0 0 0 2px var(--linha); display: grid; place-items: center; color: var(--mudo); font-weight: 800; font-size: 6cqw; }
.carta.silhueta svg { position: absolute; inset: 20% 5%; width: 90%; filter: brightness(0) opacity(.35); }
.carta.silhueta span { position: absolute; bottom: 6cqw; }

/* carta grande (com inclinação 3D) */
.carta.grande { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s ease-out; will-change: transform; }

/* ---------- folhas (janelas por baixo) ---------- */
.folha-fundo { position: fixed; inset: 0; z-index: 50; background: rgba(5, 4, 15, .6); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.folha-fundo.aberta { opacity: 1; }
.folha { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, var(--painel2), var(--bg2)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); transform: translateY(30px); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
  display: flex; flex-direction: column; gap: 12px; }
.folha-fundo.aberta .folha { transform: none; }
.folha h3 { font-size: 1.2rem; }
.fechar { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 1rem; z-index: 2; }
.ver-carta { width: min(72vw, 300px); margin: 0 auto; }
.nota { color: var(--tx2); font-size: .88rem; margin: 0; line-height: 1.45; }
.alvos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.alvo-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 14px; background: var(--painel); box-shadow: inset 0 0 0 1px var(--linha); }
.alvo-btn svg { width: 80px; height: 60px; }
.alvo-btn small { color: var(--tx2); font-size: .78rem; }
.ataques { display: flex; flex-direction: column; gap: 8px; }
.at-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, #ff8a4c, #e5482b); box-shadow: 0 4px 0 #8f2412; font-weight: 800; text-align: left; }
.at-btn b { flex: 1; } .at-dano { font-size: 1.3rem; font-weight: 900; }
.at-dano em { font-size: .7rem; font-style: normal; background: #fff; color: #c2410c; border-radius: 6px; padding: 2px 5px; vertical-align: middle; }
.at-dano em.fraca { color: #475569; }
.peca-estado { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-weight: 700; font-size: .9rem; color: var(--tx2); }
.peca-estado span { background: var(--painel); padding: 5px 10px; border-radius: 99px; }
.escolha-cartas { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.esc-carta { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.esc-pv { font-size: .8rem; color: var(--tx2); font-weight: 700; }
.variantes { display: flex; justify-content: center; gap: 8px; }

/* ---------- textos ---------- */
.texto { padding: 6px 18px 24px; line-height: 1.55; color: var(--tx2); }
.texto h3 { color: var(--tx); margin: 18px 0 6px; }
.texto ol { padding-left: 20px; margin: 0; }
.tabela-tipos { display: grid; gap: 6px; }
.tabela-tipos div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--painel); padding: 8px 10px; border-radius: 12px; }
.tabela-tipos span { margin-left: auto; font-size: .85rem; }
.opcao { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linha); font-weight: 700; color: var(--tx); }
.opcao input { width: 22px; height: 22px; accent-color: var(--acento); }
.texto .btn { margin-top: 8px; }

/* ---------- loja e saquetas ---------- */
.loja { padding: 0 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.aviso-saq { background: linear-gradient(90deg, #7c5cff, #22d3ee); padding: 12px; border-radius: 14px; text-align: center; font-weight: 700; }
.saq-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.saqueta { --s1: #7c5cff; --s2: #2b1680; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 12px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, var(--s1), var(--s2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 6px 14px rgba(0, 0, 0, .4); transition: transform .1s; }
.saqueta::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%); background-size: 300% 100%; animation: reluz 3s linear infinite; }
.saqueta:active { transform: scale(.96); }
.s-fogo { --s1: #ff8a4c; --s2: #7a1d0b; } .s-agua { --s1: #4fb0ff; --s2: #0b3a7a; } .s-planta { --s1: #5fcf6c; --s2: #0e4a1d; }
.s-trovao { --s1: #ffd43b; --s2: #7a5a00; } .s-pedra { --s1: #c09a74; --s2: #4a3220; } .s-sombra { --s1: #a37bff; --s2: #2a0f63; }
.s-arte { width: 100%; } .s-arte svg { width: 100%; display: block; }
.saqueta b { font-weight: 900; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.saqueta small { font-size: .7rem; opacity: .85; }
.preco { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; background: rgba(0, 0, 0, .35); padding: 3px 10px; border-radius: 99px; margin-top: 4px; }
.saq-info { display: flex; flex-direction: column; gap: 10px; }
.saq-info p { color: var(--tx2); font-size: .88rem; line-height: 1.5; margin: 0; }
.ecra-abrir { display: flex; }
.abrir { min-height: 100dvh; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px 12px; }
.dica { color: var(--tx2); font-weight: 700; margin: 0; animation: pulso 1.6s infinite; }
.saqueta.grande { width: 220px; padding: 20px 14px 26px; animation: flutua 2.4s ease-in-out infinite; }
.saqueta.grande b { font-size: 1.6rem; }
.saqueta.rasga { animation: rasga .6s forwards; }
.leque { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.vira { width: 30%; max-width: 150px; perspective: 900px; position: relative; animation: entra .5s backwards; animation-delay: calc(var(--i) * .08s); }
.vira-in { position: relative; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); transform-style: preserve-3d; }
.vira-in > .carta { backface-visibility: hidden; }
.vira-in > .frente { position: absolute; inset: 0; transform: rotateY(180deg); }
.vira.virada .vira-in { transform: rotateY(180deg); }
.vira.uau.virada { filter: drop-shadow(0 0 14px #ffd447); }
.nova { position: absolute; top: -8px; right: -6px; z-index: 3; background: #ff4d6d; font-weight: 900; font-size: .7rem; padding: 3px 7px; border-radius: 8px; opacity: 0; transform: scale(.4); transition: .3s .45s; }
.vira.virada .nova { opacity: 1; transform: none; }
.abrir-btns { display: flex; gap: 10px; }

/* ---------- coleção / baralho ---------- */
.col-prog { display: flex; align-items: center; gap: 10px; padding: 0 14px 6px; color: var(--tx2); }
.col-prog .xp-barra { flex: 1; width: auto; }
.filtros { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 7px 12px; border-radius: 99px; background: var(--painel); font-weight: 700; font-size: .85rem; box-shadow: inset 0 0 0 1px var(--linha); }
.filtro.on { background: var(--acento); box-shadow: none; }
.grelha-cartas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 14px 24px; }
.slot { position: relative; display: block; }
.slot.esgotada { opacity: .4; }
.qtd { position: absolute; bottom: -6px; right: -4px; background: var(--bg); border: 2px solid var(--linha); border-radius: 99px; font-size: .75rem; font-weight: 900; padding: 1px 7px; }
.bar-estado { margin: 0 14px; padding: 12px 14px; border-radius: 14px; display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.bar-estado b { font-size: 1.3rem; }
.bar-estado.ok { background: rgba(52, 211, 153, .15); box-shadow: inset 0 0 0 1px var(--ok); }
.bar-estado.mau { background: rgba(248, 113, 113, .12); box-shadow: inset 0 0 0 1px var(--mau); }
.bar-acoes { display: flex; gap: 8px; padding: 10px 14px; }
.bar-acoes .btn { flex: 1; min-height: 40px; font-size: .9rem; }
.sub { padding: 10px 14px 4px; font-size: 1rem; } .sub small { color: var(--mudo); font-weight: 500; }
.bar-lista { display: flex; flex-direction: column; gap: 6px; padding: 4px 14px; }
.bar-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--painel); text-align: left; border-left: 4px solid var(--linha); }
.bar-item.t-fogo { border-color: var(--fogo); } .bar-item.t-agua { border-color: var(--agua); } .bar-item.t-planta { border-color: var(--planta); }
.bar-item.t-trovao { border-color: var(--trovao); } .bar-item.t-pedra { border-color: var(--pedra); } .bar-item.t-sombra { border-color: var(--sombra); }
.bi-arte { width: 44px; height: 33px; flex: none; border-radius: 6px; overflow: hidden; } .bi-arte svg { width: 100%; height: 100%; }
.bar-item b { flex: 1; } .bar-item small { color: var(--tx2); font-size: .78rem; }
.bi-n { font-weight: 900; color: var(--ouro); }

/* ---------- batalha ---------- */
.ecra-batalha { padding: 0 !important; }
.bt { height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto auto; gap: 4px; padding: calc(6px + env(safe-area-inset-top)) 8px calc(6px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 40% at 50% 30%, rgba(124, 92, 255, .22), transparent), radial-gradient(90% 40% at 50% 75%, rgba(34, 211, 238, .14), transparent); overflow: hidden; }
.bt-info { display: flex; align-items: center; gap: 8px; font-size: .88rem; padding: 0 4px; }
.bt-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.pts { display: inline-flex; gap: 4px; }
.pts i { width: 14px; height: 14px; border-radius: 50%; background: var(--painel2); box-shadow: inset 0 0 0 2px var(--linha); }
.pts i.on { background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd447 50%, #c58b00); box-shadow: 0 0 10px #ffd447; }
.contas { margin-left: auto; display: flex; gap: 10px; color: var(--tx2); font-weight: 700; }
.menu-bt { width: 32px; height: 32px; border-radius: 10px; background: var(--painel); font-weight: 900; }
.bt-banco { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bt-campo { display: flex; justify-content: center; align-items: center; min-height: 0; }
.bt-meio { display: flex; align-items: center; gap: 8px; padding: 2px 4px; min-height: 28px; }
.turno-ind { font-weight: 900; font-size: .78rem; padding: 4px 10px; border-radius: 99px; background: var(--painel2); white-space: nowrap; }
.turno-ind.p { background: linear-gradient(90deg, #22d3ee, #7c5cff); }
.registo { font-size: .8rem; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* criatura em jogo */
.peca { position: relative; display: flex; flex-direction: column; border-radius: 12px; overflow: visible; background: var(--painel); box-shadow: inset 0 0 0 2px var(--linha); text-align: left; min-width: 0; }
.peca.t-fogo { box-shadow: inset 0 0 0 2px var(--fogo); } .peca.t-agua { box-shadow: inset 0 0 0 2px var(--agua); } .peca.t-planta { box-shadow: inset 0 0 0 2px var(--planta); }
.peca.t-trovao { box-shadow: inset 0 0 0 2px var(--trovao); } .peca.t-pedra { box-shadow: inset 0 0 0 2px var(--pedra); } .peca.t-sombra { box-shadow: inset 0 0 0 2px var(--sombra); }
.peca.lendaria { box-shadow: inset 0 0 0 2px #ffd447, 0 0 14px rgba(255, 212, 71, .5); }
.peca.vazia { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .07); border: 0; min-height: 64px; }
.peca.vazia.ativa { width: min(62vw, 270px); height: 100%; max-height: 300px; }
.p-arte { line-height: 0; border-radius: 12px 12px 0 0; overflow: hidden; margin: 2px 2px 0; }
.p-arte svg { width: 100%; height: auto; display: block; }
.p-info { padding: 3px 6px 5px; display: flex; flex-direction: column; gap: 2px; }
.p-nome { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-pv { height: 5px; border-radius: 9px; background: rgba(0, 0, 0, .5); overflow: hidden; }
.barra { height: 100%; border-radius: 9px; transition: width .4s; }
.barra.ok { background: linear-gradient(90deg, #22c55e, #86efac); } .barra.meio { background: linear-gradient(90deg, #eab308, #fde047); } .barra.mau { background: linear-gradient(90deg, #dc2626, #f87171); }
.p-lin { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.p-num { font-size: .66rem; color: var(--tx2); font-weight: 700; }
.p-en { display: inline-flex; flex-wrap: wrap; gap: 2px; font-size: .62rem; font-weight: 800; color: var(--ouro); }
.p-en i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffe066 35%, #f59f00); }
.p-est { position: absolute; top: 4px; left: 4px; display: flex; gap: 2px; }
.est { display: inline-grid; place-items: center; width: 20px; height: 20px; background: rgba(0, 0, 0, .7); border-radius: 7px; } .est .ico { width: 15px; height: 15px; }
.p-fase { position: absolute; top: 4px; right: 4px; font-size: .58rem; font-weight: 900; background: rgba(0, 0, 0, .6); border-radius: 6px; padding: 1px 4px; }
.peca.ativa { width: min(62vw, 270px); height: 100%; max-height: 300px; }
.peca.ativa .p-arte { flex: 1; min-height: 0; }
.peca.ativa .p-arte svg { height: 100%; }
.peca.ativa .p-nome { font-size: .95rem; } .peca.ativa .p-pv { height: 8px; } .peca.ativa .p-num { font-size: .8rem; }
.peca.ativa .p-en i { width: 11px; height: 11px; }
@media (max-height: 660px) { .bt-banco .p-arte { display: none; } }
.bt-banco .peca { min-height: 64px; }
.bt-banco .p-arte { height: 46px; }
.bt-banco .p-arte svg { height: 100%; }
.contas .ico { width: 15px; height: 15px; }
.abtn .ico { width: 18px; height: 18px; }
.extra .ico, .premios .ico { width: 1.3em; height: 1.3em; }

.bt-mao { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 4px; scrollbar-width: none; min-height: 112px; }
.bt-mao::-webkit-scrollbar { display: none; }
.mao-carta { flex: 0 0 76px; transition: transform .15s; }
.mao-carta.jogavel { transform: translateY(-4px); filter: drop-shadow(0 0 7px rgba(124, 228, 255, .9)); }
.mao-carta:active { transform: scale(.95); }
.bt-acoes { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 6px; }
.abtn { min-height: 46px; border-radius: 14px; font-weight: 900; font-size: .92rem; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--painel2); box-shadow: 0 3px 0 #0f0c24; }
.abtn.energia { background: linear-gradient(180deg, #ffd447, #f59f00); color: #3b2a00; box-shadow: 0 3px 0 #8a5a00; }
.abtn.atacar { background: linear-gradient(180deg, #ff6b4a, #d62f1f); box-shadow: 0 3px 0 #7a1a10; }
.abtn.pulsa { animation: brilha 1.6s ease-in-out infinite; }

/* animações de batalha */
.peca.investe-cima { animation: investeCima .42s ease-in-out; z-index: 3; }
.peca.investe-baixo { animation: investeBaixo .42s ease-in-out; z-index: 3; }
.peca.treme { animation: treme .45s; }
.peca.treme::after { content: ''; position: absolute; inset: 0; border-radius: 12px; background: rgba(255, 40, 40, .45); animation: some .45s forwards; }
.peca.cai { animation: cai .8s forwards; }
.peca.evolui { animation: evolui 1.1s; }
.peca.pop .p-en i:last-child { animation: pop .4s; }
.flutua { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-weight: 1000; font-size: 1.8rem; pointer-events: none; z-index: 10; white-space: nowrap;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, .7); animation: sobe 1.1s ease-out forwards; }
.flutua.dano { color: #ff5d5d; } .flutua.dano.forte { color: #ffd447; font-size: 2.3rem; }
.flutua.cura { color: #4ade80; }
.flutua.etiqueta { font-size: .95rem; top: 10%; background: #fff; color: #c2410c; padding: 2px 8px; border-radius: 8px; text-shadow: none; }
.flutua.etiqueta.fraca { color: #475569; }
.flutua.etiqueta.burn { color: #ea580c; } .flutua.etiqueta.poison { color: #7c3aed; } .flutua.etiqueta.para { color: #ca8a04; }
.faixa { position: fixed; left: 0; right: 0; top: 42%; z-index: 40; display: flex; justify-content: center; pointer-events: none; }
.faixa span { font-weight: 1000; font-size: 1.5rem; padding: 10px 26px; border-radius: 14px; background: linear-gradient(90deg, #7c5cff, #22d3ee); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: faixa 1.3s cubic-bezier(.2, .9, .3, 1) forwards; text-align: center; max-width: 90vw; }
.faixa.o span { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.faixa.ataque span { background: linear-gradient(90deg, #ff6b4a, #ffb347); font-size: 1.3rem; }
.faixa.ko span { background: linear-gradient(90deg, #111, #4b1d1d); }
.faixa.evo span { background: linear-gradient(90deg, #ffd447, #ff7ad9, #7cc7ff); color: #1a1530; }
.faixa.moeda span, .faixa.obj span { background: var(--painel2); font-size: 1.15rem; }

/* intro e resultado */
.intro-rival, .resultado { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.intro-rival small { color: var(--cor); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.intro-rival h2 { font-size: 2rem; }
.titulo { color: var(--tx2); margin: 0; } .frase { font-style: italic; margin: 0; }
.moeda-anim { perspective: 600px; margin: 8px 0; }
.moeda-face { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-weight: 1000; font-size: 1.3rem; color: #5a3d00;
  background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc107 50%, #b07800); box-shadow: inset 0 0 0 4px #c48a00, 0 0 24px rgba(255, 212, 71, .6); animation: girar 1.2s ease-out; }
.resultado h2 { font-size: 2.4rem; }
.resultado.vit h2 { background: linear-gradient(90deg, #ffd447, #ff7ad9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.resultado p { margin: 0; color: var(--tx2); }
.premios { display: flex; gap: 12px; font-weight: 900; font-size: 1.2rem; margin: 6px 0; }
.premios span { display: inline-flex; align-items: center; gap: 6px; background: var(--painel); padding: 8px 14px; border-radius: 12px; }
.extra { color: var(--ouro) !important; font-weight: 800; }
.res-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }

/* toasts */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(20, 16, 45, .96); border: 1px solid var(--linha); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: .9rem; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); animation: entra .25s; transition: opacity .3s, transform .3s; }
.toast.mau { border-color: var(--mau); }
.toast.sai { opacity: 0; transform: translateY(8px); }

/* ---------- animações ---------- */
@keyframes flutua { 50% { transform: translateY(-8px); } }
@keyframes pulso { 50% { opacity: .55; } }
@keyframes brilha { 50% { filter: brightness(1.25); box-shadow: 0 3px 0 rgba(0, 0, 0, .4), 0 0 18px currentColor; } }
@keyframes holo { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
@keyframes cintila { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: 1; transform: scale(1); } }
@keyframes reluz { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes rasga { 40% { transform: scale(1.08) rotate(-3deg); } 100% { transform: scale(1.4) translateY(-60px); opacity: 0; filter: brightness(3); } }
@keyframes entra { from { opacity: 0; transform: translateY(16px) scale(.9); } }
@keyframes investeCima { 50% { transform: translateY(-38px) scale(1.06); } }
@keyframes investeBaixo { 50% { transform: translateY(38px) scale(1.06); } }
@keyframes treme { 20% { transform: translateX(-8px) rotate(-2deg); } 40% { transform: translateX(7px) rotate(2deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes some { to { opacity: 0; } }
@keyframes cai { 30% { transform: scale(1.05); filter: brightness(2); } 100% { transform: scale(.4) translateY(30px) rotate(-12deg); opacity: 0; filter: grayscale(1); } }
@keyframes evolui { 0% { filter: brightness(1); } 30% { filter: brightness(4) saturate(0); transform: scale(1.12); } 60% { filter: brightness(2.5); transform: scale(.96); } 100% { filter: none; transform: none; } }
@keyframes pop { 50% { transform: scale(2); } }
@keyframes sobe { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
@keyframes faixa { 0% { opacity: 0; transform: scale(.6) translateY(10px); } 15% { opacity: 1; transform: scale(1.05); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes girar { from { transform: rotateY(0) translateY(-30px); } 60% { transform: rotateY(1440deg) translateY(-10px); } to { transform: rotateY(1800deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.dest-txt b em.tit { font-style: normal; }
