/* tabletold — recompensas (Fase 103): cosméticos (molduras, ícones, fundos, dados, figurinhas),
   carteira, loja, conquistas e Treino. Usa os tokens de app.css; animações curtas e desligadas
   por prefers-reduced-motion (regra global em app.css). */

/* ---------- casca ---------- */
.purse {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--gold); font: 700 14px var(--f-ui); text-decoration: none; box-shadow: var(--shadow-1);
}
.purse svg { width: 18px; height: 18px; }
.quick-links { gap: 8px; flex-wrap: wrap; }
.quick-links .btn svg { width: 16px; height: 16px; }

/* ---------- molduras e ícones (avatar) ---------- */
.avatar.xl { width: 88px; height: 88px; font-size: 36px; }
.cosm { position: relative; display: inline-grid; place-items: center; flex: none; isolation: isolate; }
.cosm.frame::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; z-index: -1;
  background: var(--frame, var(--gold-lo));
}
.cosm.sm.frame::before { inset: -4px; }
.cosm.xl.frame::before { inset: -8px; }
.cosm.frame > .avatar { box-shadow: 0 0 0 2px var(--surface); }

.moldura_bronze { --frame: conic-gradient(from 20deg, #B8743A, #F0B27A, #8C5427, #D89556, #B8743A); }
.moldura_prata { --frame: conic-gradient(from 0deg, #CFD6DE, #FFFFFF, #8D99A6, #E9EEF2, #A9B4BF, #CFD6DE); }
.moldura_runas::before {
  background: repeating-conic-gradient(from 0deg, #E6B866 0 8deg, #3A2B55 8deg 16deg) !important;
  animation: cosm-spin 9s linear infinite, cosm-glow 2.6s ease-in-out infinite;
}
.moldura_chamas::before {
  background: conic-gradient(from 0deg, #FF6A2B, #FFD166, #FF3D2E, #FFB347, #FF6A2B) !important;
  box-shadow: 0 0 10px 2px rgb(255 106 43 / 0.65);
  animation: cosm-flame 1.1s ease-in-out infinite alternate, cosm-spin 5s linear infinite;
}
.moldura_arcana::before {
  background: conic-gradient(from 0deg, #A898FF, #3A2B8C, #E2DBFF, #5847C4, #A898FF) !important;
  box-shadow: 0 0 12px rgb(168 152 255 / 0.55);
  animation: cosm-spin 6s linear infinite;
}
.moldura_orelha_goblin { --frame: repeating-conic-gradient(from 10deg, #5E8C3A 0 18deg, #9DD35A 18deg 24deg, #3E5F24 24deg 36deg); }
.moldura_veterano::before {
  background: conic-gradient(from 0deg, #F2CD85, #9C6B22, #FFF1C9, #C8913C, #F2CD85) !important;
  box-shadow: 0 0 14px rgb(242 205 133 / 0.6);
  animation: cosm-glow 3s ease-in-out infinite;
}

.cosm-icon {
  position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); font-size: 12px; line-height: 1;
}
.cosm.sm .cosm-icon { width: 16px; height: 16px; font-size: 10px; right: -5px; bottom: -5px; }
.cosm.lg .cosm-icon { width: 24px; height: 24px; font-size: 14px; }
.cosm.xl .cosm-icon { width: 34px; height: 34px; font-size: 20px; right: -4px; bottom: -2px; }
.cosm-icon.solo { position: static; width: 56px; height: 56px; font-size: 30px; }
.icone_vela { animation: cosm-flicker 1.6s ease-in-out infinite; }
.icone_d20 { animation: cosm-roll 3.2s var(--ease) infinite; }
.icone_caveira { animation: cosm-wobble 2.4s ease-in-out infinite; }
.icone_coracao { animation: cosm-beat 1.2s ease-in-out infinite; }
.icone_estrela { animation: cosm-shoot 2.8s ease-in-out infinite; }
.icone_trofeu { animation: cosm-bounce 2s ease-in-out infinite; box-shadow: 0 0 10px var(--gold-glow); }

@keyframes cosm-spin { to { transform: rotate(360deg); } }
@keyframes cosm-glow { 50% { filter: brightness(1.35) saturate(1.2); } }
@keyframes cosm-flame { from { box-shadow: 0 0 8px 1px rgb(255 106 43 / 0.5); } to { box-shadow: 0 0 16px 4px rgb(255 190 80 / 0.75); } }
@keyframes cosm-flicker { 0%, 100% { opacity: 1; transform: scale(1); } 40% { opacity: 0.75; transform: scale(0.94) rotate(-4deg); } 70% { opacity: 0.95; transform: scale(1.04) rotate(3deg); } }
@keyframes cosm-roll { 0%, 60% { transform: rotate(0); } 80% { transform: rotate(200deg) scale(1.1); } 100% { transform: rotate(360deg); } }
@keyframes cosm-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes cosm-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
@keyframes cosm-shoot { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px) scale(1.12); } }
@keyframes cosm-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- fundos de perfil ---------- */
.profile-head {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px 16px 22px; border-radius: var(--r-l); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2);
  color: #FFF7E6; text-shadow: 0 1px 3px rgb(0 0 0 / 0.5);
}
.profile-head h2 { margin: 6px 0 0; font: 600 24px/1.2 var(--f-titulo); }
.profile-bg { background-size: 200% 200%; }
.fundo_padrao { background: linear-gradient(160deg, #3A2B55, #17141F); }
.fundo_taverna {
  background: radial-gradient(circle at 30% 30%, rgb(255 190 90 / 0.55), transparent 55%), radial-gradient(circle at 75% 70%, rgb(255 120 60 / 0.35), transparent 50%), linear-gradient(160deg, #5A3414, #1E120A);
  animation: bg-flicker 3.5s ease-in-out infinite;
}
.fundo_floresta {
  background: radial-gradient(circle at 80% 20%, rgb(230 240 255 / 0.55), transparent 22%), linear-gradient(180deg, #12301F 0%, #0B1B12 60%, #06100A 100%);
  animation: bg-drift 14s ease-in-out infinite alternate;
}
.fundo_aurora {
  background: linear-gradient(120deg, #1B1446, #1F6E5C, #5847C4, #6BD3A4, #1B1446);
  background-size: 300% 300%;
  animation: bg-shift 12s ease-in-out infinite alternate;
}
.fundo_brasas {
  background:
    radial-gradient(circle, rgb(255 150 60 / 0.9) 1.5px, transparent 2.5px) 0 0 / 38px 46px,
    radial-gradient(circle, rgb(255 210 120 / 0.7) 1px, transparent 2px) 12px 20px / 52px 60px,
    linear-gradient(180deg, #1A0B07, #4A140B);
  animation: bg-rise 6s linear infinite;
}
.fundo_covil_dragao {
  background: radial-gradient(circle at 50% 110%, rgb(255 90 40 / 0.75), transparent 55%), radial-gradient(circle at 20% 20%, rgb(242 205 133 / 0.35), transparent 40%), linear-gradient(160deg, #2A0808, #0E0404);
  background-size: 160% 160%;
  animation: bg-drift 9s ease-in-out infinite alternate, bg-flicker 4s ease-in-out infinite;
}
.bg-swatch { display: block; width: 100%; height: 72px; border-radius: var(--r-m); }
@keyframes bg-flicker { 50% { filter: brightness(1.15); } }
@keyframes bg-drift { to { background-position: 100% 60%; } }
@keyframes bg-shift { to { background-position: 100% 50%; } }
@keyframes bg-rise { to { background-position: 0 -46px, 12px -40px, 0 0; } }

/* ---------- dados ---------- */
.dice-skin svg { transition: color 0.2s; }
.dados_osso { color: #D8C9A8 !important; }
.dados_rubi { color: #E0445C !important; }
.dados_esmeralda { color: #38B77C !important; }
.dados_arcanos { color: #A898FF !important; animation: dice-glow 2.2s ease-in-out infinite; }
.dados_ouro { color: #F2CD85 !important; animation: dice-glow 2.8s ease-in-out infinite; }
.dice-preview { display: grid; place-items: center; width: 64px; height: 64px; }
.dice-preview svg { width: 56px; height: 56px; }
@keyframes dice-glow { 50% { filter: drop-shadow(0 0 5px currentColor); } }

/* ---------- figurinhas ---------- */
.sticker-art { width: 112px; height: 112px; display: block; }
.sticker-bubble { padding: 2px; animation: sticker-pop 0.45s var(--ease); transform: rotate(-3deg); }
.p-sticker.mine .sticker-bubble { transform: rotate(3deg); }
.sticker-preview .sticker-art { width: 84px; height: 84px; }
.sticker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sticker-grid button { border: 0; background: var(--surface-2); border-radius: var(--r-m); padding: 8px; cursor: pointer; display: grid; place-items: center; }
.sticker-grid button:active { transform: scale(0.94); }
.sticker-grid .sticker-art { width: 84px; height: 84px; }
.composer .sticker-btn { background: var(--gold-soft); font-size: 20px; }
@keyframes sticker-pop { 0% { transform: scale(0.4) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }

/* ---------- carteira ---------- */
.balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.balance {
  display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r-l);
  border: 1px solid var(--line-soft); background: var(--surface); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none;
}
.balance .ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--gold-soft); color: var(--gold); margin-bottom: 6px; }
.balance .ico svg { width: 20px; height: 20px; }
.balance strong { font: 700 28px/1.1 var(--f-titulo); }
.balance small { color: var(--text-2); font-size: 13px; }
.balance.credits .ico { background: var(--arcane-soft); color: var(--arcane); }
.earn-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ledger { display: flex; flex-direction: column; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-soft); }
.ledger-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.ledger-row:first-child { border-top: 0; }
.ledger-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ledger-row .amt { min-width: 52px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ledger-row .amt.in { color: var(--ok); }
.ledger-row .amt.out { color: var(--ember); }

/* ---------- loja ---------- */
.shop-seg { overflow-x: auto; scrollbar-width: none; }
.shop-seg button { flex: 1 0 auto; padding: 0 12px; white-space: nowrap; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shop-item {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); min-width: 0;
}
.shop-item.equipped { border-color: var(--gold-lo); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-1); }
.shop-preview { display: grid; place-items: center; min-height: 96px; border-radius: var(--r-m); background: var(--surface-2); padding: 10px; }
.shop-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-info strong { font: 600 15px/1.25 var(--f-titulo); }
.shop-action { display: flex; }
.shop-action .btn, .shop-action .chip { width: 100%; justify-content: center; }
.chip.rarity.rara { color: #2B6CB0; border-color: rgb(43 108 176 / 0.35); }
.chip.rarity.epica { color: var(--arcane); border-color: var(--arcane-line); }
.chip.rarity.lendaria { color: var(--gold); border-color: var(--gold-lo); }
.rarity-lendaria .shop-preview { background: radial-gradient(circle at 50% 40%, var(--gold-soft), var(--surface-2)); }
.rarity-epica .shop-preview { background: radial-gradient(circle at 50% 40%, var(--arcane-soft), var(--surface-2)); }

/* ---------- conquistas ---------- */
.badge-list { display: flex; flex-direction: column; gap: 10px; }
.badge-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line-soft); opacity: 0.86;
}
.badge-card.earned { opacity: 1; border-color: var(--gold-lo); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-1); }
.badge-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.badge-card strong { font: 600 16px/1.2 var(--f-titulo); }
.badge-card .tier { font: 700 11px var(--f-ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.badge-emoji { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface-3); font-size: 26px; filter: grayscale(0.8); }
.badge-card.earned .badge-emoji { background: linear-gradient(150deg, var(--gold-hi), var(--gold-lo)); filter: none; }
.badge-card .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.badge-card .bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.count-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.count { display: flex; flex-direction: column; padding: 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-soft); }
.count strong { font: 700 24px/1.1 var(--f-titulo); color: var(--gold); }
.count small { color: var(--text-2); font-size: 12.5px; }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.shelf-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--gold-lo); text-align: center; }
.shelf-badge span { font-size: 26px; }
.shelf-badge small { font-size: 12px; font-weight: 600; }

/* ---------- Treino ---------- */
.step-n { font: 700 16px var(--f-titulo); }
.cr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip {
  min-width: 52px; min-height: 44px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font: 700 16px var(--f-titulo); color: var(--text);
}
.cr-chip[aria-pressed="true"] { background: linear-gradient(150deg, var(--gold-hi), var(--gold-lo)); color: var(--on-gold); border-color: transparent; box-shadow: 0 6px 18px var(--gold-glow); }
.monster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.monster-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-l); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1);
}
.monster-card input { position: absolute; opacity: 0; pointer-events: none; }
.monster-card:has(input:checked) { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft), var(--shadow-1); }
.monster-card:has(input:focus-visible) { outline: 2px solid var(--gold); }
.monster-card strong { font: 600 17px/1.2 var(--f-titulo); }
.monster-card small { color: var(--text-2); }
.monster-card .stats { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cr-badge { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--ember-soft); color: var(--ember); font: 800 11px var(--f-ui); letter-spacing: 0.04em; }
.arena-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ember-soft); color: var(--ember); flex: none; }
.arena-ico svg { width: 20px; height: 20px; }
.arena-bar { display: flex; flex-direction: column; }
.arena-card .card-head { flex-wrap: wrap; }
.arena-card .card-head .chip { margin-left: auto; }
.label { font-weight: 600; font-size: 14px; }

@media (min-width: 720px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-links .btn { padding: 0 8px; font-size: 13.5px; }
.monster-card .stats { flex-wrap: wrap; }
.monster-card .stats span { white-space: nowrap; }
.train-step .seg button { font-size: 13px; line-height: 1.25; padding: 6px 8px; text-align: center; }

/* ---------- arte pintada (Fase 109): img/ via img.js; o CSS acima fica como reserva ---------- */
/* molduras: o anel pintado (fundo transparente) por cima do avatar, 1,5x o diâmetro dele */
.cosm.framed > .cosm-frame {
  position: absolute; left: 50%; top: 50%; width: 150%; height: 150%; max-width: none;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 1;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.45));
}
.cosm.framed { margin: 8px; }
.cosm.framed.sm { margin: 6px; }
.cosm.framed.xl { margin: 22px; }
.cosm.framed .cosm-icon { z-index: 2; }
.cosm.framed.moldura_runas > .cosm-frame { animation: cosm-glow 2.6s ease-in-out infinite; }
.cosm.framed.moldura_chamas > .cosm-frame { animation: frame-flame 1.1s ease-in-out infinite alternate; }
.cosm.framed.moldura_arcana > .cosm-frame { animation: frame-arcane 2.4s ease-in-out infinite; }
.cosm.framed.moldura_veterano > .cosm-frame { animation: cosm-glow 3s ease-in-out infinite; }
@keyframes frame-flame { from { filter: drop-shadow(0 0 3px rgb(255 106 43 / 0.55)); } to { filter: drop-shadow(0 0 9px rgb(255 190 80 / 0.85)); } }
@keyframes frame-arcane { 50% { filter: drop-shadow(0 0 8px rgb(168 152 255 / 0.8)); } }

/* ícones: medalhão pintado dentro do círculo do ícone */
.cosm-icon .art { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.cosm-icon:has(> .art) { background: transparent; box-shadow: 0 1px 3px rgb(0 0 0 / 0.35); }
.cosm-icon.solo:has(> .art) { box-shadow: none; }
.cosm-icon.solo .art { width: 56px; height: 56px; filter: drop-shadow(0 3px 6px rgb(0 0 0 / 0.35)); }
.cosm.xl .cosm-icon:has(> .art) { width: 38px; height: 38px; }

/* dados: a arte tem o fundo bege do pergaminho; vira uma ficha redonda com aro, legível nos dois temas */
.art-die {
  border-radius: 50%; background: #D5BB99; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1.5px rgb(120 86 40 / 0.55), 0 2px 6px rgb(0 0 0 / 0.3);
  object-view-box: inset(9%); /* aproxima o dado da borda da ficha onde há suporte */
}
.dice-preview.has-art { position: relative; width: 96px; height: 80px; }
.dice-preview.has-art .art-die:first-child { width: 72px; height: 72px; }
.dice-preview.has-art .art-die + .art-die { position: absolute; right: -2px; bottom: -4px; width: 40px; height: 40px; }

/* figurinhas: adesivo pintado (contorno branco, fundo transparente) e a legenda embaixo */
.sticker-pic { display: inline-flex; flex-direction: column; align-items: center; width: 112px; height: auto; }
.sticker-pic .art { width: 100%; height: auto; filter: drop-shadow(0 3px 5px rgb(0 0 0 / 0.35)); }
.sticker-pic b {
  margin-top: -14px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text);
  font: 800 11.5px/1.3 var(--f-ui); box-shadow: var(--shadow-1); white-space: nowrap; position: relative;
}
.sticker-preview .sticker-pic, .sticker-grid .sticker-pic { width: 84px; height: auto; }
.sticker-grid .sticker-pic b { font-size: 10.5px; }

/* fundos de perfil pintados (o gradiente acima vale enquanto a imagem carrega) */
.profile-bg.fundo_taverna, .profile-bg.fundo_floresta, .profile-bg.fundo_aurora, .profile-bg.fundo_brasas,
.profile-bg.fundo_covil_dragao, .profile-bg.fundo_padrao {
  background-size: cover; background-position: center; animation: none;
}
.profile-bg.fundo_taverna { background-image: linear-gradient(180deg, rgb(10 6 2 / 0.15), rgb(10 6 2 / 0.6)), url("/assets/img/fundos/fundo_taverna.webp"); animation: bg-flicker 3.5s ease-in-out infinite; }
.profile-bg.fundo_floresta { background-image: linear-gradient(180deg, rgb(4 12 8 / 0.1), rgb(4 12 8 / 0.6)), url("/assets/img/fundos/fundo_floresta.webp"); }
.profile-bg.fundo_aurora { background-image: linear-gradient(180deg, rgb(10 8 30 / 0.1), rgb(10 8 30 / 0.55)), url("/assets/img/fundos/fundo_aurora.webp"); }
.profile-bg.fundo_brasas { background-image: linear-gradient(180deg, rgb(20 6 2 / 0.15), rgb(20 6 2 / 0.6)), url("/assets/img/fundos/fundo_brasas.webp"); animation: bg-flicker 4s ease-in-out infinite; }
.profile-bg.fundo_covil_dragao { background-image: linear-gradient(180deg, rgb(20 4 4 / 0.15), rgb(20 4 4 / 0.6)), url("/assets/img/fundos/fundo_covil_dragao.webp"); animation: bg-flicker 4s ease-in-out infinite; }
/* o padrão é pergaminho claro com arabescos: texto escuro, sem sombra */
.profile-bg.fundo_padrao { background-image: url("/assets/img/fundos/fundo_padrao.webp"); background-color: #EFE3C8; color: #2A1D0B; text-shadow: none; }
.bg-swatch.profile-bg { height: 84px; }

/* conquistas: medalhão pintado (transparente); a que falta fica dessaturada */
.badge-emoji:has(> .art) { background: none !important; width: 64px; height: 64px; border-radius: 50%; filter: none; }
.badge-emoji .art { width: 64px; height: 64px; filter: grayscale(0.85) opacity(0.8) drop-shadow(0 2px 4px rgb(0 0 0 / 0.3)); }
.badge-card.earned .badge-emoji .art { filter: drop-shadow(0 3px 8px var(--gold-glow)); }
.shelf-badge .art { width: 56px; height: 56px; filter: drop-shadow(0 2px 5px rgb(0 0 0 / 0.3)); }

/* a .shop-item da loja do personagem (app.css) centraliza os filhos; aqui os cartões esticam,
   senão a prévia do fundo some (largura 0) e os botões encolhem */
.shop-grid .shop-item { align-items: stretch; }

/* carteira: moeda e gema pintadas nos saldos */
.balance .ico:has(> .art) { background: none; width: 44px; height: 44px; }
.balance .ico .art { width: 44px; height: 44px; border-radius: 12px; }

/* ---------- Fase 105: espólio da arena (inventário, vitrine, pós-vitória) ----------
   A arte do item é um glifo sobre uma moldura de raridade (ponto de encaixe em loot.js). */
.loot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.loot-grid.showcase { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.loot-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); min-width: 0;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow-1);
}
.loot-card.on { border-color: var(--gold-lo); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-1); }
.loot-card.compact { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
.loot-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.loot-info strong { font: 600 15px/1.2 var(--f-titulo); overflow-wrap: anywhere; }
.loot-info small { font-size: 12px; }
.loot-serial { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }
.loot-rarity { font-weight: 700; }
.loot-rarity.r-incomum { color: var(--ok); }
.loot-rarity.r-raro { color: #2B6CB0; }
.loot-rarity.r-muito_raro { color: var(--arcane); }
.loot-rarity.r-lendario { color: var(--gold); }
.loot-action { flex: none; }
.loot-art {
  --rim: var(--line); flex: none; position: relative; isolation: isolate; display: grid; place-items: center; border-radius: 14px;
  width: 52px; height: 52px; font-size: 26px; line-height: 1;
  background: radial-gradient(circle at 50% 35%, var(--gold-soft), var(--surface-2));
  box-shadow: inset 0 0 0 2px var(--rim), 0 4px 10px rgb(0 0 0 / 0.12);
}
.loot-art.sm { width: 44px; height: 44px; font-size: 22px; }
.loot-art i { font-style: normal; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); }
.loot-art.r-incomum { --rim: rgb(47 125 91 / 0.55); }
.loot-art.r-raro { --rim: rgb(43 108 176 / 0.6); }
.loot-art.r-muito_raro { --rim: var(--arcane-line); background: radial-gradient(circle at 50% 35%, var(--arcane-soft), var(--surface-2)); }
.loot-art.r-lendario { --rim: var(--gold-lo); background: radial-gradient(circle at 50% 35%, var(--gold-glow), var(--surface-2)); box-shadow: inset 0 0 0 2px var(--rim), 0 0 16px var(--gold-glow); }
.loot-art.kind-magico::after {
  content: ""; position: absolute; inset: -3px; border-radius: 16px; pointer-events: none; z-index: -1;
  background: conic-gradient(from 0deg, transparent, var(--gold-glow), transparent 40%);
  animation: cosm-spin 6s linear infinite;
}

/* Fase 109: pintura do item dentro da moldura de raridade (o glifo fica como reserva) */
.loot-art.has-art { font-size: 0; }
.loot-art .loot-pic { width: 88%; height: 88%; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); }
.loot-card.compact .loot-art.has-art { width: 64px; height: 64px; }
.profile-bio { margin: 6px 0 0; max-width: 36ch; white-space: pre-line; overflow-wrap: anywhere; }
