/* Layout: telas de altura fixa no formato vertical (como celular em pé), centradas no PC. */
html, body { height: 100%; }
body {
  background: radial-gradient(120% 70% at 50% 0%, var(--night-2), var(--night) 65%);
  overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#app { height: 100%; max-width: 520px; margin: 0 auto; position: relative; }
.screen {
  height: 100%; display: flex; flex-direction: column; gap: 12px;
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-block: 10px;
}
.muted { color: var(--muted); }
.topbar { display: flex; align-items: center; gap: 12px; }
.brand { font: 400 18px var(--display); color: var(--gold); text-decoration: none; text-shadow: 0 2px 0 var(--sakura); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.who .tr { color: var(--gold); }
.who a { font-size: 13px; }

/* menu */
.lobby-main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.arena-badge { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 3px solid var(--outline); border-radius: 22px; padding: 18px 28px; box-shadow: 0 0 0 2px var(--line); margin-bottom: 8px; }
.arena-name { font: 400 16px var(--display); color: var(--sakura-2); }
.trophy-big { font: 400 34px var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--outline); }
.btn.battle { font-size: 26px; padding: 16px 40px; width: min(340px, 100%); }
.lobby-main .btn.alt { width: min(340px, 100%); }
.deck-grid .card { max-height: 17vh; margin: 0 auto; }
.lobby-main { overflow: hidden; }
@media (max-height: 700px) { .arena-badge { padding: 10px 20px; } .trophy-big { font-size: 26px; } .btn.battle { font-size: 22px; padding: 12px 30px; } }
.online { font-size: 13px; color: var(--muted); font-weight: 700; min-height: 1.4em; }
.deck-panel { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.deck-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.deck-head h2 { font-size: 18px; }
.avg { font-size: 13px; color: var(--muted); font-weight: 800; margin-right: auto; }
.deck-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.deck-grid .card, .coll-grid .card { cursor: pointer; }
.deck-grid .slot { background: none; border: 0; padding: 0; }
.slot.sel .card { box-shadow: 0 0 0 3px var(--gold), 0 6px 0 var(--outline); transform: translateY(-4px); }

/* montagem */
.bhint { font-size: 13px; color: var(--muted); font-weight: 700; }
.collection { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.coll-grid { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 4px 2px 12px; align-content: start; }
.coll-grid .slot { background: none; border: 0; padding: 0; position: relative; }
.coll-grid .slot.in .card { filter: brightness(.45) grayscale(.5); }
.coll-grid .slot.in::after { content: "No baralho"; position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) rotate(-12deg); font: 400 10px var(--display); background: var(--gold); color: var(--outline); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .chip { font-size: 12px; padding: 4px 10px; }
.info { min-height: 52px; font-size: 13px; color: var(--muted); background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 8px 12px; }
.info b { color: var(--ink); }
@media (max-width: 420px) { .coll-grid { grid-template-columns: repeat(4, 1fr); } }

/* partida */
#game { gap: 6px; padding-block: 6px; }
.hud-top, .player { display: flex; align-items: center; gap: 8px; }
.hud-top { justify-content: space-between; }
.player .pname { font: 400 14px var(--display); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .ptr { font-size: 12px; color: var(--gold); font-weight: 800; }
.foe .pname { color: #ffa3ba; }
.me .pname { color: #9cc4ff; }
.crowns { display: inline-flex; gap: 2px; }
.crowns i { width: 16px; height: 14px; display: inline-block; background: rgba(255, 255, 255, .15); clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 0, 75% 60%, 100% 30%, 100% 100%); }
.crowns i.on { background: var(--gold); }
.foe .crowns i.on { background: #ff6f8f; }
.me .crowns i.on { background: #6fb0ff; }
.clock { text-align: center; line-height: 1; }
#clock { font: 400 24px var(--display); font-variant-numeric: tabular-nums; }
.phase { font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; min-height: 1em; margin-top: 2px; }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font-size: 18px; cursor: pointer; }
.iconbtn.small { width: 32px; height: 32px; font-size: 15px; margin-left: auto; }
.arena-wrap { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; }
.arena-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 3px var(--outline), 0 0 0 5px var(--line), 0 20px 50px rgba(0, 0, 0, .5); }
.arena-wrap .gl, .arena-wrap .ov { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.arena-wrap .gl { pointer-events: none; }
.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font: 400 34px var(--display); color: var(--gold); text-shadow: 0 4px 0 var(--outline), 0 0 24px rgba(255, 210, 63, .6);
  animation: bannerIn .4s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
.emotes { position: absolute; left: 8px; bottom: 8px; display: grid; grid-template-columns: repeat(3, auto); gap: 6px; background: rgba(10, 6, 30, .85); padding: 8px; border-radius: 14px; border: 2px solid var(--line); }
.emotes button { font: 400 13px var(--display); color: var(--outline); background: #fff; border: 2px solid var(--outline); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.hud-bottom { background: linear-gradient(180deg, #2a1f66, #1a1245); border: 2px solid var(--outline); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 0 0 1px var(--line); }
.hand { display: grid; grid-template-columns: .7fr repeat(4, 1fr); gap: 6px; align-items: end; }
.hand .slot { background: none; border: 0; padding: 0; cursor: pointer; transition: transform .12s ease; touch-action: none; }
.hand .slot .card { max-height: 13vh; margin: 0 auto; }
.hand .slot.sel { transform: translateY(-10px); }
.hand .slot.sel .card { box-shadow: 0 0 0 3px var(--gold), 0 6px 0 var(--outline), 0 0 18px rgba(255, 210, 63, .6); }
.hand .slot.off .card img { filter: grayscale(.85) brightness(.55); }
.hand .next { opacity: .8; transform: scale(.85); transform-origin: bottom center; cursor: default; }
.hand .next-l { font-size: 9px; font-weight: 800; color: var(--muted); text-align: center; letter-spacing: .1em; text-transform: uppercase; }
.hand .card .nm { font-size: 10px; padding-bottom: 4px; }
.hand .card .cost { width: 24px; height: 24px; font-size: 12px; top: 3px; left: 3px; }
.aura { display: flex; align-items: center; gap: 8px; }
.aura-drop { width: 34px; height: 34px; flex: none; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffb3ff, #c03bff 55%, #6a0fb0); border: 2px solid var(--outline); font: 400 16px var(--display); text-shadow: 0 1px 0 var(--outline); }
.aura-bar { position: relative; flex: 1; height: 20px; border-radius: 999px; background: #0c0726; border: 2px solid var(--outline); overflow: hidden; }
.aura-fill { position: absolute; inset: 0 auto 0 0; width: 50%; background: linear-gradient(180deg, #f3a6ff, #c03bff 60%, #8a1fd0); }
.aura-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(12, 7, 38, .85) calc(10% - 2px) 10%); }
.aura-bar.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.toast { position: absolute; left: 50%; bottom: 190px; transform: translateX(-50%); background: rgba(10, 6, 30, .9); border: 2px solid var(--danger); color: #ffd0da; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 12px; pointer-events: none; white-space: nowrap; }

.modal.center { text-align: center; }
.stack { display: grid; gap: 10px; margin-top: 14px; }
.spinner { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .15); border-top-color: var(--sakura); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result { font-size: 46px; text-shadow: 0 4px 0 var(--outline); }
.result.win { color: var(--gold); } .result.lose { color: #ffa3ba; } .result.draw { color: var(--muted); }
.rcrowns { font: 400 22px var(--display); margin: 10px 0; }
.rtroph { color: var(--muted); font-weight: 800; margin: 0 0 18px; }

/* ───────── acabamento da tela de batalha ───────── */
#clock.danger { color: #ff5c7a; animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.15); text-shadow: 0 0 14px rgba(255, 70, 100, .8); } }
.hud-top .player { background: linear-gradient(180deg, rgba(255, 61, 110, .28), rgba(255, 61, 110, .1)); border: 2px solid rgba(255, 120, 150, .35); border-radius: 12px; padding: 4px 10px; }
.hud-bottom .player { background: linear-gradient(180deg, rgba(61, 139, 255, .3), rgba(61, 139, 255, .1)); border: 2px solid rgba(120, 170, 255, .35); border-radius: 12px; padding: 3px 4px 3px 10px; }
.crowns i { width: 20px; height: 17px; }
.hud-bottom {
  background: linear-gradient(180deg, #3a2a86 0%, #261a62 40%, #1a1247 100%);
  border: 3px solid var(--outline); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 0 0 2px rgba(255, 210, 63, .35), 0 10px 30px rgba(0, 0, 0, .45);
}
.hand .card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .12) 100%); pointer-events: none; }
.hand .slot:not(.off):not(.next):hover { transform: translateY(-4px); }
.hand .slot.sel { animation: bob .8s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-10px); } to { transform: translateY(-14px); } }
.aura-bar.full { box-shadow: 0 0 0 2px #f3a6ff, 0 0 16px rgba(220, 120, 255, .8); animation: glow 0.8s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 2px #ffffff, 0 0 26px rgba(240, 160, 255, 1); } }
.aura-fill { transition: width .15s linear; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35); }

/* ───────── tela de resultado ───────── */
#endModal .modal { position: relative; overflow: hidden; padding-top: 30px; }
.result { animation: resultIn .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes resultIn { from { transform: scale(.2) rotate(-8deg); opacity: 0; } }
.rcrowns { display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 16px; }
.rcrowns .side { display: grid; gap: 6px; justify-items: center; }
.rcrowns .row { display: flex; gap: 4px; }
.rcrowns i { width: 34px; height: 28px; display: inline-block; background: rgba(255, 255, 255, .14); clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 0, 75% 60%, 100% 30%, 100% 100%); }
.rcrowns i.on { animation: crownIn .45s cubic-bezier(.2, 1.8, .4, 1) both; }
.rcrowns .me i.on { background: linear-gradient(180deg, #bfe0ff, #3d8bff); }
.rcrowns .foe i.on { background: linear-gradient(180deg, #ffc2d0, #ff3d6e); }
@keyframes crownIn { from { transform: scale(0) translateY(-20px); } }
.rcrowns .vs { font: 400 22px var(--display); color: var(--muted); }
.confetti { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(520px) rotate(720deg); opacity: .2; } }

/* ───────── menu principal (lobby) ───────── */
#lobby { gap: 10px; padding-bottom: 0; }
.lob-top { display: flex; align-items: center; gap: 10px; }
.profile { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; background: linear-gradient(180deg, #3a2a86, #241a5c); border: 3px solid var(--outline); border-radius: 16px; padding: 6px 12px 6px 6px; box-shadow: inset 0 2px 0 rgba(255,255,255,.15); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 400 20px var(--display); color: var(--outline); background: linear-gradient(180deg, #ffe58a, var(--gold) 50%, var(--gold-2)); border: 3px solid var(--outline); }
.pinfo { min-width: 0; flex: 1; }
.pname2 { font: 400 15px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp { position: relative; height: 16px; border-radius: 999px; background: #120b33; border: 2px solid var(--outline); overflow: hidden; margin-top: 3px; }
.xp-fill { position: absolute; inset: 0 auto 0 0; width: 20%; background: linear-gradient(180deg, #8fe0ff, #3d8bff); }
.xp span { position: relative; display: block; text-align: center; font: 800 10px/12px var(--body); text-shadow: 0 1px 0 var(--outline); }
.cur { display: flex; align-items: center; gap: 8px; }
.money { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.35); border: 2px solid var(--outline); border-radius: 999px; padding: 4px 12px 4px 4px; font: 400 15px var(--display); color: var(--gold); }
.ico-trophy { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff3a8, var(--gold) 55%, var(--gold-2)); border: 2px solid var(--outline); position: relative; }
.ico-trophy::after { content: ""; position: absolute; inset: 5px 6px 6px; background: var(--outline); clip-path: polygon(0 0, 100% 0, 85% 45%, 60% 60%, 60% 80%, 80% 80%, 80% 100%, 20% 100%, 20% 80%, 40% 80%, 40% 60%, 15% 45%); opacity: .75; }
.tab-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
#tab-battle { align-items: stretch; justify-content: flex-start; }
#tab-battle > * { flex-shrink: 0; }
.arena-card { position: relative; border-radius: 20px; overflow: hidden; border: 3px solid var(--outline); box-shadow: 0 0 0 2px rgba(255,210,63,.4), 0 14px 30px rgba(0,0,0,.45); aspect-ratio: 16 / 10; flex: none; max-height: 38vh; }
.arena-card canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.arena-label { position: absolute; left: 12px; top: 10px; display: grid; line-height: 1.05; }
.arena-num { font: 800 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 0 var(--outline); }
.arena-title { font: 400 22px var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--outline); }
.feat-hero { position: absolute; right: 4%; bottom: 0; height: 88%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); transition: opacity .4s ease, transform .4s ease; }
.feat-hero.out { opacity: 0; transform: translateY(14px) scale(.95); }
.feat-name { position: absolute; right: 10px; bottom: 8px; font: 400 13px var(--display); background: rgba(27,18,48,.8); border: 2px solid var(--outline); border-radius: 10px; padding: 2px 10px; }
.road { background: rgba(0,0,0,.25); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.road-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 5px; }
.road-top span:last-child { color: var(--gold); font-variant-numeric: tabular-nums; }
.road-bar { height: 14px; border-radius: 999px; background: #120b33; border: 2px solid var(--outline); overflow: hidden; }
.road-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: inset 0 2px 0 rgba(255,255,255,.4); }
.btn.battle { flex-direction: column; gap: 0; font-size: 30px; padding: 12px 20px; width: 100%; animation: battleGlow 1.6s ease-in-out infinite alternate; }
.btn.battle small { font: 800 11px var(--body); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
@keyframes battleGlow { to { box-shadow: 0 5px 0 var(--outline), 0 0 28px rgba(255, 210, 63, .7); } }
.btn.train { width: 100%; font-size: 16px; padding: 10px; }
.tip { color: var(--muted); font-size: 13px; font-weight: 700; margin: 0; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.25); font-weight: 800; }
.rank .pos { font: 400 14px var(--display); color: var(--muted); text-align: center; }
.rank li:nth-child(1) .pos { color: var(--gold); } .rank li:nth-child(2) .pos { color: #dfe6f0; } .rank li:nth-child(3) .pos { color: #ff9d3b; }
.rank .tr { color: var(--gold); font-variant-numeric: tabular-nums; }
.rank .empty { display: block; color: var(--muted); }
.soon { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--outline); background: var(--sakura-2); padding: 3px 10px; border-radius: 999px; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.offer-card { display: grid; gap: 4px; text-align: center; background: linear-gradient(180deg, #3a2a86, #241a5c); border: 3px solid var(--outline); border-radius: 14px; padding: 8px; font-size: 13px; }
.offer-card small { color: var(--muted); font-weight: 700; font-size: 11px; }
.oc-art { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--outline); }
.oc-pass { background: radial-gradient(circle at 50% 40%, #fff3a8, var(--gold) 40%, #b86b00); }
.oc-gems { background: radial-gradient(circle at 50% 40%, #b8ffd8, #2fd38a 40%, #0b7a4a); }
.oc-skin { background: radial-gradient(circle at 50% 40%, #ffd0e6, #ff6fae 40%, #9a1f5a); }
.account { display: grid; gap: 10px; }
.account p { margin: 0; color: var(--muted); }
.pw-form { display: grid; gap: 8px; max-width: 360px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.2); }
.pw-form h3 { font-size: 18px; margin: 0; }
.pw-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pw-form input { font: 700 15px var(--body); color: #fff; background: rgba(0,0,0,.3); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pw-form input:focus { border-color: var(--sakura); outline: none; }
.account .pw-msg { margin: 0; font-size: 13px; font-weight: 800; color: #ffc2cf; }
.account .pw-msg.ok { color: #9ff0b8; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: linear-gradient(180deg, #2a1f66, #150e3a); border-top: 3px solid var(--outline); margin: 0 calc(-1 * max(14px, env(safe-area-inset-left, 0px))); padding: 6px max(10px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); }
.tabbar button { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font: 800 11px var(--body); padding: 6px 0; border-radius: 12px; cursor: pointer; }
.tabbar button.on { background: linear-gradient(180deg, #4b39a8, #2f2373); color: #fff; box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 0 0 2px var(--outline); transform: translateY(-6px); }
.ti { width: 30px; height: 30px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tabbar button.on .ti { background: var(--gold); }
.ti-shop { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 7V6a6 6 0 0 1 12 0v1h3l-1 15H4L3 7h3zm2 0h8V6a4 4 0 0 0-8 0v1z'/%3E%3C/svg%3E"); }
.ti-deck { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='11' height='15' rx='2' transform='rotate(-10 8 12)'/%3E%3Crect x='10' y='4' width='11' height='15' rx='2' transform='rotate(8 15 11)'/%3E%3C/svg%3E"); }
.ti-battle { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3l8 8-2 2 2 2-2 2-2-2-3 3-2-2 3-3-2-2 2-2 2 2 2-2L1 5zM21 3l-8 8 2 2-2 2 2 2 2-2 3 3 2-2-3-3 2-2-2-2-2 2-2-2 8-8z'/%3E%3C/svg%3E"); }
.ti-rank { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 8h6v14H9zM2 13h6v9H2zm14 3h6v6h-6zM12 1l1.5 3 3.5.5-2.5 2.4.6 3.4L12 8.7l-3.1 1.6.6-3.4L7 4.5l3.5-.5z'/%3E%3C/svg%3E"); }
.ti-account { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M2 22a10 10 0 0 1 20 0z'/%3E%3C/svg%3E"); }

/* ───────── Roda de Invocação ───────── */
.wheel-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.wheel { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; height: 186px; max-height: 22vh;
  background: linear-gradient(180deg, #ffe58a, #e8a520); border: 3px solid var(--outline); border-radius: 16px; box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 var(--outline); }
.reel { position: relative; overflow: hidden; border-radius: 10px; background: #160e3a; border: 3px solid var(--outline); cursor: pointer; }
.reel::before, .reel::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; z-index: 2; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(180deg, rgba(10,6,30,.85), rgba(10,6,30,0)); }
.reel::after { bottom: 0; background: linear-gradient(0deg, rgba(10,6,30,.85), rgba(10,6,30,0)); }
.strip { position: absolute; left: 0; right: 0; top: calc(50% - 87px); will-change: transform; }
.sym { height: 58px; display: grid; place-items: center; }
.sym img { height: 52px; width: 42px; object-fit: cover; border-radius: 8px; border: 2px solid var(--outline); }
.reel.spinning .strip { filter: blur(1.2px) brightness(1.1); }
.reel.stopped { box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(255,255,255,.7); }
.reel.stopped .strip { transition: transform .18s cubic-bezier(.3, 1.8, .5, 1); }
.payline { position: absolute; left: 4px; right: 4px; top: 50%; height: 62px; transform: translateY(-50%); border: 3px solid rgba(255,255,255,.9); border-radius: 12px; pointer-events: none; box-shadow: 0 0 12px rgba(255,255,255,.5); }
.spin-btn { position: relative; overflow: hidden; width: 92px; display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer;
  font: 400 18px var(--display); color: var(--outline); background: linear-gradient(180deg, #ffd0e6, var(--sakura) 55%, #d93a82); border: 3px solid var(--outline); border-radius: 16px; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 4px 0 var(--outline); }
.spin-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
.spin-btn.stop { background: linear-gradient(180deg, #fff09a, var(--gold) 50%, var(--gold-2)); animation: stopPulse .5s ease-in-out infinite alternate; }
@keyframes stopPulse { to { box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 4px 0 var(--outline), 0 0 18px rgba(255,210,63,.9); } }
.spin-btn[disabled] { filter: grayscale(.7) brightness(.7); cursor: not-allowed; }
.giro-fill { position: absolute; left: 0; bottom: 0; height: 6px; background: #fff; opacity: .8; }
.spin-txt { position: relative; }
.pips { position: relative; display: flex; gap: 4px; }
.pips i { width: 14px; height: 14px; border-radius: 50%; background: rgba(27,18,48,.35); border: 2px solid var(--outline); }
.pips i.on { background: radial-gradient(circle at 35% 30%, #fff, #8fe0ff 50%, #2f7dff); }

.tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tslot { position: relative; min-height: 84px; border-radius: 14px; border: 3px solid var(--outline); background: rgba(0,0,0,.25); padding: 14px 4px 4px; }
.tslot.empty { display: grid; place-items: center; border-style: dashed; border-color: rgba(255,255,255,.18); padding: 4px; }
.tslot.empty span { font-size: 11px; font-weight: 800; color: var(--muted); }
.ttag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font: 400 10px var(--display); padding: 2px 8px; border-radius: 999px; border: 2px solid var(--outline); white-space: nowrap; background: #fff; color: var(--outline); }
.tslot.awakened { background: linear-gradient(180deg, rgba(255,210,63,.35), rgba(255,157,31,.15)); box-shadow: 0 0 16px rgba(255,210,63,.6); }
.tslot.awakened .ttag { background: var(--gold); }
.tslot.bonus { background: linear-gradient(180deg, rgba(75,227,160,.3), rgba(75,227,160,.1)); }
.tslot.bonus .ttag { background: var(--ok); }
.topts { display: flex; gap: 3px; justify-content: center; }
.topt { flex: 1; min-width: 0; max-width: 64px; background: none; border: 0; padding: 0; cursor: grab; touch-action: none; transition: transform .12s ease; }
.tslot.normal .topt { max-width: 34px; }
.topt .card .nm { font-size: 8px; padding-bottom: 2px; }
.topt .card .cost { display: none; }
.tslot.normal .topt .card .nm { display: none; }
.topt.sel { transform: translateY(-8px); }
.topt.sel .card { box-shadow: 0 0 0 3px var(--gold), 0 6px 0 var(--outline), 0 0 16px rgba(255,210,63,.7); }

/* medidores de Aura e cristais no topo */
.meter { position: relative; width: 110px; height: 18px; border-radius: 999px; background: #120b33; border: 2px solid var(--outline); overflow: hidden; }
.meter .mfill { position: absolute; inset: 0 auto 0 0; transition: width .3s ease; }
.meter b { position: relative; display: block; text-align: center; font: 400 11px/14px var(--display); text-shadow: 0 1px 0 var(--outline); }
.me .meter .mfill { background: linear-gradient(180deg, #bfe0ff, #3d8bff); }
.foe .meter .mfill { background: linear-gradient(180deg, #ffc2d0, #ff3d6e); }
.crowns.burst .meter { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255,210,63,.9); }
.cpips { display: flex; justify-content: center; gap: 6px; margin-top: 3px; }
.cp { width: 12px; height: 16px; display: inline-block; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #b9a2ff; }
.cp.big { width: 16px; height: 20px; }
.cp.me { background: #4f9dff; } .cp.foe { background: #ff4f7d; }
.rmeter { width: 110px; height: 16px; border-radius: 999px; background: #120b33; border: 2px solid var(--outline); overflow: hidden; }
.rmeter div { height: 100%; }
.rcrowns .me .rmeter div { background: #3d8bff; } .rcrowns .foe .rmeter div { background: #ff3d6e; }
.rcrowns b { font: 400 24px var(--display); }
/* roda mais compacta para sobrar espaço para a arena */
.wheel { height: 140px; max-height: 17vh; }
.strip { top: calc(50% - 75px); }
.sym { height: 50px; }
.sym img { height: 44px; width: 36px; }
.payline { height: 52px; }
.tslot { min-height: 64px; padding-top: 12px; }
.hud-bottom { gap: 6px; padding: 6px; }

/* ───────── batalha grande no PC, roleta compacta e transparente embaixo ───────── */
#app:has(#game:not([hidden])) { max-width: min(1280px, 100%); }
#game .hud-top { max-width: 900px; width: 100%; margin: 0 auto; }
.hud-bottom {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px;
  max-width: 900px; width: 100%; margin: 0 auto; padding: 6px 10px;
  background: rgba(20, 12, 50, .55); backdrop-filter: blur(8px); border: 2px solid rgba(255, 255, 255, .14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.hud-bottom .player.me { flex-direction: column; align-items: flex-start; gap: 4px; padding: 4px 8px; }
.hud-bottom .player.me .iconbtn.small { margin-left: 0; }
.wheel-row { grid-template-columns: auto auto; gap: 6px; }
.wheel { height: 84px; max-height: none; gap: 4px; padding: 4px; border-width: 2px; border-radius: 12px; grid-template-columns: repeat(3, 44px); background: linear-gradient(180deg, rgba(255,229,138,.85), rgba(232,165,32,.85)); }
.reel { border-width: 2px; border-radius: 8px; }
.strip { top: calc(50% - 45px); }
.sym { height: 30px; }
.sym img { height: 27px; width: 27px; border-radius: 6px; border-width: 1.5px; }
.payline { height: 32px; left: 2px; right: 2px; border-width: 2px; border-radius: 8px; }
.spin-btn { width: 70px; font-size: 14px; gap: 4px; border-width: 2px; border-radius: 12px; }
.pips i { width: 10px; height: 10px; border-width: 1.5px; }
.tray { gap: 6px; }
.tslot { min-height: 0; height: 78px; padding: 12px 3px 3px; border-width: 2px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.tslot.empty span { font-size: 10px; }
.topt { max-width: 46px; }
.tslot.normal .topt { max-width: 30px; }
@media (max-width: 720px) {
  .hud-bottom { grid-template-columns: auto 1fr; }
  .hud-bottom .player.me { grid-column: 1 / -1; flex-direction: row; align-items: center; }
}

/* ═════════ Barra de Heróis ═════════ */
.hud-bottom { grid-template-columns: auto 1fr; }
.herobar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.hslot { position: relative; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; transition: transform .12s ease; }
.hslot .card { max-height: 118px; margin: 0 auto; }
.hslot .card .nm { font-size: 10px; }
.hslot .card .cost { display: none; }
.hk { position: absolute; top: -6px; left: -4px; z-index: 3; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 400 11px var(--display); color: var(--outline); background: #fff; border: 2px solid var(--outline); }
.cdov { position: absolute; left: 3px; right: 3px; top: 3px; height: 0; z-index: 2; border-radius: 10px 10px 0 0; background: rgba(12, 6, 32, .72); pointer-events: none; transition: height .1s linear; }
.cdtxt { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font: 400 26px var(--display); color: #fff; text-shadow: 0 2px 0 var(--outline), 0 0 8px rgba(0,0,0,.6); pointer-events: none; }
.hslot:not(.ready) .card img { filter: grayscale(.6) brightness(.75); }
.hslot.ready:hover { transform: translateY(-5px); }
.hslot.ready .card { box-shadow: 0 0 0 2px var(--outline), 0 5px 0 var(--outline), 0 0 12px rgba(255, 210, 63, .45); }
.hslot.sel { transform: translateY(-12px); }
.hslot.sel .card { box-shadow: 0 0 0 3px var(--gold), 0 6px 0 var(--outline), 0 0 22px rgba(255, 210, 63, .9); }
.hslot.flash .card { animation: readyFlash .4s ease-out; }
@keyframes readyFlash { 0% { filter: brightness(2.2); transform: scale(1.08); } 100% { filter: none; transform: none; } }

/* ═════════ Loja e coleção ═════════ */
.ico-gold { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 4px; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffcf2e 50%, #c98a00); border: 2px solid var(--outline); flex: none; }
.money .ico-gold { width: 26px; height: 26px; margin: 0; }
.money.gold b { color: #ffe58a; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 10px; }
.shop-item { display: grid; gap: 6px; justify-items: center; text-align: center; background: linear-gradient(180deg, #33267a, #221859); border: 3px solid var(--outline); border-radius: 14px; padding: 8px; }
.shop-item .card { width: 100%; }
.shop-item.have { opacity: .6; }
.si-name { font: 400 13px var(--display); line-height: 1.1; }
.si-name small { display: block; font: 700 10px var(--body); color: var(--muted); margin-top: 2px; }
.si-own { font-size: 11px; font-weight: 800; color: var(--ok); }
.shop-item .btn.small { width: 100%; padding: 6px 8px; font-size: 13px; }
.coll-grid .slot.locked .card { filter: grayscale(.85) brightness(.55); }
.coll-grid .slot .lock { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; font: 400 11px var(--display); background: rgba(12,6,32,.85); border: 2px solid var(--outline); border-radius: 999px; padding: 2px 8px 2px 3px; white-space: nowrap; color: #ffe58a; }

/* ═════════ Menu e coleção no PC ═════════ */
@media (min-width: 1000px) {
  #app:has(#lobby:not([hidden])), #app:has(#builder:not([hidden])) { max-width: 1240px; }
  #lobby { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 20px; row-gap: 12px; }
  .lob-top { grid-column: 1 / -1; }
  #lobby > .tab-body { grid-column: 1; grid-row: 2; }
  #tab-deck, #tab-deck[hidden] { display: flex !important; grid-column: 2 !important; grid-row: 2 !important; }
  #tabbar [data-tab="deck"] { display: none; }
  .tabbar { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); margin: 0; border: 3px solid var(--outline); border-bottom: 0; border-radius: 18px 18px 0 0; }
  .arena-card { max-height: none; flex: 1; min-height: 0; aspect-ratio: auto; }
  #tab-battle { justify-content: flex-start; }
  .btn.battle { font-size: 36px; padding: 16px; }
  .deck-grid { grid-template-columns: repeat(4, 1fr); }
  .coll-grid { grid-template-columns: repeat(8, 1fr); }
  #builder { display: grid; grid-template-columns: 380px 1fr; grid-template-rows: auto auto minmax(0, 1fr); column-gap: 20px; }
  #builder .topbar { grid-column: 1 / -1; }
  #builder > .deck-panel { grid-column: 1; grid-row: 2 / 4; align-self: start; }
  #builder .collection { grid-column: 2; grid-row: 2 / 4; }
  #builder .info { grid-column: 1; grid-row: 3; align-self: start; margin-top: 380px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ═════════ Celular ═════════ */
@media (max-width: 720px) {
  #game { padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  .hud-bottom { grid-template-columns: 1fr; padding: 6px; gap: 6px; }
  .hud-bottom .player.me { flex-direction: row; align-items: center; }
  .herobar { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .hslot .card { max-height: 74px; }
  .hk { display: none; }
  .cdtxt { font-size: 20px; }
  .meter { width: 80px; }
  .player .pname { max-width: 90px; font-size: 12px; }
  .player .ptr { display: none; }
  #clock { font-size: 20px; }
  .lob-top .money { padding: 3px 8px 3px 3px; font-size: 13px; }
  .money .ico-gold, .ico-trophy { width: 22px; height: 22px; }
  .pname2 { font-size: 13px; }
  .coll-grid { grid-template-columns: repeat(4, 1fr); }
  .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .si-name { font-size: 11px; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .herobar { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .hslot .card { max-height: 56px; }
}

/* letras grossas com contorno em toda a interface do jogo */
.arena-title, .trophy-big, #clock, .banner, .result, .pname2, .player .pname, .money, .si-name, .feat-name, .arena-num, .cdtxt, .hk, .meter b, .rcrowns b, .tabbar button { font-family: var(--display); letter-spacing: .03em; }
.arena-title, #clock, .pname2, .player .pname, .money b, .si-name, .feat-name, .result, .rcrowns b { text-shadow: var(--ink-stroke); }
.arena-title { font-size: 30px; color: var(--gold); animation: popIn .6s cubic-bezier(.2, 1.6, .4, 1) both; }
#clock { font-size: 30px; color: #fff; }
.banner { font-size: 54px; color: var(--gold); text-shadow: var(--ink-stroke), 0 0 30px rgba(255, 204, 31, .7); animation: popIn .5s cubic-bezier(.2, 1.6, .4, 1) both, wobble .6s ease-in-out .5s 2; }
.result { font-size: 60px; }
.btn.battle span { display: inline-block; animation: wobble 2.2s ease-in-out infinite; }
.tabbar button { font-size: 13px; text-shadow: 0 2px 0 var(--outline); }
.tabbar { background: linear-gradient(180deg, #2a5ccc, #13307a); }
.tabbar button.on { background: linear-gradient(180deg, #4f86ff, #2550c4); }
.profile, .hud-bottom, .deck-panel { background: linear-gradient(180deg, rgba(52, 104, 224, .85), rgba(29, 63, 153, .85)); }
.hud-top .player { background: linear-gradient(180deg, rgba(255, 59, 110, .55), rgba(180, 20, 70, .45)); border-color: var(--outline); }
.hud-bottom .player { background: linear-gradient(180deg, rgba(79, 150, 255, .6), rgba(30, 80, 200, .5)); border-color: var(--outline); }
.cdtxt { font-size: 34px; }
.hslot .card .nm { font-size: 12px; }
.arena-label { gap: 4px; left: 14px; top: 12px; }
.arena-num { font-size: 13px; text-shadow: var(--ink-stroke); }

/* ═════════ tutorial ═════════ */
.tut { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.tut-spot { position: fixed; border-radius: 18px; border: 4px solid var(--gold); box-shadow: 0 0 0 9999px rgba(8, 10, 40, .45), 0 0 24px rgba(255, 204, 31, .9); animation: spotPulse 1s ease-in-out infinite alternate; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
@keyframes spotPulse { to { border-color: #fff; box-shadow: 0 0 0 9999px rgba(8, 10, 40, .45), 0 0 40px rgba(255, 255, 255, .9); } }
.tut-box { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; align-items: flex-end; gap: 6px; pointer-events: auto; }
.tut-box.pop { animation: popIn .45s cubic-bezier(.2, 1.6, .4, 1); }
.tut-guide { width: 110px; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); animation: letterBob 1.6s ease-in-out infinite alternate; }
.tut-guide.big { width: 150px; display: block; margin: 0 auto; }
.tut-bubble { position: relative; flex: 1; background: #fff; color: var(--outline); border: 4px solid var(--outline); border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 0 var(--outline); }
.tut-bubble::before { content: ""; position: absolute; left: -16px; bottom: 22px; border: 10px solid transparent; border-right: 14px solid var(--outline); }
.tut-step { font: 400 12px var(--display); color: var(--sakura); letter-spacing: .06em; text-transform: uppercase; }
.tut-bubble p { margin: 4px 0 10px; font-weight: 800; font-size: 16px; line-height: 1.35; }
.tut-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tut-actions .btn.ghost { color: var(--outline); border-color: rgba(14, 22, 56, .25); }
.lobby-main .btn.ghost, #btnTut { width: 100%; }
@media (max-width: 720px) {
  .tut-box { top: 64px; }
  .tut-guide { width: 76px; }
  .tut-bubble p { font-size: 14px; }
}

/* 6 heróis na barra + anel de pausa entre invocações */
.herobar { grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.herobar.paused .hslot .card { filter: saturate(.6); }
.herobar.paused::after { content: ""; position: absolute; right: -44px; top: 50%; width: 34px; height: 34px; transform: translateY(-50%); border-radius: 50%; background: conic-gradient(var(--gold) var(--pause), rgba(255,255,255,.15) 0); -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px); mask: radial-gradient(circle, transparent 9px, #000 10px); }
.deck-grid { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 1000px) { .deck-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .herobar { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; } .hslot .card { max-height: 84px; } .herobar.paused::after { display: none; } .herobar.paused { outline: 2px solid rgba(255,204,31,.6); outline-offset: 3px; border-radius: 10px; } }
@media (max-width: 720px) and (orientation: landscape) { .herobar { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.spname { color: var(--gold); font-weight: 800; }

/* ═════════ fundo animado ═════════ */
#bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; }

/* ═════════ aviso grande de Especial ═════════ */
.sp-ann { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; border: 3px solid var(--outline); background: linear-gradient(90deg, var(--spc), #ffffff 160%); box-shadow: 0 6px 0 var(--outline), 0 0 26px var(--spc); pointer-events: none; animation: annIn .45s cubic-bezier(.2, 1.6, .4, 1); white-space: nowrap; }
.sp-ann.foe { filter: hue-rotate(-20deg); border-color: #6a0f2a; }
.sp-ann img { width: 56px; height: 56px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,.55); border: 3px solid var(--outline); }
.sp-ann div { display: grid; line-height: 1.05; }
.sp-ann b { font: 400 13px var(--display); color: var(--outline); letter-spacing: .04em; }
.sp-ann span { font: 400 24px var(--display); color: #fff; text-shadow: var(--ink-stroke); }
@keyframes annIn { from { transform: translateX(-50%) scale(.3) rotate(-6deg); opacity: 0; } }
#game { position: relative; }

/* ═════════ painéis laterais (só em telas largas) ═════════ */
.side { display: none; }
@media (min-width: 1150px) {
  #app:has(#game:not([hidden])) { max-width: min(1600px, 100%); }
  #game { display: grid; grid-template-columns: 250px minmax(0, 1fr) 270px; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 14px; row-gap: 6px; }
  #game .hud-top { grid-column: 2; grid-row: 1; }
  #game .arena-wrap { grid-column: 2; grid-row: 2; }
  #game .hud-bottom { grid-column: 2; grid-row: 3; }
  .side { display: flex; flex-direction: column; gap: 10px; grid-row: 1 / 4; min-height: 0; overflow: hidden; }
  .side-left { grid-column: 1; } .side-right { grid-column: 3; }
}
.sbox { background: linear-gradient(180deg, rgba(52,104,224,.85), rgba(29,63,153,.85)); border: 3px solid var(--outline); border-radius: 16px; padding: 10px 12px; box-shadow: inset 0 2px 0 rgba(255,255,255,.15); }
.sbox.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sbox h3 { font-size: 16px; margin-bottom: 8px; }
.stip { font-size: 12px; color: var(--muted); font-weight: 700; margin: 6px 0 0; }
.sauras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.saura { position: relative; height: 150px; border-radius: 14px; background: #0e1638; border: 3px solid var(--outline); overflow: hidden; display: grid; place-items: center; align-content: center; }
.saura-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; transition: height .3s ease; }
.saura.me .saura-fill { background: linear-gradient(0deg, #1d4fb3, #6fb0ff); }
.saura.foe .saura-fill { background: linear-gradient(0deg, #b3163f, #ff8fa8); }
.saura b { position: relative; font: 400 30px var(--display); text-shadow: var(--ink-stroke); }
.saura span { position: relative; font: 400 12px var(--display); text-shadow: 0 2px 0 var(--outline); }
.scrys { display: grid; gap: 8px; }
.scry { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: rgba(0,0,0,.2); border-radius: 12px; padding: 6px 8px; }
.scry-main b { font: 400 13px var(--display); display: block; }
.scry-bar { height: 8px; border-radius: 999px; background: #0e1638; overflow: hidden; margin-top: 3px; }
.scry-bar div { height: 100%; } .scry-bar .me { background: #4f9dff; } .scry-bar .foe { background: #ff4f7d; }
.scry-n { font: 400 13px var(--display); } .scry-n em { font-style: normal; } .scry-n .me { color: #8fc4ff; } .scry-n .foe { color: #ff9ab5; }
.sunits { display: flex; align-items: baseline; gap: 6px; } .sunits b { font: 400 34px var(--display); text-shadow: var(--ink-stroke); } .sunits span { font-size: 13px; font-weight: 800; color: var(--muted); }
.sunit-bar { height: 10px; border-radius: 999px; background: #0e1638; overflow: hidden; margin-top: 6px; } .sunit-bar div { height: 100%; background: linear-gradient(90deg, #ffd23f, #ff9a0a); transition: width .3s; }
.sfoe { display: flex; justify-content: space-between; align-items: baseline; } .sfoe b { font: 400 18px var(--display); color: #ffadc4; text-shadow: var(--ink-stroke); } .sfoe span { font-size: 12px; font-weight: 800; color: var(--muted); }
.sfoe-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.sfoe-card .card .nm { font-size: 9px; } .sfoe-card .card .cost { display: none; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow: auto; }
.feed li { font-size: 13px; font-weight: 700; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.22); border-left: 4px solid #4f9dff; animation: popIn .35s ease-out; }
.feed li.foe { border-left-color: #ff4f7d; }
.feed li b { color: var(--gold); }

/* ═════════ cartões extras do menu ═════════ */
.menu-card { display: none; }
@media (min-width: 1000px) { .menu-card { display: block; } #tab-deck { overflow: auto; } }
.prog { display: grid; gap: 6px; }
.prow { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; background: rgba(0,0,0,.2); padding: 5px 10px; border-radius: 10px; } .prow b { font-family: var(--display); color: var(--gold); }
.pnext { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; } .pnext b { color: #fff; }
.arenas { display: grid; gap: 6px; }
.arena-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.25); opacity: .6; font-size: 13px; }
.arena-row.open { opacity: 1; } .arena-row b { font-family: var(--display); font-weight: 400; } .arena-row span { font-size: 12px; font-weight: 800; color: var(--muted); }
.ar { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--outline); }
.ar0 { background: linear-gradient(135deg, #6fd33f, #8f7bff); } .ar1 { background: linear-gradient(135deg, #ff6a1f, #3a2028); } .ar2 { background: linear-gradient(135deg, #e6f4ff, #6fa8ff); } .ar3 { background: linear-gradient(135deg, #fff4dc, #ff9a3c); }
.spot { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: center; }
.spot img { width: 90px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.spot b { font: 400 18px var(--display); display: block; } .spot p { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 700; }

/* ═════════ partida em tela cheia: arena atrás, placar em cima e cartas embaixo ═════════ */
#app:has(#game:not([hidden])) { max-width: 100%; }
#game:not([hidden]), #game.screen:not([hidden]) { display: block !important; } #game { display: block; position: relative; height: 100%; padding: 0 !important; }
#game .side { display: none !important; }
#game .arena-wrap { position: absolute; inset: 0; border-radius: 0; box-shadow: none; }
#game .hud-top { position: absolute; z-index: 6; top: max(8px, env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); max-width: none; width: auto; margin: 0; pointer-events: none; }
#game .hud-top > * { pointer-events: auto; }
#game .hud-top .clock { background: rgba(14, 22, 56, .55); border: 2px solid rgba(255,255,255,.18); border-radius: 14px; padding: 4px 14px; backdrop-filter: blur(6px); }
#game .hud-bottom { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); bottom: max(8px, env(safe-area-inset-bottom, 0px)); width: min(980px, calc(100% - 16px)); margin: 0; background: rgba(20, 30, 90, .55); backdrop-filter: blur(8px); }
#game .sp-ann { top: 78px; }
#game .toast { bottom: 150px; }
#game .emotes { bottom: 150px; }
@media (max-width: 720px) {
  #game .hud-bottom { width: calc(100% - 10px); bottom: max(4px, env(safe-area-inset-bottom, 0px)); }
  #game .sp-ann { top: 60px; } #game .sp-ann span { font-size: 18px; } #game .sp-ann img { width: 42px; height: 42px; }
  #game .toast { bottom: 200px; }
}

/* ═════════ menu: tela cheia no PC em 3 colunas ═════════ */
.lob-left { display: none; }
.howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.howto b { color: #fff; font-family: var(--display); font-weight: 400; }
@media (min-width: 1000px) {
  #app:has(#lobby:not([hidden])) { max-width: 100%; }
  #lobby { grid-template-columns: 300px minmax(0, 1fr) 380px !important; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); column-gap: 18px; }
  .lob-left { display: flex; flex-direction: column; gap: 12px; grid-column: 1; grid-row: 2; min-height: 0; overflow: auto; }
  #lobby > .tab-body { grid-column: 2 !important; }
  #tab-deck, #tab-deck[hidden] { grid-column: 3 !important; }
  .lob-top { grid-column: 1 / -1; }
  .tabbar { grid-column: 1 / -1; }
  .arena-card { border-radius: 24px; }
  .arena-title { font-size: 40px; }
  .feat-hero { height: 96%; right: 6%; }
  .feat-name { font-size: 16px; padding: 4px 14px; }
}
@media (min-width: 1500px) {
  #lobby { grid-template-columns: 340px minmax(0, 1fr) 420px !important; }
}
/* celular: menu em uma coluna, cartões de progresso também aparecem na aba Conta */
@media (max-width: 999px) {
  .arena-card { aspect-ratio: 16 / 11; }
}
/* telas médias de PC: colunas laterais mais finas para o centro respirar */
@media (min-width: 1000px) and (max-width: 1279px) {
  #lobby { grid-template-columns: 240px minmax(0, 1fr) 300px !important; column-gap: 12px; }
  .arena-title { font-size: 28px; }
  .deck-grid { gap: 6px; }
}
@media (min-width: 1000px) {
  .arena-card { min-height: 260px; }
  .arena-title { white-space: nowrap; }
}
/* cartas da barra um pouco menores para a arena ganhar espaço */
.hslot .card { max-height: 94px; }
#game .hud-bottom { width: min(800px, calc(100% - 16px)); padding: 5px 8px; gap: 8px; }
#game .hud-bottom .player.me { padding: 3px 6px; }
.cdtxt { font-size: 28px; }
@media (max-width: 720px) { .hslot .card { max-height: 70px; } }

/* ═════════ arena no centro + evolução de cada time dos lados (telas largas) ═════════ */
@media (min-width: 1150px) {
  #game .side { display: flex !important; position: absolute; top: 0; bottom: 0; width: 270px; z-index: 4; flex-direction: column; gap: 10px; padding: 12px; overflow: auto; }
  #game .side-left { left: 0; } #game .side-right { right: 0; }
  #game .arena-wrap { left: 270px; right: 270px; }
  #game .hud-top { left: 282px; right: 282px; }
  #game .hud-bottom { left: calc(50%); width: min(800px, calc(100% - 560px)); }
}
.team-panel { background: linear-gradient(180deg, rgba(20,40,120,.92), rgba(12,22,70,.95)); border-right: 3px solid var(--outline); }
.team-panel.foe { background: linear-gradient(180deg, rgba(120,20,60,.9), rgba(60,10,40,.95)); border-right: 0; border-left: 3px solid var(--outline); }
.tp-head { display: flex; align-items: center; gap: 8px; }
.tp-head b { font: 400 20px var(--display); text-shadow: var(--ink-stroke); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-head small { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tp-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--outline); background: #4f9dff; flex: none; }
.foe .tp-dot { background: #ff4f7d; }
.tp-aura { position: relative; height: 74px; border-radius: 16px; background: #0b1230; border: 3px solid var(--outline); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tp-aura-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #1d4fb3, #6fb0ff); transition: height .35s ease; }
.foe .tp-aura-fill { background: linear-gradient(0deg, #b3163f, #ff8fa8); }
.tp-aura-txt { position: relative; display: grid; justify-items: center; line-height: 1; }
.tp-aura-txt b { font: 400 34px var(--display); text-shadow: var(--ink-stroke); }
.tp-aura-txt span { font: 400 11px var(--display); text-shadow: 0 2px 0 var(--outline); }
.tp-crys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tp-cry { display: grid; justify-items: center; gap: 2px; background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px 2px; font-size: 10px; font-weight: 800; color: var(--muted); }
.tp-cry i { width: 16px; height: 22px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: rgba(255,255,255,.2); }
.me .tp-cry.on i { background: #4f9dff; box-shadow: 0 0 10px #4f9dff; } .foe .tp-cry.on i { background: #ff4f7d; }
.tp-cry.on { color: #fff; }
.tp-stats { display: grid; gap: 5px; }
.tp-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; font-weight: 800; }
.tp-row span { color: var(--muted); } .tp-row b { font-family: var(--display); font-weight: 400; font-size: 14px; }
.tp-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(0,0,0,.35); overflow: hidden; }
.tp-bar div { height: 100%; background: #4f9dff; transition: width .3s; } .foe .tp-bar div { background: #ff4f7d; }
.tp-sub { font: 400 13px var(--display); margin-top: 2px; text-shadow: 0 2px 0 var(--outline); }
.tp-heroes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tp-card .card .nm { font-size: 9px; } .tp-card .card .cost { display: none; }
.team-panel .feed { max-height: 180px; }

/* ═════════ cristais e Passe de Batalha ═════════ */
.ico-shard { display: inline-block; width: 20px; height: 26px; clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); background: linear-gradient(160deg, #e6c2ff, #9b5cff 55%, #5a1f9a); vertical-align: -6px; }
.money .ico-shard { width: 22px; height: 28px; }
.money.shard b { color: #e6c2ff; }
.ico-gold.big, .ico-shard.big { width: 38px; height: 38px; }
.ico-shard.big { height: 46px; width: 36px; }
.ico-lock { display: inline-block; width: 26px; height: 30px; background: #6a6f8a; clip-path: polygon(20% 40%, 20% 25%, 30% 10%, 50% 4%, 70% 10%, 80% 25%, 80% 40%, 95% 40%, 95% 100%, 5% 100%, 5% 40%, 30% 40%, 30% 26%, 40% 16%, 60% 16%, 70% 26%, 70% 40%); }
.pass-panel { display: grid; gap: 12px; }
.pass-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pass-head h2 { font-size: 20px; }
.pass-level { display: grid; justify-items: center; background: linear-gradient(180deg, #ffe58a, #ff9a0a); color: var(--outline); border: 3px solid var(--outline); border-radius: 16px; padding: 4px 14px; box-shadow: 0 4px 0 var(--outline); }
.pass-level span { font: 400 11px var(--display); letter-spacing: .08em; }
.pass-level b { font: 400 30px var(--display); line-height: 1; }
.pass-xp { position: relative; height: 22px; border-radius: 999px; background: #0b1230; border: 3px solid var(--outline); overflow: hidden; }
.pass-xp-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #9b5cff, #ff6fc0); transition: width .4s ease; }
.pass-xp span { position: relative; display: block; text-align: center; font: 400 12px/16px var(--display); text-shadow: 0 2px 0 var(--outline); }
.pass-tracks { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.pass-label { font: 400 13px var(--display); writing-mode: vertical-rl; transform: rotate(180deg); padding: 6px 2px; border-radius: 10px; text-align: center; }
.pass-label.free { background: #2f7dff; } .pass-label.prem { background: linear-gradient(180deg, #ffcf2e, #ff9a0a); color: var(--outline); }
.pass-label small { font-size: 9px; }
.pass-track { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.ptier { flex: none; width: 92px; display: grid; justify-items: center; gap: 4px; text-align: center; scroll-snap-align: start; opacity: .55; }
.ptier.reached { opacity: 1; }
.ptier .pnum { font: 400 13px var(--display); background: var(--outline); border-radius: 999px; padding: 1px 9px; }
.ptier.reached .pnum { background: var(--gold); color: var(--outline); }
.pbox { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 14px; border: 3px solid var(--outline); background: linear-gradient(180deg, #3a6ff0, #1e43a8); overflow: hidden; }
.ptier.hero .pbox { background: linear-gradient(180deg, #e08bff, #7a2fd0); }
.pbox img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ptier.got .pbox { filter: grayscale(.5) brightness(.8); }
.ptier small { font-size: 10px; font-weight: 800; color: var(--muted); line-height: 1.1; min-height: 22px; }
.ptier .btn.small { padding: 4px 10px; font-size: 12px; }
.pok { font: 400 11px var(--display); color: var(--ok); }
.prem-track .pbox { background: linear-gradient(180deg, #4a4f6a, #2a2f4a); }
.missions { display: grid; gap: 8px; }
.mission { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: rgba(0,0,0,.25); border-radius: 14px; padding: 8px 12px; }
.mission.done { box-shadow: inset 0 0 0 2px var(--gold); }
.mission.claimed { opacity: .6; }
.m-main b { font: 400 14px var(--display); }
.m-bar { height: 8px; border-radius: 999px; background: #0b1230; overflow: hidden; margin: 4px 0 2px; }
.m-bar div { height: 100%; background: linear-gradient(90deg, #9b5cff, #ff6fc0); }
.m-main small { font-size: 11px; font-weight: 800; color: var(--muted); }
.m-xp { font: 400 14px var(--display); color: #e6c2ff; }
.ti-pass { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16v4a3 3 0 0 0 0 6v4H4v-4a3 3 0 0 0 0-6zM12 6l1.2 2.5 2.8.4-2 2 .5 2.8L12 12.4l-2.5 1.3.5-2.8-2-2 2.8-.4z'/%3E%3C/svg%3E"); }
.tabbar { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 1000px) { .tabbar { grid-template-columns: repeat(5, 1fr); } }
.ar4 { background: linear-gradient(135deg, #2fd38a, #1a3a2a); } .ar5 { background: linear-gradient(135deg, #3fa9ff, #0b3a6a); } .ar6 { background: linear-gradient(135deg, #ffc2e6, #b98cff); } .ar7 { background: linear-gradient(135deg, #5a3a8a, #0b0618); }

/* caixa do administrador no menu */
.admin-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: rgba(255,79,180,.18); border: 2px solid var(--sakura); border-radius: 14px; padding: 8px 10px; }
.adm-tag { font: 400 11px var(--display); background: var(--sakura); color: #fff; border-radius: 6px; padding: 2px 8px; }
.admin-box label { font-size: 13px; font-weight: 800; }
.admin-box select { flex: 1; min-width: 160px; font: 700 14px var(--body); color: #fff; background: #0e1638; border: 2px solid var(--line); border-radius: 10px; padding: 6px 8px; }

/* ── escolher arena do treino ── */
.arena-picker { display: grid; gap: 8px; background: rgba(0,0,0,.22); border: 2px solid var(--line); border-radius: 16px; padding: 10px; }
.ap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ap-head b { font: 400 15px var(--display); } .ap-head span { font-size: 12px; font-weight: 800; color: var(--muted); }
.ap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ap { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; padding: 6px 7px; border-radius: 11px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; transition: transform .12s, border-color .12s, background .12s; }
.ap .ar { grid-row: span 2; width: 24px; height: 24px; }
.ap b { font: 400 12px var(--display); color: var(--gold); line-height: 1; }
.ap span { font-size: 11px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.4); }
.ap.on { border-color: var(--gold); background: rgba(255, 210, 63, .2); box-shadow: 0 0 0 2px rgba(255,210,63,.35), 0 3px 0 var(--outline); }
.ap.locked { cursor: not-allowed; opacity: .45; filter: grayscale(.6); }
.ap.locked:hover { transform: none; }
.ap:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 520px) { .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button.arena-row { width: 100%; border: 2px solid transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
button.arena-row:hover { border-color: rgba(255,255,255,.35); }
.arena-row.picked { border-color: var(--gold) !important; background: rgba(255,210,63,.18); }
.arena-row.picked span { color: var(--gold); }
.adm-txt { font-size: 13px; font-weight: 800; flex: 1; }

/* ── botão sair e aviso de confirmação ── */
.hud-btns { display: flex; gap: 6px; align-items: center; }
.quitbtn { height: 38px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--outline); background: linear-gradient(180deg, #ff5a7a, #d42a56); color: #fff; font: 400 15px var(--display); text-shadow: 0 2px 0 rgba(0,0,0,.35); box-shadow: 0 3px 0 var(--outline); cursor: pointer; }
.quitbtn:hover { filter: brightness(1.1); } .quitbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
@media (max-width: 520px) { .quitbtn span { display: none; } .quitbtn { width: 38px; padding: 0; } }
.quit-modal { max-width: 380px; }
.quit-modal h2 { font-size: 26px; margin: 4px 0 8px; }
.quit-modal p { margin: 0; color: var(--muted); font-weight: 700; line-height: 1.4; }
.quit-ico { font-size: 44px; line-height: 1; animation: quitPop .35s ease-out; }
@keyframes quitPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.btn.danger { background: linear-gradient(180deg, #ff5a7a, #d42a56); color: #fff; }

/* telas escondidas nunca aparecem (nem embaixo do menu no celular) */
.screen[hidden], #game.screen[hidden] { display: none !important; }

/* ════════ MENU EM ESTILO APRESENTAÇÃO (3D + botões flutuantes) ════════ */
/* botão de voltar para o site e mini logo */
.site-btn { flex: none; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px 0 10px; border-radius: 14px; border: 3px solid var(--outline); background: linear-gradient(180deg, #8fd0ff, #3d8bff 55%, #2a5ccc); color: #fff; text-decoration: none; font: 400 16px var(--display); text-shadow: var(--ink-stroke); box-shadow: 0 4px 0 var(--outline), 0 0 18px rgba(61,139,255,.45); transition: transform .15s; animation: floatY 3.2s ease-in-out infinite; }
.site-btn span { font-size: 22px; line-height: 1; }
.site-btn:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.1); }
.site-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.mini-logo { flex: none; display: grid; line-height: .82; text-align: center; transform: rotate(-4deg); animation: logoBob 2.8s ease-in-out infinite alternate; }
.mini-logo span { font-family: var(--display); paint-order: stroke fill; -webkit-text-stroke: 5px var(--outline); letter-spacing: .02em; }
.mini-logo .ml1 { font-size: 17px; color: #fff; text-shadow: 0 3px 0 #9cc4ff, 0 5px 0 var(--outline); }
.mini-logo .ml2 { font-size: 21px; color: var(--gold); text-shadow: 0 3px 0 #ff9a0a, 0 5px 0 var(--outline); }
@keyframes logoBob { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(-2deg) translateY(-3px); } }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@media (max-width: 760px) { .mini-logo { display: none; } .site-btn { height: 42px; padding: 0 10px; } .site-btn b { display: none; } }

/* perfil com brilho */
.profile { position: relative; overflow: hidden; background: linear-gradient(180deg, #5b8cff, #2f56d6 55%, #2440a8) !important; box-shadow: 0 4px 0 var(--outline), inset 0 2px 0 rgba(255,255,255,.3), 0 0 22px rgba(91,140,255,.35) !important; }
.profile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%); transform: translateX(-120%); animation: shine 5s ease-in-out infinite; pointer-events: none; }
.avatar { box-shadow: 0 0 0 3px rgba(255,210,63,.35), 0 0 16px rgba(255,210,63,.6); animation: avatarPulse 2.4s ease-in-out infinite; }
@keyframes avatarPulse { 50% { box-shadow: 0 0 0 5px rgba(255,210,63,.18), 0 0 24px rgba(255,210,63,.8); } }
.pname2 { font-size: 18px !important; }
.money { box-shadow: 0 3px 0 var(--outline), inset 0 1px 0 rgba(255,255,255,.15); transition: transform .15s; }
.money:hover { transform: translateY(-2px) scale(1.05); }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* arena em 3D */
.arena3d { position: absolute; inset: 0; display: none; }
.arena3d canvas.gl { display: block; width: 100% !important; height: 100% !important; }
.arena-card.has3d .arena3d { display: block; }
.arena-card.has3d > canvas#arenaArt, .arena-card.has3d .feat-hero { display: none; }
.arena-card.has3d { background: radial-gradient(ellipse at 50% 40%, #6f55e8, #2a1f8a); box-shadow: 0 0 0 3px rgba(255,210,63,.55), 0 0 40px rgba(143,123,255,.45), 0 16px 34px rgba(0,0,0,.5); }
.arena-card.has3d::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(20,10,60,.55) 0%, transparent 28%, transparent 72%, rgba(20,10,60,.55) 100%); }
.arena-card .arena-label, .arena-card .feat-name { z-index: 3; }
.arena-card.has3d .arena-title { font-size: clamp(26px, 3.4vw, 44px); animation: titleIn .6s cubic-bezier(.2,1.6,.4,1) both; }
.feat-name { transition: opacity .3s, transform .3s; }
.feat-name.out { opacity: 0; transform: translateY(8px); }
@keyframes titleIn { from { transform: scale(.6) translateY(-10px); opacity: 0; } }
/* brilhinhos subindo por cima da arena */
.sparkles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.sparkles i { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fff6b0; box-shadow: 0 0 10px 3px rgba(255,220,90,.8); animation: spark 6s linear infinite; opacity: 0; }
.sparkles i:nth-child(1) { left: 8%; animation-delay: 0s; } .sparkles i:nth-child(2) { left: 22%; animation-delay: 1.4s; width: 4px; height: 4px; }
.sparkles i:nth-child(3) { left: 37%; animation-delay: 3s; } .sparkles i:nth-child(4) { left: 51%; animation-delay: .7s; width: 4px; height: 4px; }
.sparkles i:nth-child(5) { left: 64%; animation-delay: 2.2s; } .sparkles i:nth-child(6) { left: 77%; animation-delay: 4s; width: 5px; height: 5px; }
.sparkles i:nth-child(7) { left: 88%; animation-delay: 1s; } .sparkles i:nth-child(8) { left: 95%; animation-delay: 3.6s; width: 4px; height: 4px; }
@keyframes spark { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-420px) translateX(20px) scale(1.1); opacity: 0; } }

/* botões flutuantes e chamativos */
.btn.battle.float { position: relative; overflow: hidden; animation: battleFloat 2.6s ease-in-out infinite, battleGlow 1.6s ease-in-out infinite alternate; }
.btn.battle .bt-ico { position: absolute; left: 22px; top: 50%; translate: 0 -50%; font-size: 34px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); animation: swordWiggle 1.8s ease-in-out infinite; }
.btn.battle::after, .btn.train.float2::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-130%); animation: shine 3.2s ease-in-out infinite; pointer-events: none; }
.btn.battle:hover { filter: brightness(1.08) saturate(1.1); scale: 1.02; }
.btn.train.float2 { position: relative; overflow: hidden; animation: floatY 3s ease-in-out infinite .4s; }
.btn.train.float2::after { animation-delay: 1.4s; }
@keyframes battleFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes swordWiggle { 0%, 100% { rotate: -10deg; } 50% { rotate: 12deg; scale: 1.12; } }
.arena-picker .ap.on { animation: pickPulse 1.6s ease-in-out infinite; }
@keyframes pickPulse { 50% { box-shadow: 0 0 0 3px rgba(255,210,63,.55), 0 0 18px rgba(255,210,63,.5), 0 3px 0 var(--outline); } }
.tabbar button.on { animation: floatY 2.4s ease-in-out infinite; }
.tabbar button.on .ti { filter: drop-shadow(0 0 6px rgba(255,210,63,.8)); }
/* cartas do time flutuam de leve, cada uma num tempo */
#deckGrid .slot, .menu-deck .slot { animation: floatY 3.4s ease-in-out infinite; }
#deckGrid .slot:nth-child(2n) { animation-delay: .5s; } #deckGrid .slot:nth-child(3n) { animation-delay: 1.1s; }
@media (prefers-reduced-motion: reduce) {
  .site-btn, .mini-logo, .avatar, .profile::after, .btn.battle.float, .btn.battle .bt-ico, .btn.battle::after, .btn.train.float2, .btn.train.float2::after, .sparkles i, .tabbar button.on, #deckGrid .slot, .arena-picker .ap.on { animation: none !important; }
}
/* celular: Site + perfil numa linha, moedas na linha de baixo (o nome nunca some) */
@media (max-width: 560px) {
  .lob-top { flex-wrap: wrap; row-gap: 6px; }
  .lob-top .profile { flex: 1 1 0; min-width: 0; }
  .lob-top .cur { flex: 1 1 100%; justify-content: space-between; }
}

/* ── arenas concluídas ── */
.ap.done { cursor: default; opacity: .75; background: rgba(75, 227, 160, .12); border-color: rgba(75, 227, 160, .45); }
.ap.done b { color: #9ff0b8; }
.arena-row.done { opacity: .8; } .arena-row.done span { color: #9ff0b8; }
/* ── jogar com amigo ── */
.btn.friend { width: 100%; font-size: 16px; padding: 10px; background: linear-gradient(180deg, #8ff0c8, #2fd38a 55%, #1aa86a); color: var(--outline); position: relative; overflow: hidden; }
.friend-modal { max-width: 400px; display: grid; gap: 10px; }
.friend-modal h2 { font-size: 26px; margin: 0; }
.friend-modal .muted { margin: 0; }
.f-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; font-size: 13px; }
.f-or::before, .f-or::after { content: ''; flex: 1; height: 2px; background: rgba(255,255,255,.18); }
.f-join { display: grid; gap: 6px; text-align: left; }
.f-join label { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.f-row { display: flex; gap: 8px; }
.f-row input { flex: 1; min-width: 0; font: 400 26px var(--display); letter-spacing: .3em; text-align: center; color: #fff; background: rgba(0,0,0,.3); border: 3px solid var(--line); border-radius: 12px; padding: 6px; }
.f-row input:focus { border-color: var(--gold); outline: none; }
.f-label { margin: 0; font-weight: 800; }
.f-code { font: 400 54px var(--display); letter-spacing: .25em; color: var(--gold); text-shadow: var(--ink-stroke); background: rgba(0,0,0,.25); border: 3px dashed var(--gold); border-radius: 16px; padding: 6px 10px 6px 24px; margin: 6px 0; }
#fWait { display: grid; gap: 8px; justify-items: center; }
#fWait[hidden] { display: none; }
.q-range { margin: 0 0 4px; font-weight: 800; color: #ffe58a; font-size: 14px; }
.btn.train .nb { display: block; font: 800 10px var(--body); letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

/* ── ligas ── */
.lg-badge { display: inline-block; vertical-align: middle; font: 400 11px var(--display); color: #1a1036; background: var(--lg, #d08a4e); border: 2px solid var(--outline); border-radius: 999px; padding: 1px 8px; text-shadow: none; letter-spacing: .02em; }
.league-panel { display: grid; gap: 10px; }
.lg-cur { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: rgba(0,0,0,.25); border: 3px solid var(--lg); border-radius: 16px; padding: 10px 12px; box-shadow: 0 0 18px color-mix(in srgb, var(--lg) 45%, transparent); }
.lg-cur .lg-ico { font-size: 40px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); animation: floatY 2.8s ease-in-out infinite; }
.lg-cur b { font: 400 22px var(--display); color: var(--lg); text-shadow: var(--ink-stroke); display: block; }
.lg-cur small { font-weight: 800; color: var(--muted); }
.lg-bar { height: 12px; border-radius: 999px; background: #120b33; border: 2px solid var(--outline); overflow: hidden; margin-top: 6px; }
.lg-bar div { height: 100%; background: linear-gradient(90deg, var(--lg), #fff6b0); }
.lg-prize { margin: 0; font-weight: 800; font-size: 14px; } .lg-prize b { color: var(--gold); }
.lg-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.lg-ladder li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; background: rgba(0,0,0,.22); border: 2px solid transparent; font-weight: 800; opacity: .6; }
.lg-ladder li.got { opacity: 1; }
.lg-ladder li.here { border-color: var(--lg); background: color-mix(in srgb, var(--lg) 22%, rgba(0,0,0,.3)); opacity: 1; }
.lg-ladder .lg-ico { font-size: 20px; text-align: center; }
.lg-ladder b { font: 400 16px var(--display); color: var(--lg); text-shadow: 0 2px 0 var(--outline); }
.lg-min { font-size: 13px; color: var(--muted); } .lg-gold { font-size: 13px; color: #ffe58a; }
.lg-mini { font: 800 10px var(--body); color: var(--lg); margin-left: 4px; }
.season-modal { max-width: 380px; display: grid; gap: 8px; justify-items: center; }
.season-modal h2 { font-size: 28px; margin: 0; }
.season-modal p { margin: 0; font-weight: 700; }
.season-icon { font-size: 64px; animation: quitPop .5s cubic-bezier(.2,1.6,.4,1), floatY 2.6s ease-in-out .5s infinite; }
.season-gold { display: flex; align-items: center; gap: 8px; font: 400 30px var(--display); color: var(--gold); text-shadow: var(--ink-stroke); }

/* ════════ aba Batalha: visual refinado (PC e celular) ════════ */
/* barra do caminho das arenas */
#tab-battle .road { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 18px; border: 2px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(20,14,60,.75), rgba(10,8,36,.75)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.road-ico .ar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 3px 0 var(--outline), 0 0 14px rgba(255,210,63,.25); }
.road-body { min-width: 0; display: grid; gap: 6px; }
#tab-battle .road-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; }
.road-lbl { font: 800 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.road-next { font: 400 16px var(--display); color: #fff; text-shadow: 0 2px 0 var(--outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-battle .road-bar { position: relative; height: 20px; border-radius: 999px; background: #0c0826; border: 2px solid var(--outline); overflow: hidden; }
#tab-battle .road-fill { height: 100%; border-radius: 999px; background: linear-gradient(180deg, #ffe58a, var(--gold) 45%, #ff9a0a); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 0 12px rgba(255,210,63,.6); transition: width .6s ease; }
.road-num { position: absolute; inset: 0; display: grid; place-items: center; font: 400 12px var(--display); color: #fff; text-shadow: var(--ink-stroke); font-variant-numeric: tabular-nums; letter-spacing: .03em; }

/* botão Batalha */
.btn.battle { gap: 2px !important; }
.btn.battle .bt-title { font-size: clamp(30px, 3.2vw, 40px); line-height: 1; letter-spacing: .04em; }
.btn.battle .bt-sub { display: inline-block; margin-top: 4px; font: 800 11px var(--body) !important; letter-spacing: .1em; text-transform: uppercase; opacity: 1 !important; color: #5a2a00; background: rgba(255,255,255,.4); border-radius: 999px; padding: 2px 10px; }
.btn.battle .bt-ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.14); box-shadow: inset 0 2px 0 rgba(255,255,255,.35); font-size: 30px !important; }

/* grade das arenas */
#tab-battle .arena-picker { padding: 12px; border-radius: 18px; border: 2px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(20,14,60,.75), rgba(10,8,36,.75)); gap: 10px; }
#tab-battle .ap-head { align-items: center; }
#tab-battle .ap-head b { font: 400 17px var(--display); text-shadow: 0 2px 0 var(--outline); }
.ap-pill { font: 800 11px var(--body) !important; letter-spacing: .06em; text-transform: uppercase; color: #ffe58a !important; background: rgba(255,210,63,.14); border: 1px solid rgba(255,210,63,.4); border-radius: 999px; padding: 3px 10px; }
#tab-battle .ap-grid { gap: 8px; }
#tab-battle .ap { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; padding: 7px 9px; border-radius: 12px; background: rgba(255,255,255,.05); border: 2px solid rgba(255,255,255,.1); }
#tab-battle .ap .ar { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.ap .ar em { font: 400 13px var(--display); font-style: normal; color: #fff; text-shadow: var(--ink-stroke); }
.ap-name { font: 400 12.5px var(--display); color: #fff; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.ap-st { font: 800 10.5px var(--body); color: var(--muted); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-battle .ap.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,210,63,.28), rgba(255,154,10,.12)); }
#tab-battle .ap.on .ap-st { color: var(--gold); }
#tab-battle .ap.done .ap-st { color: #9ff0b8; }
#tab-battle .ap.locked { opacity: .55; filter: grayscale(.5); }
#tab-battle .ap.locked .ap-name { color: #cfd6f0; }

/* botões secundários: ícone + título + subtítulo */
.play-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act-btn { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border-radius: 16px; border: 3px solid var(--outline); cursor: pointer; color: var(--outline); box-shadow: 0 4px 0 var(--outline), inset 0 2px 0 rgba(255,255,255,.45); transition: transform .12s, filter .12s; animation: floatY 3.2s ease-in-out infinite; }
.act-btn:nth-child(2) { animation-delay: .6s; }
.act-btn:hover { filter: brightness(1.07); transform: translateY(-2px); }
.act-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.act-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.45) 50%, transparent 62%); transform: translateX(-130%); animation: shine 4s ease-in-out infinite; pointer-events: none; }
.act-friend { background: linear-gradient(180deg, #a6f5d4, #2fd38a 55%, #18a066); }
.act-train { background: linear-gradient(180deg, #ffc6e4, #ff6fae 55%, #d93c8a); }
.act-train::after { animation-delay: 2s; }
.act-ico { width: 42px; height: 42px; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: rgba(255,255,255,.35); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.act-txt { min-width: 0; display: grid; gap: 1px; }
.act-txt b { font: 400 17px var(--display); letter-spacing: .02em; line-height: 1.1; }
.act-txt small { font: 800 11px var(--body); letter-spacing: .02em; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* rodapé: tutorial + quem está online */
.lob-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 2px 4px; }
.link-btn { background: none; border: 0; color: #dfe8ff; font: 800 13px var(--body); cursor: pointer; padding: 6px 2px; border-bottom: 2px dashed rgba(255,255,255,.3); }
.link-btn:hover { color: var(--gold); border-color: var(--gold); }
#tab-battle .online { display: inline-flex; align-items: center; gap: 6px; min-height: 0; font-size: 12px; }
#tab-battle .online:not(:empty)::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4be3a0; box-shadow: 0 0 8px #4be3a0; animation: avatarPulse 2s ease-in-out infinite; }

/* celular */
@media (max-width: 560px) {
  #tab-battle .road { padding: 8px 10px; gap: 10px; }
  .road-ico .ar { width: 34px; height: 34px; }
  .road-next { font-size: 14px; }
  .btn.battle .bt-ico { width: 44px; height: 44px; font-size: 24px !important; left: 14px !important; }
  #tab-battle .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .play-row { gap: 8px; }
  .act-btn { padding: 8px 10px; gap: 8px; border-radius: 14px; }
  .act-ico { width: 36px; height: 36px; font-size: 19px; }
  .act-txt b { font-size: 15px; }
  .act-txt small { font-size: 10px; }
}
@media (max-width: 380px) { .play-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .act-btn, .act-btn::after { animation: none !important; } }
/* nomes e subtítulos quebram em até 2 linhas em vez de cortar */
.ap-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11.5px; }
.act-txt small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
@media (max-width: 560px) { .btn.battle { padding-left: 64px !important; padding-right: 12px !important; } .btn.battle .bt-sub { font-size: 10px !important; letter-spacing: .06em; } }
@media (max-width: 360px) { .btn.battle .bt-ico { display: none !important; } .btn.battle { padding-left: 12px !important; } }
#tab-battle .ap .ap-name { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
