/* Tema: app de jogo moderno (escuro) */
:root {
  color-scheme: dark;
  --bg: #0d0f16;
  --bg-2: #121522;
  --surface: #171b29;
  --surface-2: #1f2435;
  --line: #2a3047;
  --grid: #252a3d;
  --text: #eef0f7;
  --text-2: #aab1c6;
  --muted: #737b94;
  --accent: #8b6cff;      /* roxo principal */
  --accent-2: #5b8cff;
  --xp: #3ddc97;          /* verde XP */
  --gold: #ffc145;        /* conquistas */
  --fire: #ff8a3d;        /* sequências */
  --series-1: #3987e5;    /* entradas */
  --series-2: #d95926;    /* saídas */
  --series-3: #199e70;    /* sobra/lucro */
  --good: #4cd98f;
  --warn: #f2b33d;
  --bad: #ff6b78;
  --good-bg: rgba(76, 217, 143, .12);
  --warn-bg: rgba(242, 179, 61, .12);
  --bad-bg: rgba(255, 107, 120, .12);
  --radius: 16px;
  --glow: 0 0 0 1px rgba(139, 108, 255, .25), 0 8px 30px rgba(139, 108, 255, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(139, 108, 255, .14), transparent 60%),
              radial-gradient(900px 500px at 110% 10%, rgba(61, 220, 151, .08), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--accent); }
::selection { background: rgba(139, 108, 255, .4); }

/* ---------- topo ---------- */
.topo { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 24px; background: rgba(13, 15, 22, .7); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.marca { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.marca .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 16px rgba(139, 108, 255, .4); }
.marca .sub { color: var(--muted); font-size: 13px; }
.chip-nivel { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 600; }
.chip-nivel .nv { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.chip-nivel .mini-xp { width: 70px; height: 6px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.chip-nivel .mini-xp > span { display: block; height: 100%; background: var(--xp); }
.filtros { display: flex; gap: 14px; align-items: end; }
.filtros label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- controles ---------- */
select, input, button, textarea { font: inherit; color: inherit; }
select, input[type=text], input[type=number], input[type=date], input[type=month], textarea {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--text);
}
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=number] { width: 130px; }
button { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; border-radius: 10px; padding: 8px 16px; cursor: pointer; font-weight: 600; box-shadow: 0 4px 14px rgba(139, 108, 255, .3); transition: transform .1s, filter .15s; }
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(1px) scale(.98); }
button.sec { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
button.perigo { background: var(--bad); box-shadow: none; }
button.mini { padding: 2px 9px; font-size: 12px; border-radius: 8px; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- abas ---------- */
.abas { display: flex; gap: 4px; padding: 10px 16px; overflow-x: auto; max-width: 1220px; margin: 0 auto; }
.abas a { padding: 8px 14px; text-decoration: none; color: var(--text-2); border-radius: 999px; white-space: nowrap; font-size: 14px; border: 1px solid transparent; transition: background .15s; }
.abas a:hover { background: var(--surface); }
.abas a.ativa { color: #fff; background: var(--surface-2); border-color: var(--line); font-weight: 600; box-shadow: var(--glow); }

main { max-width: 1180px; margin: 0 auto; padding: 14px 20px 60px; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.lead { color: var(--text-2); margin: 0 0 20px; }
.card { background: linear-gradient(180deg, var(--surface), rgba(23, 27, 41, .85)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .rot { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .val { font-size: 24px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .det { font-size: 12px; color: var(--muted); }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:hover td { background: rgba(139, 108, 255, .05); }
.tabela-scroll { max-height: 620px; overflow: auto; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status.bom { background: var(--good-bg); color: var(--good); }
.status.atencao { background: var(--warn-bg); color: var(--warn); }
.status.ruim { background: var(--bad-bg); color: var(--bad); }
.alerta { border: 1px solid rgba(242, 179, 61, .35); background: var(--warn-bg); padding: 11px 14px; border-radius: 12px; margin: 8px 0; font-size: 14px; }
.alerta.ruim { border-color: rgba(255, 107, 120, .4); background: var(--bad-bg); }
.alerta.bom { border-color: rgba(76, 217, 143, .35); background: var(--good-bg); }
.barra { height: 10px; background: var(--grid); border-radius: 999px; overflow: hidden; }
.barra > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.linha-cat { display: grid; grid-template-columns: 180px 1fr 110px 56px; gap: 10px; align-items: center; font-size: 14px; margin: 7px 0; }
.linha-cat .barra > span { background: var(--series-2); }
.form-linha { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0; }
.form-linha label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); gap: 3px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist input { margin-top: 4px; }
.checklist .dica { display: block; font-size: 13px; color: var(--muted); }
.medidor { display: flex; align-items: center; gap: 18px; }
.medidor .nota { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.legenda { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: fixed; pointer-events: none; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 50; min-width: 160px; }
.tip b { display: block; margin-bottom: 4px; }
.tip .l { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--text-2); cursor: pointer; }
.drop.sobre { border-color: var(--accent); background: rgba(139, 108, 255, .08); }
.vazio { text-align: center; padding: 50px 20px; color: var(--text-2); }
.rodape { text-align: center; font-size: 12px; color: var(--muted); padding: 20px; }
details summary { cursor: pointer; color: var(--text-2); }

/* ================= JOGO ================= */
.heroi { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 24px; border-radius: 22px; border: 1px solid rgba(139, 108, 255, .35);
  background: radial-gradient(600px 200px at 0% 0%, rgba(139, 108, 255, .28), transparent 70%), radial-gradient(500px 200px at 100% 100%, rgba(61, 220, 151, .14), transparent 70%), var(--surface);
  box-shadow: var(--glow); margin-bottom: 18px; }
.avatar { width: 86px; height: 86px; border-radius: 24px; display: grid; place-items: center; font-size: 44px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 28px rgba(139, 108, 255, .45); position: relative; }
.avatar .nv-badge { position: absolute; bottom: -8px; right: -8px; background: var(--gold); color: #2a1d00; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 2px 9px; border: 3px solid var(--surface); }
.heroi .nome { font-size: 22px; font-weight: 800; }
.heroi .titulo { color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.xpbar { height: 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 4px; }
.xpbar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--xp), #8af0c4); box-shadow: 0 0 14px rgba(61, 220, 151, .55); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.xp-txt { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.streaks { display: flex; flex-direction: column; gap: 8px; }
.streak { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; }
.streak .fogo { font-size: 24px; }
.streak b { font-size: 20px; color: var(--fire); font-variant-numeric: tabular-nums; }
.streak span { font-size: 12px; color: var(--text-2); line-height: 1.2; }

.secao-titulo { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 12px; }
.secao-titulo h2 { margin: 0; font-size: 18px; }
.missao { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 10px; transition: transform .15s, border-color .15s; }
.missao:hover { transform: translateY(-1px); border-color: rgba(139, 108, 255, .4); }
.missao .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.missao .t { font-weight: 650; }
.missao .d { font-size: 13px; color: var(--muted); }
.missao .prog { height: 6px; border-radius: 999px; background: var(--grid); overflow: hidden; margin-top: 6px; }
.missao .prog > span { display: block; height: 100%; background: var(--accent); }
.missao .xp { font-weight: 800; color: var(--xp); font-size: 14px; white-space: nowrap; text-align: right; }
.missao .xp small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.missao.ok { border-color: rgba(61, 220, 151, .45); background: linear-gradient(90deg, rgba(61, 220, 151, .10), var(--bg-2)); }
.missao.ok .ic { background: rgba(61, 220, 151, .2); }
.missao.falhou { opacity: .55; }
.missao.falhou .xp { color: var(--muted); text-decoration: line-through; }
.missao button.check { width: 30px; height: 30px; padding: 0; border-radius: 9px; background: var(--surface-2); border: 2px solid var(--line); box-shadow: none; font-size: 16px; }
.missao.ok button.check { background: var(--xp); border-color: var(--xp); color: #04351f; }

.medalhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.medalha { text-align: center; padding: 16px 10px 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); position: relative; }
.medalha .m-ic { width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: radial-gradient(circle at 30% 30%, #ffe08a, var(--gold) 55%, #b9831a); box-shadow: 0 0 0 4px rgba(255, 193, 69, .18), 0 6px 20px rgba(255, 193, 69, .3); }
.medalha .m-t { font-weight: 700; font-size: 13px; line-height: 1.25; }
.medalha .m-d { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.medalha .m-xp { font-size: 11px; font-weight: 800; color: var(--xp); margin-top: 6px; }
.medalha.bloq .m-ic { background: var(--surface-2); box-shadow: none; filter: grayscale(1); opacity: .55; font-size: 24px; }
.medalha.bloq .m-t { color: var(--text-2); }
.medalha .m-prog { height: 4px; border-radius: 999px; background: var(--grid); overflow: hidden; margin: 6px 8px 0; }
.medalha .m-prog > span { display: block; height: 100%; background: var(--gold); }

.chefe { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid rgba(255, 107, 120, .35); background: linear-gradient(90deg, rgba(255, 107, 120, .10), var(--bg-2)); margin-bottom: 10px; }
.chefe .ic { font-size: 34px; text-align: center; }
.chefe .hp { height: 10px; border-radius: 999px; background: var(--grid); overflow: hidden; margin-top: 6px; }
.chefe .hp > span { display: block; height: 100%; background: linear-gradient(90deg, #ff6b78, #ff9a5a); }

.hist-xp { display: flex; align-items: end; gap: 6px; height: 90px; padding-top: 6px; }
.hist-xp .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.hist-xp .col i { display: block; width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--xp), rgba(61, 220, 151, .45)); min-height: 2px; }
.hist-xp .col span { font-size: 10.5px; color: var(--muted); }

.toast-area { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { background: var(--surface-2); border: 1px solid rgba(61, 220, 151, .5); color: var(--text); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: sobe .35s cubic-bezier(.2, .8, .2, 1); }
.toast b { color: var(--xp); }
@keyframes sobe { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.levelup { position: fixed; inset: 0; background: rgba(5, 6, 12, .75); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 70; animation: fade .3s; }
.levelup .caixa { text-align: center; padding: 36px 44px; border-radius: 26px; background: var(--surface); border: 1px solid rgba(139, 108, 255, .5); box-shadow: 0 0 80px rgba(139, 108, 255, .35); animation: pula .5s cubic-bezier(.2, 1.4, .4, 1); max-width: 420px; }
.levelup .grande { font-size: 64px; }
.levelup h2 { font-size: 28px; margin: 6px 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pula { from { transform: scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 720px) {
  .heroi { grid-template-columns: auto 1fr; }
  .heroi .streaks { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .linha-cat { grid-template-columns: 110px 1fr 90px; } .linha-cat .p { display: none; }
}

/* ================= PERSONAGEM ================= */
.avatar-svg { display: block; }
.heroi .avatar-wrap { position: relative; cursor: pointer; border-radius: 26px; box-shadow: 0 10px 34px rgba(139, 108, 255, .45); transition: transform .2s; }
.heroi .avatar-wrap:hover { transform: translateY(-3px) rotate(-1deg); }
.heroi .avatar-wrap .nv-badge { position: absolute; bottom: -8px; right: -8px; background: var(--gold); color: #2a1d00; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 2px 10px; border: 3px solid var(--surface); }
.heroi-botoes { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.heroi-botoes a { text-decoration: none; }
.btn-bau { position: relative; }
.btn-bau .contador { position: absolute; top: -8px; right: -8px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; border: 2px solid var(--surface); }
.btn-bau.tem { animation: chama 1.6s ease-in-out infinite; }
@keyframes chama { 0%, 100% { box-shadow: 0 4px 14px rgba(139, 108, 255, .3); } 50% { box-shadow: 0 0 0 6px rgba(255, 193, 69, .25), 0 4px 22px rgba(255, 193, 69, .5); } }
.chip-nivel .baus { background: var(--gold); color: #2a1d00; border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 2px; }
.palco { text-align: center; padding: 18px; }
.palco-av { display: flex; justify-content: center; }
.palco-av svg { border-radius: 26px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.palco-info { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.moedas { font-weight: 800; font-size: 18px; color: var(--gold); }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.slot { background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); box-shadow: none; font-weight: 500; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.slot.ativo { background: var(--surface-2); color: #fff; border-color: var(--accent); box-shadow: var(--glow); }
.itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.item { background: var(--bg-2); border: 2px solid var(--line); border-radius: 16px; padding: 10px 8px; text-align: center; cursor: pointer; transition: transform .15s, border-color .15s; }
.item:hover { transform: translateY(-2px); }
.item.bloq { cursor: default; }
.item.bloq .item-prev svg { filter: grayscale(.9) brightness(.55); }
.item.eq { border-color: var(--xp); box-shadow: 0 0 0 3px rgba(61, 220, 151, .15); }
.item.rar-raro:not(.bloq) { border-color: rgba(78, 168, 255, .55); }
.item.rar-epico:not(.bloq) { border-color: rgba(178, 107, 255, .6); }
.item.rar-lendario:not(.bloq) { border-color: rgba(255, 193, 69, .7); box-shadow: 0 0 18px rgba(255, 193, 69, .2); }
.item.eq { border-color: var(--xp) !important; }
.item-prev { position: relative; display: flex; justify-content: center; }
.item-prev svg { border-radius: 14px; }
.cadeado { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 26px; }
.item-nome { font-weight: 700; font-size: 13px; margin-top: 6px; line-height: 1.2; }
.item-rar { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.item-acao { margin-top: 6px; min-height: 22px; font-size: 12px; }
.item-acao button[disabled] { opacity: .45; cursor: not-allowed; }
.bau-linha { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.bau-ic { font-size: 30px; text-align: center; }
.bau-linha.rar-raro { border-color: rgba(78, 168, 255, .45); }
.bau-linha.rar-epico { border-color: rgba(178, 107, 255, .55); }
.bau-linha.rar-lendario { border-color: rgba(255, 193, 69, .65); }
.bau-linha.rar-raro .bau-ic { filter: hue-rotate(180deg) saturate(1.4); }
.bau-linha.rar-epico .bau-ic { filter: hue-rotate(250deg) saturate(1.6); }
.bau-linha.rar-lendario .bau-ic { filter: sepia(1) saturate(3) hue-rotate(5deg) brightness(1.1); }
.abrir-bau { position: relative; overflow: hidden; min-width: 320px; }
.bau-grande { font-size: 96px; line-height: 1.1; margin: 12px 0; }
.treme { animation: treme .25s linear infinite; display: inline-block; }
@keyframes treme { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(8deg) scale(1.05); } }
.abrir-bau.revelado .revela { display: flex; justify-content: center; margin: 10px 0; animation: pula .6s cubic-bezier(.2, 1.5, .4, 1); position: relative; z-index: 1; }
.abrir-bau.revelado .revela svg { border-radius: 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.abrir-bau h2, .abrir-bau p, .abrir-bau .form-linha, .abrir-bau .small { position: relative; z-index: 1; }
.raios-fundo { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .07) 0 10deg, transparent 10deg 20deg); animation: gira 12s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.abrir-bau.rar-raro { border-color: #4ea8ff; box-shadow: 0 0 80px rgba(78, 168, 255, .45); }
.abrir-bau.rar-epico { border-color: #b26bff; box-shadow: 0 0 90px rgba(178, 107, 255, .55); }
.abrir-bau.rar-lendario { border-color: #ffc145; box-shadow: 0 0 110px rgba(255, 193, 69, .6); }
.pisca { animation: pisca 1.8s ease-in-out infinite; }
@keyframes pisca { 50% { opacity: .25; } }
.flutua { animation: flutua 2.4s ease-in-out infinite; }
@keyframes flutua { 0%, 100% { transform: translate(140px, 20px); } 50% { transform: translate(140px, 28px); } }
@media (max-width: 760px) { .grid[style*="minmax(280px"] { grid-template-columns: 1fr !important; } }

/* ================= APP / CELULAR ================= */
.topo { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.topo-meio { display: flex; align-items: center; gap: 8px; }
.sync-status { text-decoration: none; font-size: 18px; line-height: 1; padding: 6px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.card { overflow-x: auto; }
@media (display-mode: standalone) { .rodape { padding-bottom: max(20px, env(safe-area-inset-bottom)); } }
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topo { padding: max(10px, env(safe-area-inset-top)) 12px 10px; gap: 8px; }
  .marca .sub { display: none; }
  .marca { font-size: 16px; }
  .marca .logo { width: 30px; height: 30px; }
  .filtros { width: 100%; gap: 8px; }
  .filtros label { flex: 1; }
  .filtros select { width: 100%; }
  .chip-nivel .mini-xp { display: none; }
  .abas { padding: 8px 10px; }
  .abas a { padding: 7px 12px; font-size: 13px; }
  main { padding: 10px 12px 40px; }
  h1 { font-size: 21px; }
  .card { padding: 14px; border-radius: 14px; }
  .kpi .val { font-size: 20px; }
  .heroi { grid-template-columns: 1fr; text-align: center; padding: 18px; gap: 14px; }
  .heroi .avatar-wrap { justify-self: center; }
  .heroi .streaks { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .heroi-botoes { justify-content: center; }
  .xp-txt { flex-direction: column; gap: 2px; }
  .missao { grid-template-columns: 38px 1fr auto; padding: 10px; gap: 10px; }
  .missao .ic { width: 38px; height: 38px; font-size: 18px; }
  .medalhas { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .itens { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .item-prev svg { width: 80px; height: 88px; }
  .palco-av svg { width: 220px; height: 242px; }
  .form-linha label, .form-linha input[type=text], .form-linha input[type=password] { width: 100% !important; }
  table { font-size: 13px; }
  th, td { padding: 6px 5px; }
  .abrir-bau { min-width: 0; width: calc(100vw - 32px); padding: 24px 16px; }
  .toast-area { left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); }
}
.moeda-ic { display: inline-block; width: .95em; height: .95em; border-radius: 50%; vertical-align: -.12em; background: radial-gradient(circle at 35% 30%, #ffe9a8, #ffc145 45%, #c88a00); box-shadow: inset 0 0 0 .1em rgba(138, 90, 0, .45); }
.moeda-ic.grande { width: 96px; height: 96px; }
.chip-nivel .tit { white-space: nowrap; }
@media (max-width: 640px) { .chip-nivel .tit { display: none; } }
