/* Robot Run — interface. Uma família (Rubik, variável, local), hierarquia por cor e
   tamanho, contornos finos, profundidade por sombra curta. Nada de caixa sobre caixa.
   Fonte: fonts/Rubik.woff2, licença OFL em fonts/OFL.txt. Sem nada externo. */

@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --tinta: #1c2240;        /* texto e contornos */
  --tinta-2: #5b6283;      /* texto secundário */
  --papel: #ffffff;
  --fundo: #f3f5fa;        /* chips e superfícies secundárias */
  --linha: rgba(28,34,64,.12);
  --laranja: #ff7a2f; --laranja-esc: #d85d16;
  --ciano: #19b6ea; --ciano-esc: #0e8fbd;
  --ouro: #ffc43a; --ouro-esc: #d19a10;
  --verde: #3ccf7a;
  --vermelho: #ff5252; --vermelho-esc: #c43636;
  --roxo: #6a5ae0;
  --raio: 16px;
  --sombra: 0 2px 0 rgba(28,34,64,.10), 0 10px 24px rgba(28,34,64,.14);
  --fonte: "Rubik", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #0f1430;
  font-family: var(--fonte); font-weight: 500; color: var(--tinta);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
#cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#vinheta { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(15,20,48,0) 58%, rgba(15,20,48,.18) 100%); }
button { font: inherit; font-weight: 700; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.ico { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.ico.mini { width: 14px; height: 14px; }
.rot { font-weight: 700; }

/* ------------------------------------------------------------------ HUD */
#topo {
  position: fixed; left: 0; right: 0; top: 0; z-index: 5; pointer-events: none;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 0; display: flex; align-items: center; gap: 8px;
}
#barra {
  flex: 1 1 auto; max-width: 340px; margin: 0 auto; height: 30px; padding: 0 6px 0 10px; border-radius: 15px;
  display: flex; align-items: center; gap: 8px; background: rgba(28,34,64,.78); color: #fff; backdrop-filter: blur(6px);
}
#barra .ico { width: 14px; height: 14px; opacity: .8; }
#fase { font-size: 13px; font-weight: 700; min-width: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
#progresso { flex: 1 1 auto; height: 8px; border-radius: 4px; background: rgba(255,255,255,.22); overflow: hidden; }
#progresso i { display: block; height: 100%; width: 0; background: var(--ciano); border-radius: 4px; transition: width .1s linear; }
.bandeira { width: 16px; height: 16px; border-radius: 4px; flex: 0 0 auto; opacity: .9;
  background: conic-gradient(#fff 0 25%, #222 0 50%, #fff 0 75%, #222 0) 0 0 / 8px 8px; }
#carteira {
  flex: 0 0 auto; height: 30px; padding: 0 5px 0 12px; border-radius: 15px; display: flex; align-items: center; gap: 6px;
  background: rgba(28,34,64,.78); color: #fff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px);
}
.moeda { display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 36% 32%, #fff1b8 0 16%, var(--ouro) 17% 64%, var(--ouro-esc) 65%); }

#xp, #xp-rival {
  position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform;
  min-width: 40px; padding: 3px 10px; border-radius: 9px; text-align: center;
  font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.18);
}
#xp { background: var(--ciano-esc); }
#xp-rival { background: var(--vermelho-esc); }
#xp::after, #xp-rival::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; }
#xp::after { border-top-color: var(--ciano-esc); } #xp-rival::after { border-top-color: var(--vermelho-esc); }
#xp[hidden], #xp-rival[hidden] { display: none; }
#xp.bump span { display: inline-block; animation: bump .22s ease; }
@keyframes bump { 45% { transform: scale(1.28); } }

#horda { position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform;
  display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 5px; border-radius: 12px;
  background: rgba(28,34,64,.85); color: #fff; font-weight: 800; font-size: 15px; }
#horda i { width: 16px; height: 16px; border-radius: 5px; background: var(--vermelho); position: relative; }
#horda i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 3px; border-radius: 2px; background: #ffd0c8; }
#horda[hidden] { display: none; }

#combo { position: fixed; right: 12px; top: calc(env(safe-area-inset-top) + 178px); z-index: 6; pointer-events: none;
  display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 12px;
  background: var(--ouro); color: var(--tinta); font-weight: 800; }
#combo .ico { width: 16px; height: 16px; }
#combo b { font-size: 18px; font-variant-numeric: tabular-nums; }
#combo[hidden] { display: none; }
#combo.pop { animation: pop .25s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(1.4); } }

#aviso { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 58px); transform: translateX(-50%); z-index: 7; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px;
  background: var(--verde); color: #fff; font-weight: 800; font-size: 16px; white-space: nowrap; box-shadow: 0 3px 0 rgba(0,0,0,.14);
  animation: entra .3s cubic-bezier(.2,1.6,.4,1); }
#aviso.ruim { background: var(--vermelho); }
#aviso .ico { width: 20px; height: 20px; }
#aviso[hidden] { display: none; }
@keyframes entra { from { transform: translateX(-50%) scale(.6); opacity: 0; } }

#grito { position: fixed; left: 50%; top: 40%; z-index: 9; pointer-events: none; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 900; font-size: clamp(42px, 14vw, 92px); color: #fff; letter-spacing: -.01em;
  text-shadow: 0 2px 0 rgba(28,34,64,.5), 0 8px 24px rgba(28,34,64,.3); }
#grito[hidden] { display: none; }
#grito.vai { animation: grito .9s cubic-bezier(.2,1.6,.4,1) forwards; }
#grito.lute { color: var(--ouro); } #grito.super { color: #8fe6ff; } #grito.ko { color: #ff8f66; }
#grito.combo, #grito.pulo, #grito.perigo, #grito.poder { font-size: clamp(28px, 8vw, 54px); }
#grito.combo { color: var(--ouro); } #grito.pulo { color: #9cf55e; } #grito.perigo { color: var(--vermelho); } #grito.poder { color: #c6a8ff; }
@keyframes grito { 0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; } 25% { transform: translate(-50%,-50%) scale(1.12); opacity: 1; } 70% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-70%) scale(1); opacity: 0; } }

.flutua { position: fixed; z-index: 6; pointer-events: none; transform: translate(-50%, -50%);
  font-weight: 800; font-size: 30px; color: #fff; text-shadow: 0 2px 0 rgba(28,34,64,.45); animation: sobe .9s ease-out forwards; }
.flutua.bom { color: #8fe6ff; } .flutua.ruim { color: #ff8a7a; }
@keyframes sobe { from { opacity: 1; transform: translate(-50%,-50%) scale(.6); } 25% { transform: translate(-50%,-80%) scale(1.1); } to { opacity: 0; transform: translate(-50%,-190%) scale(1); } }

#clarao { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; }
#clarao.bom { background: radial-gradient(ellipse at center, rgba(25,182,234,0) 45%, rgba(25,182,234,.45)); }
#clarao.ruim { background: radial-gradient(ellipse at center, rgba(255,82,82,0) 40%, rgba(255,82,82,.5)); }
#clarao.vai { animation: clarao .45s ease-out; }
@keyframes clarao { from { opacity: 1; } to { opacity: 0; } }

/* próximo robô: miniatura 3D discreta */
#proximo { position: fixed; right: 12px; top: calc(env(safe-area-inset-top) + 50px); z-index: 5; pointer-events: auto;
  width: 68px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px;
  border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: var(--sombra); }
#proximo[hidden] { display: none; }
#proximo-tela { position: relative; width: 58px; height: 64px; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #eef2fa, #dde4f1); }
#proximo-tela .interrogacao { position: absolute; right: 4px; top: 0; font-weight: 900; font-size: 18px; color: var(--ouro-esc); }
#proximo-tela .cadeado { position: absolute; left: 4px; bottom: 3px; width: 13px; height: 13px; color: var(--tinta-2); }
#proximo .meta { display: flex; align-items: center; gap: 3px; font-weight: 800; font-size: 11px; }
#proximo .meta .moeda { width: 11px; height: 11px; }
#proximo .trilho { width: 100%; height: 5px; border-radius: 3px; background: var(--linha); overflow: hidden; }
#proximo .trilho i { display: block; height: 100%; width: 0; background: var(--ciano); transition: width .15s ease; }
#proximo small.rot { font-size: 9px; color: var(--tinta-2); line-height: 1.05; text-align: center; font-weight: 500; }
.previa-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }

/* poder */
#poder { position: fixed; left: 14px; bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 7;
  width: 62px; height: 62px; border-radius: 50%; padding: 0; display: grid; place-items: center; color: #fff;
  background: conic-gradient(var(--roxo) var(--carga, 0%), rgba(28,34,64,.35) 0); box-shadow: inset 0 0 0 3px rgba(255,255,255,.85), 0 4px 12px rgba(28,34,64,.3);
  opacity: .85; transition: transform .12s ease, opacity .2s ease; }
#poder[hidden] { display: none; }
#poder .ico { width: 30px; height: 30px; display: none; }
#poder[data-poder="clones"] .ico.clones, #poder[data-poder="chuva"] .ico.chuva { display: block; }
#poder:not(.pronto) { pointer-events: none; }
#poder.pronto { opacity: 1; background: var(--ouro); color: var(--tinta); box-shadow: inset 0 0 0 3px #fff, 0 0 22px rgba(255,196,58,.7); animation: pulsa .7s ease-in-out infinite; }
#poder.ativo { background: var(--ciano); animation: none; }
#poder.perigo { background: var(--vermelho); color: #fff; width: 78px; height: 78px; animation: perigo .35s ease-in-out infinite; box-shadow: inset 0 0 0 3px #fff, 0 0 30px rgba(255,82,82,.8); }
#poder .qtd { position: absolute; right: -2px; top: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--tinta); color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
#poder .qtd[hidden] { display: none; }
@keyframes pulsa { 50% { transform: scale(1.07); } }
@keyframes perigo { 50% { transform: scale(1.12) rotate(-4deg); } }

/* luta */
#luta { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#luta[hidden] { display: none; }
.vidas { position: absolute; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 50px); display: flex; gap: 12px; }
.vida { flex: 1 1 0; display: flex; align-items: center; gap: 6px; }
.vida .ico { width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 1px 0 rgba(0,0,0,.3)); }
.vida.ele .ico { color: #ffb3a8; }
.vida .trilho { flex: 1 1 auto; height: 14px; border-radius: 8px; background: rgba(28,34,64,.45); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.vida .trilho i { display: block; height: 100%; width: 100%; transition: width .12s ease; }
.vida.eu .trilho i { background: var(--verde); }
.vida.ele .trilho i { background: var(--vermelho); margin-left: auto; }
#toque-dica { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 112px); transform: translateX(-50%); animation: toca .7s ease-in-out infinite; }
#toque-dica .ico { width: 48px; height: 48px; color: #fff; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
#toque-dica[hidden] { display: none; }
@keyframes toca { 50% { transform: translate(-50%, 8px) scale(.92); } }
#carga { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 46px); transform: translateX(-50%); width: min(300px, 72vw); display: flex; align-items: center; gap: 8px; }
#carga .raio { width: 26px; height: 26px; flex: 0 0 auto; background: var(--ouro); clip-path: polygon(55% 0, 15% 55%, 45% 55%, 35% 100%, 85% 40%, 55% 40%); }
#carga .trilho { flex: 1 1 auto; height: 12px; border-radius: 7px; background: rgba(28,34,64,.4); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
#carga .trilho i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffe066, var(--ouro)); transition: width .08s ease; }
#carga.cheia .trilho { box-shadow: inset 0 0 0 2px #fff, 0 0 16px rgba(255,210,58,.8); }
#carga.cheia .raio { animation: pulsa .35s ease-in-out infinite; }

/* início */
#inicio { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 14vh); cursor: pointer; }
#inicio[hidden] { display: none; }
#inicio .ico { width: 60px; height: 60px; color: #fff; filter: drop-shadow(0 3px 0 rgba(28,34,64,.35)); animation: toca2 1s ease-in-out infinite; }
#inicio .rot { color: #fff; font-size: clamp(16px, 4.6vw, 22px); text-shadow: 0 2px 0 rgba(28,34,64,.35); }
@keyframes toca2 { 50% { transform: translateY(8px) scale(.93); } }

/* ---------------------------------------------------------------- painéis */
.painel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10;
  width: min(372px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 16px;
  border-radius: 24px; background: var(--papel); box-shadow: var(--sombra); animation: painel .32s cubic-bezier(.2,1.5,.4,1); scrollbar-width: none; }
.painel::-webkit-scrollbar { display: none; }
.painel[hidden] { display: none; }
@keyframes painel { from { transform: translate(-50%, -50%) scale(.84); opacity: 0; } }
.painel h2 { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.painel h2 .ico { width: 26px; height: 26px; color: var(--ouro-esc); }
#f-titulo .ico { color: var(--vermelho); }

.estrelas { display: flex; gap: 6px; margin-top: -4px; }
.estrelas i { width: 24px; height: 24px; background: #e4e8f1; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.estrelas i.on { background: var(--ouro); animation: estrela .4s cubic-bezier(.2,1.6,.4,1) backwards; }
.estrelas i:nth-child(2).on { animation-delay: .12s; } .estrelas i:nth-child(3).on { animation-delay: .24s; }
@keyframes estrela { from { transform: scale(0) rotate(-40deg); } }
.ganho { display: flex; align-items: center; gap: 8px; font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 2px 0 4px; }
.ganho .moeda { width: 34px; height: 34px; }
#res-moedas.tique { animation: tique .12s ease; display: inline-block; }
@keyframes tique { 50% { transform: scale(1.06); } }

/* hierarquia: primário (laranja, alto) › secundário (cinza claro) › opcional (contorno dourado) */
.principal, .secundario, .anuncio, .roleta-b, .compra-robo {
  width: 100%; min-height: 50px; border-radius: var(--raio); display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 700; transition: transform .1s ease, filter .1s ease;
}
.principal { min-height: 56px; background: var(--laranja); color: #fff; font-size: 18px; box-shadow: 0 3px 0 var(--laranja-esc), 0 8px 18px rgba(255,122,47,.35); }
.principal .ico { width: 24px; height: 24px; }
.secundario { background: var(--fundo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linha); }
.anuncio { min-height: 46px; background: #fff; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--ouro); font-size: 15px; }
.anuncio .ico { color: var(--ouro-esc); width: 22px; height: 22px; }
.anuncio .ico.cor { color: var(--vermelho); }
.anuncio b { font-weight: 800; color: var(--ouro-esc); }
.anuncio .moeda { width: 16px; height: 16px; }
.roleta-b { background: var(--roxo); color: #fff; box-shadow: 0 3px 0 #4a3cb8; }
.roleta-b .rot { flex: 1 1 auto; text-align: left; }
.roleta-b .custo { font-weight: 800; }
.roleta-b .moeda, .compra-robo .moeda, .principal .moeda { width: 18px; height: 18px; }
.compra-robo { background: var(--ciano); color: #fff; box-shadow: 0 3px 0 var(--ciano-esc); }
.compra-robo .custo { font-weight: 800; }
.compra-robo[disabled] { background: #d9dfeb; color: var(--tinta-2); box-shadow: none; opacity: 1; }
.compra-robo[hidden] { display: none; }
.anuncio[hidden] { display: none; }
.principal:active, .secundario:active, .anuncio:active, .roleta-b:active, .compra-robo:active, .up:active, .arma:active, .robo-chip:active { transform: scale(.965); filter: brightness(.96); }
button[disabled] { opacity: .5; pointer-events: none; }
.linha-robo { width: 100%; display: flex; gap: 8px; }
.linha-robo > * { flex: 1 1 0; min-height: 44px; font-size: 14px; }
.linha-robo .secundario .ico { width: 20px; height: 20px; }
.linha-robo .custo { font-size: 14px; }

/* melhorias: uma fileira de quatro, sem cartões grandes */
#melhorias { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.up { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 68px; padding: 7px 2px 6px; border-radius: 14px;
  background: var(--fundo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linha); transition: transform .1s ease, background .15s ease; }
.up.pode { background: #e3f6ff; box-shadow: inset 0 0 0 1.5px rgba(25,182,234,.5); }
.up .ico { width: 22px; height: 22px; color: var(--ciano-esc); }
.up .nome { font-size: 10px; font-weight: 700; color: var(--tinta-2); line-height: 1.1; text-align: center; }
.up .nivel { font-size: 10px; font-weight: 700; color: var(--tinta-2); }
.up .custo { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--laranja-esc); }
.up .custo .moeda { width: 12px; height: 12px; }
.up .custo .ico { width: 14px; height: 14px; color: var(--tinta-2); }
.up.comprou { animation: comprou .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes comprou { 40% { transform: scale(1.08); } }

/* armas e poderes: fichas numa faixa só */
#armas, #poderes { width: 100%; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
#armas:empty, #poderes:empty { display: none; }
.arma { display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: var(--fundo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linha); }
.arma .ico { width: 18px; height: 18px; color: var(--cor, var(--tinta-2)); }
.arma .nivel { color: var(--tinta-2); font-weight: 700; }
.arma.ativa { background: var(--tinta); color: #fff; box-shadow: none; }
.arma.ativa .ico { color: var(--ciano); } .arma.ativa .nivel { color: rgba(255,255,255,.7); }
#poderes .arma .ico { color: var(--roxo); } #poderes .arma.ativa .ico { color: var(--ouro); }
.arma.travado { opacity: .5; }
.compra-carga .nome { color: var(--ciano-esc); }
.compra-carga .custo { display: flex; align-items: center; gap: 3px; color: var(--laranja-esc); font-weight: 800; }
.compra-carga .custo .moeda { width: 12px; height: 12px; }
.compra-carga.pode { background: #e3f6ff; box-shadow: inset 0 0 0 1.5px rgba(25,182,234,.5); }

/* roleta */
.roda-box { position: relative; width: min(240px, 64vw); aspect-ratio: 1; margin-top: 4px; }
#roda { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 5.5px var(--linha), 0 10px 20px rgba(28,34,64,.18); }
.fatia { position: absolute; inset: 0; pointer-events: none; }
.fatia .ico { position: absolute; left: 50%; top: 7%; transform: translateX(-50%); width: 18px; height: 18px; color: rgba(28,34,64,.85); }
.fatia span { display: none; }
.eixo { position: absolute; left: 50%; top: 50%; width: 20%; height: 20%; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fff1b8 0 16%, var(--ouro) 17% 64%, var(--ouro-esc) 65%); box-shadow: 0 0 0 4px #fff; }
.ponteiro { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); width: 0; height: 0;
  border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--laranja); filter: drop-shadow(0 2px 0 rgba(28,34,64,.25)); }
#ro-premio { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 28px; font-size: 18px; font-weight: 800; }
#ro-premio .ico { width: 26px; height: 26px; }
#ro-premio:empty { display: none; }
#ro-chances { list-style: none; width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; font-size: 12px; font-weight: 700; color: var(--tinta-2); }
#ro-chances li { display: flex; align-items: center; gap: 5px; }
#ro-chances li .ico { width: 14px; height: 14px; color: var(--cor); }
#ro-nota { display: none; }

/* perfil: os modelos em destaque */
#perfil-tela { position: relative; width: 100%; height: 180px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 50% 80%, #e2e8f4, #f4f6fb 70%); }
#perfil-nome { font-size: 19px; font-weight: 800; margin-top: -2px; }
#perfil-lista { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.robo-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 5px; border-radius: 14px;
  background: var(--fundo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linha); transition: transform .1s ease; }
.robo-chip img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: contain; background: #fff; display: block; }
.robo-chip .ico { position: absolute; left: 8px; top: 8px; width: 14px; height: 14px; color: var(--tinta-2); }
.robo-chip .nome { font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; }
.robo-chip .sub { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; color: var(--laranja-esc); }
.robo-chip .sub .moeda { width: 10px; height: 10px; }
.robo-chip.ativa { background: var(--tinta); color: #fff; box-shadow: none; }
.robo-chip.ativa .sub { color: var(--ciano); }
.robo-chip.travado img { filter: grayscale(1) brightness(.35) contrast(1.2); }
.robo-chip.travado .nome { color: var(--tinta-2); }

/* falha */
#b-tentar .custo { display: flex; align-items: center; gap: 3px; font-size: 14px; opacity: .9; }
#b-tentar .custo .moeda { width: 15px; height: 15px; }

/* carregando */
#carregando { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; background: #0f1430; transition: opacity .4s ease; }
#carregando.sai { opacity: 0; pointer-events: none; }
.marca { font-weight: 900; font-size: clamp(28px, 9vw, 48px); letter-spacing: -.02em; color: #fff; }
.marca span { color: var(--ciano); margin-left: .22em; }
.carga { width: min(180px, 46vw); height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.carga i { display: block; width: 35%; height: 100%; background: var(--laranja); border-radius: 3px; animation: corre 1s ease-in-out infinite; }
@keyframes corre { from { transform: translateX(-110%); } to { transform: translateX(300%); } }

@media (max-width: 360px) {
  #melhorias { grid-template-columns: repeat(2, 1fr); }
  #perfil-lista { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #inicio .ico, .carga i, #poder.pronto, #poder.perigo, #toque-dica, #clarao.vai, #combo.pop { animation: none; }
}

/* cartões de compra antes de correr: dois, grandes, com um toque */
#cartoes { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); transform: translateX(-50%); z-index: 8;
  display: flex; gap: 10px; width: min(300px, calc(100vw - 110px)); }
#cartoes[hidden] { display: none; }
.cartao { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 9px; border-radius: 18px;
  background: rgba(255,255,255,.94); color: var(--tinta); box-shadow: var(--sombra); transition: transform .1s ease; }
.cartao .nome { font-size: 12px; font-weight: 700; color: var(--tinta-2); }
.cartao .ico { width: 34px; height: 34px; color: var(--ciano-esc); }
.cartao .custo { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; color: var(--laranja-esc); }
.cartao .custo .moeda { width: 16px; height: 16px; }
.cartao.pode { background: var(--ouro); color: var(--tinta); }
.cartao.pode .nome, .cartao.pode .custo { color: var(--tinta); }
.cartao.pode .ico { color: var(--tinta); }
.cartao[disabled] { opacity: .75; pointer-events: none; }
.cartao:active { transform: scale(.96); }
.cartao.comprou { animation: comprou .35s cubic-bezier(.2,1.6,.4,1); }
#inicio { padding-bottom: calc(env(safe-area-inset-bottom) + 130px); }
#loja h2 .ico { color: var(--ciano-esc); }
/* vida da barreira: barrinha amarela acima dela */
#barreira { position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform;
  width: 64px; height: 8px; border-radius: 4px; background: rgba(28,34,64,.6); overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85); }
#barreira i { display: block; height: 100%; width: 100%; background: var(--ouro); transition: width .08s ease; }
#barreira[hidden] { display: none; }

/* loja em cartas: uma por vez, desliza para o lado */
#loja-trilho { width: calc(100% + 32px); margin: 0 -16px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#loja-trilho::-webkit-scrollbar { display: none; }
.carta { flex: 0 0 78%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 14px 14px; border-radius: 22px; background: var(--fundo); box-shadow: inset 0 0 0 1.5px var(--linha); min-height: 236px; }
.carta .ico.grande { width: 72px; height: 72px; color: var(--ciano-esc); margin: 6px 0 2px; }
.carta img { width: 112px; height: 112px; border-radius: 18px; background: #fff; object-fit: contain; }
.carta .nome { font-size: 18px; font-weight: 800; text-align: center; }
.carta .sub { font-size: 13px; font-weight: 700; color: var(--tinta-2); min-height: 16px; text-align: center; }
.carta .acao { margin-top: auto; width: 100%; min-height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #d9dfeb; color: var(--tinta-2); font-size: 15px; font-weight: 800; }
.carta .acao .moeda { width: 16px; height: 16px; }
.carta .acao.pode { background: var(--laranja); color: #fff; box-shadow: 0 3px 0 var(--laranja-esc); }
.carta .acao.pode.roxo { background: var(--roxo); box-shadow: 0 3px 0 #4a3cb8; }
.carta .acao .ico { width: 20px; height: 20px; }
.carta.ativa { box-shadow: inset 0 0 0 2.5px var(--ciano); background: #e9f8ff; }
.carta.travado { opacity: .6; }
.carta.comprou { animation: comprou .35s cubic-bezier(.2,1.6,.4,1); }
.poder-carta .ico.grande { color: var(--roxo); }
.roleta-carta .ico.grande { color: var(--roxo); }
#loja-pontos { display: flex; gap: 6px; justify-content: center; }
#loja-pontos i { width: 7px; height: 7px; border-radius: 50%; background: var(--linha); }
#loja-pontos i.on { background: var(--tinta); }
.legado { display: none !important; }

/* botão Evoluir: segundo em destaque, cor da energia */
.evoluir { width: 100%; min-height: 52px; border-radius: var(--raio); display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #d9dfeb; color: var(--tinta-2); font-size: 17px; font-weight: 800; transition: transform .1s ease; }
.evoluir .ico { width: 22px; height: 22px; }
.evoluir .moeda { width: 18px; height: 18px; }
.evoluir.pode { background: var(--ciano); color: #fff; box-shadow: 0 3px 0 var(--ciano-esc), 0 8px 18px rgba(25,182,234,.35); }
.evoluir[disabled] { opacity: 1; pointer-events: none; }
.evoluir:active { transform: scale(.965); }

/* carta de evolução */
#revela { position: fixed; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(15,20,48,.55); backdrop-filter: blur(3px); perspective: 900px; }
#revela[hidden] { display: none; }
.carta-3d { position: relative; width: min(240px, 66vw); aspect-ratio: 3 / 4; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,1.3,.4,1);
  animation: cartaEntra .5s cubic-bezier(.2,1.5,.4,1); }
#revela.vira .carta-3d { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.face.verso { background: linear-gradient(160deg, #2d3a7a, #141a3f); color: var(--ciano);
  background-image: radial-gradient(circle at 50% 50%, rgba(25,182,234,.25), transparent 60%), repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 14px); }
.face.verso .interrogacao { font-size: 96px; font-weight: 900; text-shadow: 0 0 24px rgba(25,182,234,.8); }
.face.frente { transform: rotateY(180deg); background: var(--papel); color: var(--tinta); padding: 18px; }
.face.frente .ico.grande { width: 96px; height: 96px; color: var(--ciano-esc); }
.face.frente img { width: 150px; height: 150px; object-fit: contain; }
.face.frente b { font-size: 22px; font-weight: 800; text-align: center; }
.face.frente span { font-size: 15px; font-weight: 700; color: var(--tinta-2); }
.face.frente .tag { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 10px; background: var(--laranja); color: #fff; font-size: 12px; font-weight: 800; }
.face.frente .tag[hidden] { display: none; }
#revela.raro .face.frente { box-shadow: 0 0 0 4px var(--ouro), 0 0 48px rgba(255,196,58,.7), 0 16px 40px rgba(0,0,0,.35); }
#revela .dica { color: #fff; font-size: 14px; opacity: 0; transition: opacity .3s; }
#revela.pronta .dica { opacity: .9; animation: pulsa 1.2s ease-in-out infinite; }
@keyframes cartaEntra { from { transform: translateY(40px) scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .carta-3d { transition: none; animation: none; } }

/* faixa Evoluir + Roleta, com seletor ×1 ×5 ×10 */
.faixa-evoluir { width: 100%; display: flex; gap: 8px; }
.faixa-evoluir .evoluir { flex: 1 1 62%; }
.faixa-evoluir .roleta-b { flex: 1 1 38%; min-height: 52px; font-size: 15px; }
.faixa-evoluir .roleta-b .custo { flex: 0 0 auto; }
.evoluir .vezes { font-size: 13px; opacity: .85; }
.vezes-grupo { display: flex; gap: 4px; margin-top: -4px; }
.vezes-grupo button { min-width: 44px; height: 28px; border-radius: 10px; background: var(--fundo); color: var(--tinta-2); font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--linha); }
.vezes-grupo button.on { background: var(--tinta); color: #fff; box-shadow: none; }
#rev-lista { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; }
#rev-lista:empty { display: none; }
#rev-lista span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; border-radius: 10px; background: var(--fundo); font-size: 10px; text-align: center; }
#rev-lista span .ico { width: 18px; height: 18px; color: var(--ciano-esc); }
#rev-lista span img { width: 28px; height: 28px; object-fit: contain; }
#rev-lista span em { font-style: normal; font-weight: 700; line-height: 1.1; }
#rev-lista span small { color: var(--tinta-2); font-weight: 700; }
#revela .face.frente { justify-content: flex-start; padding-top: 22px; overflow: hidden; }
/* carta de várias recompensas (×5, ×10): mais alta, herói menor, lista em 3 colunas */
#revela.varias .carta-3d { aspect-ratio: 3 / 4.5; }
#revela.varias .face.frente { padding: 14px 12px; gap: 4px; }
#revela.varias .face.frente .ico.grande { width: 56px; height: 56px; }
#revela.varias .face.frente img { width: 84px; height: 84px; }
#revela.varias .face.frente b { font-size: 18px; }
#revela.varias .face.frente > span { font-size: 13px; }
#revela.varias #rev-lista { gap: 3px; margin-top: 4px; }
#revela.varias #rev-lista span { padding: 3px 2px; font-size: 9.5px; border-radius: 8px; }
#revela.varias #rev-lista span .ico { width: 16px; height: 16px; }
#revela.varias #rev-lista span img { width: 24px; height: 24px; }

/* efeito de item em andamento (raio / gigante): ícone + barra de tempo */
#efeito { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 100px); transform: translateX(-50%); z-index: 7; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 16px; background: rgba(20,24,48,.55); color: var(--cor, #ffc93a); }
#efeito .ico { width: 20px; height: 20px; }
#efeito b { display: block; width: 72px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.22); overflow: hidden; }
#efeito b i { display: block; height: 100%; background: var(--cor, #ffc93a); transition: width .1s linear; }
#efeito[hidden] { display: none; }
#grito.item { font-size: clamp(28px, 8vw, 54px); color: var(--ouro); }
