:root {
  --fundo: #0d0709;
  --fundo-2: #170c11;
  --painel: #1e1116;
  --painel-2: #28161d;
  --borda: #3d2229;
  --borda-forte: #5c2a35;
  --texto: #eadfe0;
  --texto-suave: #a8939a;
  --texto-fraco: #76616a;
  --sangue: #c4142f;
  --sangue-claro: #ff3d5a;
  --sangue-escuro: #6e0b1c;
  --ouro: #e8c26a;
  --vida: #d72a45;
  --vida-fundo: #3a1219;
  --escudo: #7fb6ff;
  --cura: #6ee08a;
  --magia: #9a6bff;
  --perigo: #ff5d5d;
  --raio: 10px;
  --sombra: 0 8px 30px rgba(0, 0, 0, .5);
  --fonte-titulo: 'Cinzel', Georgia, serif;
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(196, 20, 47, .18), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(110, 11, 28, .25), transparent 50%),
    var(--fundo);
  background-attachment: fixed;
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.45;
}
#app { min-height: 100%; }
h1, h2, h3 { font-family: var(--fonte-titulo); font-weight: 700; letter-spacing: .02em; margin: 0; }
small { color: var(--texto-suave); }
b { font-weight: 600; }

/* ── Botões ─────────────────────────────────────────────────── */
.btn, .btn-icone {
  font: inherit;
  color: var(--texto);
  background: var(--painel-2);
  border: 1px solid var(--borda-forte);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn { padding: 7px 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn small { color: inherit; opacity: .8; }
.btn:hover:not(:disabled), .btn-icone:hover:not(:disabled) { background: #3a1d26; border-color: var(--sangue); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn-icone:disabled { opacity: .4; cursor: not-allowed; }
.btn.primario { background: linear-gradient(180deg, var(--sangue), var(--sangue-escuro)); border-color: var(--sangue-claro); font-weight: 600; }
.btn.primario:hover:not(:disabled) { background: linear-gradient(180deg, var(--sangue-claro), var(--sangue)); box-shadow: 0 0 18px rgba(255, 61, 90, .45); }
.btn.perigo { border-color: var(--perigo); color: var(--perigo); background: transparent; }
.btn.grande { padding: 10px 20px; font-size: 1.05em; }
.btn-icone { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; font-size: 15px; }
.btn-icone.perigo:hover { border-color: var(--perigo); }
button:focus-visible { outline: 2px solid var(--ouro); outline-offset: 2px; }

.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--borda-forte); color: var(--texto-suave); white-space: nowrap; }
.tag.concluida { color: var(--cura); border-color: rgba(110, 224, 138, .4); }
.tag.nova { color: var(--ouro); border-color: rgba(232, 194, 106, .45); }
.tag.bloqueada { color: var(--texto-fraco); }
.dica { color: var(--texto-suave); margin: 0 0 16px; max-width: 75ch; }
.dica.pequena { font-size: 13px; margin: 8px 0 0; }
.vazio { color: var(--texto-fraco); font-style: italic; }
.chip-elemento { font-size: 11px; padding: 1px 7px; border-radius: 99px; color: var(--cor); border: 1px solid color-mix(in srgb, var(--cor) 45%, transparent); }

/* ── Castelo ────────────────────────────────────────────────── */
.castelo-tela { max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }
.topo { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 12px; gap: 12px; border-bottom: 1px solid var(--borda); margin-bottom: 18px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca-icone { font-size: 30px; filter: drop-shadow(0 0 10px rgba(196, 20, 47, .7)); }
.marca h1 { font-size: 26px; background: linear-gradient(180deg, #ffd5db, var(--sangue-claro)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.recursos { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.recurso { background: var(--painel); border: 1px solid var(--borda-forte); padding: 6px 14px; border-radius: 99px; white-space: nowrap; }
.recurso b { font-size: 17px; }
.recurso span { color: var(--texto-suave); font-size: 13px; }
.recurso.sangue { color: var(--sangue-claro); }
.recurso.ouro { color: var(--ouro); }
.absorvido .ouro { color: var(--ouro); }
.total-ess small { display: block; font-size: 14px; color: var(--ouro); text-align: right; }
.absorvido.sem-sangue small:first-of-type { color: var(--texto-fraco); }

.trilha { display: flex; align-items: center; gap: 12px; margin: -6px 0 16px; color: var(--texto-suave); font-size: 14px; flex-wrap: wrap; }
.trilha .sep { color: var(--texto-fraco); margin: 0 4px; }

.castelo-conteudo.entrando { animation: entrar-comodo .35s cubic-bezier(.2, .8, .3, 1); }
.castelo-corpo { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }

/* Mapa do castelo (tela principal) */
.mapa-castelo {
  position: relative; border: 1px solid var(--borda); border-radius: 14px; overflow: hidden;
  padding: 26px 18px 0;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 240, 200, .16), transparent 18%),
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 30% 8%, #fff6, transparent),
    radial-gradient(1px 1px at 52% 14%, #fff7, transparent), radial-gradient(1px 1px at 70% 6%, #fff5, transparent),
    radial-gradient(1px 1px at 92% 30%, #fff6, transparent), radial-gradient(1px 1px at 6% 40%, #fff5, transparent),
    linear-gradient(180deg, #160a14 0%, #241020 45%, #1a0b10 80%, #0f0709 100%);
}
.mapa-castelo::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 7%;
  background: linear-gradient(180deg, #1b120f, #0c0807); border-top: 1px solid #2c201a; z-index: 0;
}
.ceu { position: absolute; inset: 0; pointer-events: none; }
.ceu .lua { position: absolute; right: 7%; top: 14px; font-size: 38px; filter: drop-shadow(0 0 22px rgba(255, 235, 180, .55)); animation: luar 6s ease-in-out infinite; }
.ceu .morcegos { position: absolute; left: 50%; top: 22px; font-size: 16px; animation: voar 9s ease-in-out infinite; }
.ceu .morcegos span { display: inline-block; font-size: 12px; transform: translate(10px, -10px); }

.castelo-corte { container-type: inline-size; position: relative; z-index: 1; width: 100%; max-width: 980px; margin: 0 auto; aspect-ratio: 969 / 771; }
.castelo-moldura { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; z-index: 2; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }

.comodo-mapa {
  position: absolute; z-index: 1; font: inherit; color: var(--texto); cursor: pointer; border: none; padding: 0 6% 7%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; text-align: center;
  background:
    radial-gradient(ellipse at 50% 100%, var(--luz, rgba(196, 20, 47, .22)), transparent 70%),
    linear-gradient(180deg, var(--parede-1, #2a1a22), var(--parede-2, #170d12) 78%, var(--piso, #0e0709) 78%);
  transition: filter .2s;
}
.comodo-mapa::before { /* tijolos ao fundo */
  content: ''; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(0, 0, 0, .35) 14px 15px),
              repeating-linear-gradient(90deg, transparent 0 28px, rgba(0, 0, 0, .25) 28px 29px);
}
.comodo-mapa.sotao { padding-bottom: 6%; clip-path: polygon(0 41%, 50% 0, 100% 41%, 100% 100%, 0 100%); } /* formato da empena */
.comodo-mapa::after { /* a luz do cômodo tremula como vela */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 90%, var(--luz, rgba(196, 20, 47, .22)), transparent 60%);
  animation: tremular 3.4s ease-in-out infinite alternate; mix-blend-mode: screen;
}
.comodo-forja::after { animation-duration: 1.3s; }
.comodo-mapa:hover, .comodo-mapa:focus-visible { filter: brightness(1.45) saturate(1.2); outline: none; }
.comodo-mapa:focus-visible .comodo-rotulo { outline: 2px solid var(--ouro); outline-offset: 2px; }
.comodo-mobilia { position: relative; white-space: nowrap; font-size: clamp(11px, 3cqw, 30px); letter-spacing: .08em; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .7)); transition: transform .2s; }
.comodo-mapa:hover .comodo-mobilia { transform: translateY(-3px) scale(1.06); }
.comodo-rotulo { position: relative; display: flex; flex-direction: column; align-items: center; background: rgba(10, 5, 7, .72); border: 1px solid rgba(232, 194, 106, .25); border-radius: 8px; padding: 3px 8px; max-width: 100%; }
.comodo-rotulo b { font-family: var(--fonte-titulo); font-size: clamp(8px, 1.45cqw, 14px); line-height: 1.15; }
.comodo-rotulo .nome-curto { display: none; }
.comodo-rotulo small { font-size: clamp(8px, 1.15cqw, 11px); color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.comodo-alerta { position: absolute; top: 10%; right: 6%; z-index: 3; font-style: normal; font-size: clamp(8px, 1.1cqw, 11px); font-weight: 700; color: #2a1a00; background: var(--ouro); border-radius: 99px; padding: 2px 8px; box-shadow: 0 0 12px rgba(232, 194, 106, .5); }
.comodo-mapa.sotao .comodo-alerta { top: 42%; }
.mapa-dica { position: relative; z-index: 3; text-align: center; margin: 0; padding: 10px 0 12px; }

/* Cada cômodo com sua luz e sua parede */
.comodo-biblioteca   { --parede-1: #2b1e16; --parede-2: #1a120c; --luz: rgba(255, 190, 90, .25); }
.comodo-observatorio { --parede-1: #141a33; --parede-2: #0c0f1f; --luz: rgba(140, 170, 255, .28); }
.comodo-galeria      { --parede-1: #2a1d10; --parede-2: #18100a; --luz: rgba(232, 194, 106, .28); }
.comodo-altar        { --parede-1: #3a0f18; --parede-2: #1e070c; --luz: rgba(255, 50, 80, .35); }
.comodo-trono        { --parede-1: #2c0f22; --parede-2: #170812; --luz: rgba(196, 20, 47, .3); }
.comodo-camara       { --parede-1: #1d1622; --parede-2: #100b14; --luz: rgba(160, 120, 200, .22); }
.comodo-forja        { --parede-1: #2e150c; --parede-2: #180a06; --luz: rgba(255, 120, 40, .4); }
.comodo-treino       { --parede-1: #221a14; --parede-2: #120d0a; --luz: rgba(200, 180, 150, .2); }
.comodo-arredores    { --parede-1: #12182a; --parede-2: #0a0d18; --luz: rgba(255, 235, 180, .25); }

.comodo-cabecalho { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.comodo-cabecalho-icone { font-size: 44px; line-height: 1; }
.comodo-cabecalho h2 { font-size: 22px; margin-bottom: 6px; }

.camara { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cartao { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; margin: 0; }
.cartao h3 { margin-top: 0; }
.cartao .btn { margin-top: 12px; }
.cartao .dica + h3 { margin-top: 14px; }
.positivo { color: var(--cura); }
.negativo { color: var(--perigo); }

/* Galeria de Troféus */
.grade-trofeus { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trofeu { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: linear-gradient(180deg, #2a1d12, var(--painel)); border: 1px solid #4a3418; border-radius: 10px; padding: 12px 8px; }
.trofeu.chefe { border-color: var(--ouro); box-shadow: 0 0 14px rgba(232, 194, 106, .18); }
.trofeu.desconhecido { background: var(--painel); border: 1px dashed var(--borda); color: var(--texto-fraco); }
.trofeu-icone { font-size: 36px; line-height: 1.1; }
.trofeu.desconhecido .trofeu-icone { opacity: .4; }
.trofeu b { font-size: 13px; }
.trofeu small { font-size: 11px; }
.trofeu-tecnicas { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.trofeu-tecnica { font-size: 16px; opacity: .3; filter: grayscale(1); }
.trofeu-tecnica.aprendida { opacity: 1; filter: none; }

/* Sala de Treino */
.treino-topo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.treino-boneco { font-size: 56px; line-height: 1; }
.treino-boneco.atingido { animation: tremer .4s; }
.treino-resumo { margin: 14px 0; }
.treino-fontes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.treino-fontes li { display: grid; grid-template-columns: 32px minmax(120px, 220px) 1fr 60px; gap: 10px; align-items: center; font-size: 14px; }
.treino-fontes b { text-align: right; }
.treino-nome small { display: block; font-size: 11px; }
.treino-barra { height: 10px; background: var(--painel-2); border-radius: 99px; overflow: hidden; }
.treino-barra span { display: block; height: 100%; background: linear-gradient(90deg, var(--sangue-escuro), var(--sangue-claro)); border-radius: 99px; }


.painel-vampiro { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; position: sticky; top: 12px; z-index: 20; }
.retrato { text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--borda); margin-bottom: 12px; }
.retrato { position: relative; }
.retrato::before { /* halo atrás do vampiro */
  content: ''; position: absolute; left: 50%; top: 2px; width: 110px; height: 110px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 20, 47, .35), transparent 65%); animation: halo 4s ease-in-out infinite; pointer-events: none;
}
.retrato-icone { position: relative; font-size: 64px; line-height: 1.1; filter: drop-shadow(0 0 18px rgba(196, 20, 47, .6)); animation: respirar 4s ease-in-out infinite; }
.retrato-arma { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--texto-suave); margin-top: 6px; text-align: left; }
.retrato-arma small, .arma-nome small { display: block; font-size: 11px; color: var(--texto-fraco); }

/* Arma em uso: ícone que abre a lista das armas disponíveis */
.seletor-arma { position: relative; }
.seletor-arma.aberto { z-index: 30; }
/* No retrato do vampiro, a lista ocupa a largura do painel em vez de sair dele. */
.retrato-arma .seletor-arma { position: static; }
.retrato-arma .arma-lista { left: 0; right: 0; width: auto; }
.arma-atual { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; background: var(--painel-2); border: 1px solid var(--borda-forte); border-radius: 10px; color: var(--texto); cursor: pointer; padding: 0; transition: border-color .2s, box-shadow .2s, transform .1s; }
.arma-atual:hover, .seletor-arma.aberto .arma-atual { border-color: var(--sangue-claro); box-shadow: 0 0 12px rgba(196, 20, 47, .35); }
.arma-atual:active { transform: translateY(1px); }

/* Recarga da arma em combate: a parte escura é o que falta para o próximo golpe */
@property --carga { syntax: '<percentage>'; inherits: true; initial-value: 100%; }
.arma-atual { position: relative; overflow: hidden; }
.arma-atual.carregando::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: conic-gradient(transparent var(--carga), rgba(0, 0, 0, .7) var(--carga)); }
.arma-atual.golpe { animation: golpe-arma .35s ease-out; }
@keyframes golpe-arma { 30% { border-color: var(--ouro); box-shadow: 0 0 14px rgba(232, 194, 106, .6); } }
.arma-lista { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(280px, calc(100vw - 32px)); background: var(--painel); border: 1px solid var(--borda-forte); border-radius: 12px; padding: 8px; box-shadow: var(--sombra); display: grid; gap: 6px; animation: surgir .15s ease-out; }
.arma-lista h5 { margin: 2px 4px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-fraco); font-weight: 600; }
.arma-lista h5 small { display: inline; margin-left: 4px; color: var(--texto-suave); }
.arma-lista .dica { margin: 2px 4px; }
.arma-opcao { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--painel-2); border: 1px solid var(--borda); border-radius: 9px; padding: 8px; font: inherit; color: var(--texto); cursor: pointer; }
.arma-opcao:hover { border-color: var(--sangue-claro); }
.arma-opcao.em-uso { border-color: var(--ouro); cursor: default; }
.arma-opcao .arma-icone { font-size: 22px; }
.arma-opcao .arma-texto { flex: 1; min-width: 0; }
.arma-opcao small { display: block; font-size: 11px; color: var(--texto-fraco); }
.arma-opcao em { font-style: normal; font-size: 11px; color: var(--ouro); }
.arma-opcao small.usos, small.usos { display: block; font-size: 11px; color: var(--texto-suave); }
.arma-opcao.trancada { opacity: .55; cursor: default; }
.arma-opcao.trancada:hover { border-color: var(--borda); }
@keyframes surgir { from { opacity: 0; transform: translateY(-4px); } }
.area-arma { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.stats { margin: 0; display: grid; gap: 5px; }
.stats div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.stats dt { color: var(--texto-suave); }
.stats dd { margin: 0; font-weight: 600; text-align: right; }
.stats small { font-weight: 400; }

/* Masmorras */
.lista-masmorras { display: grid; gap: 12px; }
.masmorra { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; transition: border-color .2s; }
.masmorra:not(.trancada):hover { border-color: var(--borda-forte); }
.masmorra.trancada { opacity: .55; }
.masmorra { transition: border-color .2s, transform .2s, box-shadow .2s; }
.masmorra:not(.trancada):hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(196, 20, 47, .25); }
.masmorra-icone { position: relative; width: 132px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--borda-forte); display: grid; place-items: center; font-size: 40px; box-shadow: inset 0 0 24px rgba(0, 0, 0, .7); }
.masmorra-icone .cena-particulas .particula { animation-duration: calc(var(--dur) * 1.4); }
.masmorra-icone > .masmorra-chefe { position: relative; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .8)) drop-shadow(0 0 14px rgba(255, 255, 255, .15)); transition: transform .3s; transform-origin: 50% 100%; }
.masmorra-icone > img.masmorra-chefe { place-self: end center; height: 90%; max-width: 92%; margin-bottom: 2px; }
.masmorra:not(.trancada):hover .masmorra-icone > .masmorra-chefe { transform: scale(1.08) translateY(-2px); }
.masmorra.trancada .masmorra-icone { filter: grayscale(.85) brightness(.6); }
.masmorra-titulo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.masmorra-titulo h3 { font-size: 18px; }
.masmorra-meta { font-size: 13px; color: var(--ouro); margin: 2px 0 6px; }
.masmorra p { margin: 0 0 8px; color: var(--texto-suave); font-size: 14px; }
.masmorra-bestiario { display: flex; gap: 6px; font-size: 20px; align-items: center; flex-wrap: wrap; }
.masmorra-bestiario .sep { color: var(--texto-fraco); }
.masmorra-bestiario .chefe { filter: drop-shadow(0 0 6px rgba(232, 194, 106, .8)); }
.masmorra-acao { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* Atributos */

/* Grimório */
.bloco { margin-bottom: 26px; }
.bloco h3 { font-size: 16px; margin: 14px 0 8px; }
.bloco h3 small { font-family: var(--fonte); font-weight: 400; }
.equipadas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.equipada { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; background: var(--painel); border: 1px solid var(--borda); border-left: 3px solid var(--cor-tipo, var(--borda-forte)); border-radius: 8px; padding: 8px 10px; }
.equipada .ordem { font-family: var(--fonte-titulo); font-weight: 700; color: var(--texto-fraco); width: 18px; text-align: center; }
.equipada-info { display: flex; flex-direction: column; min-width: 0; }
.equipada-info .desc { color: var(--texto-fraco); font-size: 12px; }
.equipada-botoes { display: flex; gap: 4px; }
.equipada-botoes .btn-icone { width: 28px; height: 28px; font-size: 12px; }
.hab-icone { font-size: 24px; width: 32px; text-align: center; flex-shrink: 0; }
.tipo-magia { --cor-tipo: var(--magia); }
.tipo-habilidade { --cor-tipo: var(--sangue-claro); }
.tipo-passiva { --cor-tipo: var(--ouro); }
.tipo-aura { --cor-tipo: #4fd1c5; }

.grade-hab { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.hab-card { background: var(--painel); border: 1px solid var(--borda); border-top: 3px solid var(--cor-tipo); border-radius: var(--raio); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.hab-card.nova { box-shadow: 0 0 0 1px var(--ouro), 0 0 18px rgba(232, 194, 106, .25); }
.hab-topo { display: flex; gap: 8px; align-items: center; }
.hab-meta { font-size: 12px; color: var(--texto-suave); display: flex; gap: 6px; align-items: center; }
.hab-custo { font-size: 12px; color: var(--texto-suave); }
.hab-desc { margin: 0; padding-left: 16px; font-size: 13px; flex: 1; }
.hab-card .btn { align-self: flex-start; }

.lista-estudo { display: grid; gap: 6px; }
.estudo { display: flex; gap: 10px; align-items: center; background: var(--painel); border: 1px solid var(--borda); border-radius: 8px; padding: 8px 10px; }
.estudo.desconhecido { color: var(--texto-fraco); justify-content: center; }
.estudo-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.progresso { position: relative; height: 8px; background: var(--painel-2); border-radius: 99px; overflow: hidden; }
.progresso div { height: 100%; background: linear-gradient(90deg, var(--sangue-escuro), var(--sangue-claro)); border-radius: 99px; transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }
.progresso span { position: absolute; right: 6px; top: -4px; font-size: 10px; }
.estudo-info .progresso { height: 14px; }
.estudo-info .progresso span { top: 0; line-height: 14px; }

/* Forja (apagada por enquanto) */
.altar-vazio { text-align: center; padding: 30px 16px; }
.altar-vazio-icone { font-size: 56px; opacity: .35; filter: grayscale(.6); }
.forja-arma { display: grid; gap: 10px; }
.forja-arma.trancada { opacity: .6; }
.forja-topo { display: flex; align-items: center; gap: 12px; }
.forja-topo > div:nth-child(2) { flex: 1; min-width: 0; }
.forja-topo h3 { margin: 0 0 2px; }
.forja-topo small, .forja-meta { color: var(--texto-fraco); font-size: 12px; }
.forja-icone { font-size: 36px; }
.forja-bonus { text-align: right; }
.forja-bonus b { display: block; font-size: 22px; color: var(--sangue-claro); }
.forja-bonus small { color: var(--texto-fraco); font-size: 11px; }
.forja-progresso { height: 6px; background: var(--painel-2); border-radius: 99px; overflow: hidden; }
.forja-progresso div { height: 100%; background: linear-gradient(90deg, #6b0f1e, var(--sangue-claro)); }
.forja-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.arma-botoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Arte (img/arte) ─────────────────────────────────────────── */
/* As imagens ocupam o lugar do emoji: a altura acompanha o font-size de quem as contém. */
img.figura { display: inline-block; height: 1.25em; width: auto; max-width: 1.8em; object-fit: contain; vertical-align: middle; user-select: none; -webkit-user-drag: none; }
.ent-icone img.figura { display: block; height: 1.85em; max-width: 2.6em; object-position: 50% 100%; }
.ent.jogador .ent-icone img.figura { height: 1.95em; }
.ent.chefe .ent-icone img.figura { height: 1.75em; max-width: 2.3em; }
.retrato-icone img.figura, .intro-icone img.figura { display: block; height: 1.7em; max-width: 2.4em; margin: 0 auto; }
.marca-icone img.figura { height: 1.3em; }
.trofeu-icone img.figura { height: 1.9em; max-width: 2.6em; }
.absorvido img.figura { height: 1.8em; max-width: 2.2em; filter: drop-shadow(0 0 4px rgba(255, 220, 220, .25)); }
.masmorra-bestiario img.figura { height: 1.9em; max-width: 2.2em; filter: drop-shadow(0 0 4px rgba(255, 220, 220, .25)); }
.arma-atual img.figura, .slot-icone img.figura, .hab-icone img.figura, .arma-icone img.figura, .forja-icone img.figura { height: 1.35em; max-width: 1.5em; }
.trofeu.desconhecido img.figura { filter: brightness(0); }

/* ── Modais e avisos ────────────────────────────────────────── */
.modal-fundo { position: fixed; inset: 0; background: rgba(5, 2, 3, .78); display: grid; place-items: center; padding: 16px; z-index: 50; animation: surgir .2s; }
.modal { animation: surgir-painel .3s cubic-bezier(.2, .8, .3, 1.2); background: var(--painel); border: 1px solid var(--borda-forte); border-radius: 14px; padding: 22px; max-width: 460px; width: 100%; box-shadow: var(--sombra); }
.modal h2 { margin-bottom: 12px; }
.modal-botoes { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.modal.intro { text-align: center; max-width: 520px; }
.modal.intro p { color: var(--texto-suave); }
.intro-icone { font-size: 72px; filter: drop-shadow(0 0 22px rgba(196, 20, 47, .8)); animation: respirar 3s ease-in-out infinite; }

.avisos { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 60; max-width: calc(100vw - 32px); }
.aviso { background: var(--painel-2); border: 1px solid var(--borda-forte); border-left: 3px solid var(--sangue-claro); padding: 10px 14px; border-radius: 8px; box-shadow: var(--sombra); animation: entrar-direita .3s; transition: opacity .4s, transform .4s; }
.aviso.nova { border-left-color: var(--ouro); }
.aviso.erro { border-left-color: var(--perigo); }
.aviso.saindo { opacity: 0; transform: translateX(20px); }

/* ── Incursão ───────────────────────────────────────────────── */
.incursao { max-width: 1240px; margin: 0 auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 12px; min-height: 100vh; }
.barra-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 8px 12px; }
.topo-esq { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topo-masmorra { font-family: var(--fonte-titulo); font-weight: 700; }
.topo-sala { color: var(--texto-suave); }
.topo-sala.chefe { color: var(--ouro); font-weight: 600; }
.topo-sala.chefe::after { content: ' · CHEFE'; }
.topo-recursos { display: inline-flex; gap: 12px; padding: 3px 10px; border-radius: 999px; background: var(--painel-2); border: 1px solid var(--borda); font-weight: 700; white-space: nowrap; }
.topo-recursos .r-sangue { color: var(--sangue-claro); }
.topo-recursos .r-ouro { color: var(--ouro); }
.topo-recursos small { font-weight: 500; color: var(--texto-fraco); }
.controles { display: flex; gap: 4px; }

.arena {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: end;
  min-height: 430px; padding: 40px 24px 46px;
  border: 1px solid var(--borda); border-radius: 14px;
  background: linear-gradient(180deg, var(--ceu-1, #1a0c12), var(--ceu-2, #0f080b));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .7);
  overflow: hidden;
}
.arena::after { /* vinheta */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(0, 0, 0, .65) 100%);
}
.arena.sala-chefe::after { background: radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(70, 0, 12, .8) 100%); animation: pulso-chefe 3s ease-in-out infinite; }
.arena.nova-sala .lado.aliados { animation: surgir .5s ease-out; }
.arena.tremor { animation: tremor-arena .32s ease-out; }
.lado { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; align-items: flex-end; align-content: flex-end; }
.versus { position: relative; z-index: 2; align-self: center; font-size: 30px; color: rgba(255, 61, 90, .35); text-shadow: 0 0 18px rgba(196, 20, 47, .5); }

/* Cenário: céu (gradiente da arena), silhuetas, chão, névoa e partículas */
.cena { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, var(--ceu-1, #1a0c12), var(--ceu-2, #0f080b)); }
.cena-silhuetas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cena-silhuetas path { fill-rule: evenodd; }
.cena-silhuetas .longe { fill: var(--sil-longe, #1e0f16); }
.cena-silhuetas .perto { fill: var(--sil-perto, #0b0508); }
.cena-silhuetas .galhos { fill: none; stroke-linecap: round; }
.cena-silhuetas .galhos.longe { stroke: var(--sil-longe); stroke-width: 5; }
.cena-silhuetas .galhos.perto { stroke: var(--sil-perto); stroke-width: 9; }
.cena-silhuetas .astro { fill: var(--astro, #f3e6c0); filter: drop-shadow(0 0 40px var(--astro, #f3e6c0)); opacity: .9; }
.cena-silhuetas .vitral { fill: var(--vitral, #ffe9a8); opacity: .5; filter: drop-shadow(0 0 22px var(--vitral, #ffe9a8)); animation: cintilar 5s ease-in-out infinite; }
.cena-abismo .longe { stroke: rgba(255, 70, 90, .3); stroke-width: 1.5; }
.cena-silhuetas .cristal { stroke: var(--brilho, #6fd3ff); stroke-width: 1.5; stroke-opacity: .55; }
.cena-chao { position: absolute; left: -10%; right: -10%; bottom: 0; height: 20%; background: radial-gradient(ellipse at 50% 0%, var(--chao-luz, rgba(196, 20, 47, .18)), transparent 70%), linear-gradient(180deg, var(--chao, #120a0d), #050203); border-top: 1px solid rgba(255, 255, 255, .05); }
.cena-nevoa { position: absolute; left: -50%; right: -50%; bottom: 6%; height: 34%; opacity: .55; background: radial-gradient(ellipse 18% 40% at 20% 60%, var(--nevoa, rgba(200, 180, 200, .16)), transparent), radial-gradient(ellipse 22% 45% at 55% 50%, var(--nevoa, rgba(200, 180, 200, .16)), transparent), radial-gradient(ellipse 16% 35% at 85% 65%, var(--nevoa, rgba(200, 180, 200, .16)), transparent); animation: nevoa 26s linear infinite alternate; }
.cena-particulas { position: absolute; inset: 0; }
.particula { position: absolute; display: block; width: calc(5px * var(--tam)); height: calc(5px * var(--tam)); border-radius: 50%; background: var(--particula, #ffcf8a); box-shadow: 0 0 8px var(--particula, #ffcf8a); opacity: 0; animation: var(--anim, vagalume) var(--dur) ease-in-out var(--atraso) infinite; }
.particula.vagalume { --anim: vagalume; }
.particula.poeira { --anim: poeira; box-shadow: none; }
.particula.bolha { --anim: bolha; background: transparent; border: 1px solid var(--particula); box-shadow: none; width: calc(8px * var(--tam)); height: calc(8px * var(--tam)); }
.particula.luz { --anim: poeira; width: calc(3px * var(--tam)); height: calc(3px * var(--tam)); }
.particula.brilho { --anim: brilho; border-radius: 1px; }
.particula.brasa { --anim: brasa; width: calc(3px * var(--tam)); height: calc(3px * var(--tam)); }

.cena-caca       { --ceu-1: #0c1626; --ceu-2: #0a0f12; --sil-longe: #142530; --sil-perto: #060b0d; --chao: #0b120e; --chao-luz: rgba(120, 200, 140, .1); --nevoa: rgba(170, 200, 210, .14); --particula: #d8ff8a; }
.cena-floresta   { --ceu-1: #1a1838; --ceu-2: #0d0c1a; --sil-longe: #26234a; --sil-perto: #07060f; --astro: #f6f1d5; --chao: #0c0b16; --chao-luz: rgba(220, 220, 255, .12); --nevoa: rgba(190, 190, 255, .16); --particula: #c9d8ff; }
.cena-catacumbas { --ceu-1: #1a1210; --ceu-2: #0b0807; --sil-longe: #2a1f19; --sil-perto: #0d0907; --chao: #120d0a; --chao-luz: rgba(255, 150, 60, .16); --nevoa: rgba(180, 160, 140, .1); --particula: #d9c6a8; }
.cena-mosteiro   { --ceu-1: #0b2a2c; --ceu-2: #061314; --sil-longe: #123a3c; --sil-perto: #041011; --chao: #071617; --chao-luz: rgba(100, 230, 220, .14); --nevoa: rgba(140, 230, 220, .14); --particula: #9ff3ea; }
.cena-catedral   { --ceu-1: #2a2414; --ceu-2: #120f08; --sil-longe: #1c170c; --sil-perto: #0b0904; --vitral: #ffe7a1; --chao: #15110a; --chao-luz: rgba(255, 226, 122, .2); --nevoa: rgba(255, 240, 200, .12); --particula: #fff2c2; }
.cena-nucleo     { --ceu-1: #10163a; --ceu-2: #070a1c; --sil-longe: rgba(80, 120, 255, .25); --sil-perto: rgba(70, 200, 255, .3); --brilho: #8fe3ff; --chao: #080c20; --chao-luz: rgba(110, 211, 255, .22); --nevoa: rgba(150, 120, 255, .14); --particula: #bfefff; }
.cena-abismo     { --ceu-1: #2a0509; --ceu-2: #080102; --sil-longe: #33080f; --chao: #0c0203; --chao-luz: rgba(255, 40, 70, .25); --nevoa: rgba(255, 60, 80, .12); --particula: #ff6a4d; }
.cena-catacumbas .cena-chao::before, .cena-catacumbas .cena-chao::after { /* tochas */
  content: ''; position: absolute; bottom: 100%; width: 240px; height: 240px; margin-bottom: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 60, .28), transparent 60%); animation: tocha 2.2s ease-in-out infinite alternate;
}
.cena-catacumbas .cena-chao::before { left: 18%; }
.cena-catacumbas .cena-chao::after { right: 18%; animation-delay: -1.1s; }
.cena-mosteiro::before, .cena-catedral::before { /* raios de luz vindos de cima */
  content: ''; position: absolute; inset: -20% 0 0; opacity: .6;
  background: repeating-linear-gradient(100deg, transparent 0 60px, var(--raios, rgba(140, 240, 230, .07)) 60px 110px, transparent 110px 190px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%);
  animation: raios 14s ease-in-out infinite alternate;
}
.cena-catedral { --raios: rgba(255, 230, 160, .09); }

/* Criaturas: figura sobre a sombra no chão e a placa com nome e barras */
.ent { position: relative; width: 150px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity .6s; }
.inimigos .ent { animation: emergir .7s cubic-bezier(.2, .8, .3, 1) var(--entrada, 0s) backwards; }
.ent-figura { position: relative; width: 100%; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.ent-sombra { position: absolute; bottom: -4px; left: 50%; width: 70%; height: 16px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .75), transparent 70%); }
.ent-corpo { position: relative; transform-origin: 50% 100%; }
.ent-icone { font-size: 62px; line-height: 1; transform-origin: 50% 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); animation: respiro 3.2s ease-in-out var(--respiro, 0s) infinite; }
.ent.jogador { width: 170px; }
.ent.jogador .ent-figura { height: 150px; }
.ent.jogador .ent-icone { font-size: 76px; filter: drop-shadow(0 0 16px rgba(196, 20, 47, .55)) drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); }
.ent.jogador .ent-sombra { background: radial-gradient(ellipse, rgba(196, 20, 47, .45), rgba(0, 0, 0, .6) 40%, transparent 70%); }
.ent.chefe { width: 190px; }
.ent.chefe .ent-figura { height: 170px; }
.ent.chefe .ent-icone { font-size: 96px; filter: drop-shadow(0 0 20px rgba(232, 194, 106, .45)) drop-shadow(0 8px 10px rgba(0, 0, 0, .7)); animation-duration: 4s; }
.ent.chefe .ent-sombra { width: 90%; height: 22px; }
.ent.invocado .ent-icone { opacity: .85; }
.ent-placa { width: 100%; margin-top: 8px; padding: 6px 8px 7px; background: rgba(12, 6, 9, .72); border: 1px solid var(--borda); border-radius: 10px; backdrop-filter: blur(3px); }
.ent.jogador .ent-placa { border-color: rgba(196, 20, 47, .7); box-shadow: 0 0 18px rgba(196, 20, 47, .25); }
.ent.chefe .ent-placa { border-color: rgba(232, 194, 106, .7); box-shadow: 0 0 18px rgba(232, 194, 106, .2); }
.ent.invocado .ent-placa { border-style: dashed; }
.ent-nome { font-size: 13px; font-weight: 600; margin: 0 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent.chefe .ent-nome { font-family: var(--fonte-titulo); color: var(--ouro); }
.barra-acao { height: 3px; margin-top: 4px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; }
.barra-acao div { height: 100%; width: 0; background: linear-gradient(90deg, rgba(232, 194, 106, .3), var(--ouro)); border-radius: 99px; }
.ent.jogador .barra-acao div { background: linear-gradient(90deg, rgba(255, 61, 90, .3), var(--sangue-claro)); }

.ent.agindo .ent-figura { animation: investir-dir .38s cubic-bezier(.3, 0, .2, 1); }
.inimigos .ent.agindo .ent-figura { animation-name: investir-esq; }
.ent.atingido .ent-corpo { animation: atingido .34s ease-out; }
.ent.curando .ent-corpo { animation: curando .6s ease-out; }
.ent.ferido .ent-sombra { background: radial-gradient(ellipse, rgba(196, 20, 47, .55), transparent 70%); animation: pulso-ferido 1.2s ease-in-out infinite; }
.ent.morto { opacity: .35; }
.ent.morto .ent-figura { animation: tombar .9s cubic-bezier(.5, 0, .7, .4) forwards; }
.ent.morto .ent-icone { animation: none; filter: grayscale(1) brightness(.6); }
.ent.morto .ent-placa { filter: grayscale(1); }
.ent.absorvendo .ent-icone { animation: absorver 1.2s ease-out; }

/* Risco do golpe */
.ent-corte { position: absolute; left: 50%; top: 45%; width: 110%; height: 5px; border-radius: 99px; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) rotate(var(--giro, -20deg)) scaleX(0); background: linear-gradient(90deg, transparent, #fff 45%, var(--cor, #fff) 60%, transparent); box-shadow: 0 0 12px var(--cor, #fff); }
.ent-corte.golpe { animation: corte .28s ease-out; }

.barra { position: relative; height: 12px; background: var(--vida-fundo); border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.barra span { position: absolute; inset: 0; font-size: 10px; line-height: 12px; font-weight: 600; text-shadow: 0 1px 2px #000; }
.barra .enche { height: 100%; background: linear-gradient(180deg, #ff5a72, var(--vida) 55%, #a01830); transition: width .35s ease-out; }
.barra .escudo { position: absolute; top: 0; left: 0; height: 100%; background: rgba(127, 182, 255, .55); transition: width .3s; }
.ent-status { position: absolute; top: 0; right: 4px; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; font-size: 14px; z-index: 2; }
.ent-status:empty { display: none; }
.ent-status > span { filter: drop-shadow(0 1px 2px #000); }
.ent-status sub { font-size: 9px; color: var(--texto-suave); }
.ent-status .buff { color: var(--cura); }
.ent-status .debuff { color: var(--perigo); }
.aura-ativa { filter: drop-shadow(0 0 5px rgba(255, 61, 90, .9)); animation: pulso-icone 1.6s ease-in-out infinite; }

.ent-acao {
  position: absolute; left: 50%; top: -24px; transform: translate(-50%, 0);
  font-size: 12px; font-weight: 600; white-space: nowrap; padding: 2px 10px; border-radius: 99px;
  background: #0d0709; border: 1px solid var(--cor, var(--borda-forte)); color: var(--cor, var(--texto));
  opacity: 0; pointer-events: none; z-index: 3;
}
.ent-acao.mostrar { animation: rotulo 1.3s ease-out; }

.flutuantes { position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; z-index: 4; }
.flutuante { position: absolute; top: 20%; transform: translateX(-50%); font-weight: 800; font-size: 20px; -webkit-text-stroke: 3px rgba(0, 0, 0, .85); paint-order: stroke fill; text-shadow: 0 3px 6px rgba(0, 0, 0, .8); animation: subir 1.3s cubic-bezier(.2, .8, .3, 1) forwards; white-space: nowrap; }
.flutuante.dano { color: var(--cor, #fff); }
.flutuante.dano.critico { font-size: 30px; color: #ffe27a; animation-name: subir-critico; }
.flutuante.dano.critico::after { content: '!'; }
.flutuante.dano.dot { font-size: 15px; opacity: .9; }
.flutuante.cura { color: var(--cura); }
.flutuante.escudo { color: var(--escudo); font-size: 16px; }
.flutuante.texto { font-size: 12px; color: var(--texto-suave); top: 55%; -webkit-text-stroke: 2px rgba(0, 0, 0, .8); }
.flutuante.texto.buff { color: var(--cura); }
.flutuante.texto.debuff { color: #ff9a9a; }
.flutuante.texto.gasto { color: var(--sangue-claro); font-weight: 700; top: 72%; }
.flutuante.texto.ganho { color: var(--ouro); font-size: 15px; font-weight: 700; white-space: nowrap; top: 0; }

.gota {
  position: absolute; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: radial-gradient(circle at 30% 30%, #ff6b80, var(--sangue)); box-shadow: 0 0 10px var(--sangue);
  z-index: 5; pointer-events: none; opacity: 0;
  animation: gota 1s cubic-bezier(.5, 0, .3, 1) forwards;
}

.anuncio {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--fonte-titulo); font-size: 34px; font-weight: 700; color: var(--ouro);
  text-shadow: 0 0 20px rgba(232, 194, 106, .6), 0 2px 6px #000; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 6;
}
.anuncio.mostrar { animation: anuncio 1.8s ease-out; }

.sobreposicao { position: absolute; inset: 0; background: rgba(8, 3, 5, .86); display: grid; place-items: center; padding: 16px; z-index: 10; overflow-y: auto; animation: surgir .3s; }
.sobreposicao[hidden] { display: none; }
.painel-resultado { animation: surgir-painel .45s cubic-bezier(.2, .8, .3, 1.2); width: 100%; max-width: 620px; background: var(--painel); border: 1px solid var(--borda-forte); border-radius: 14px; padding: 20px; box-shadow: var(--sombra); }
.painel-resultado h2 { font-size: 20px; margin-bottom: 10px; }
.painel-resultado.derrota { border-color: #4a4a4a; }
.painel-resultado p { margin: 6px 0; color: var(--texto-suave); }
.bonus b { color: var(--ouro); }
.absorvidos { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.absorvido { display: flex; flex-direction: column; align-items: center; font-size: 28px; line-height: 1; }
.absorvido small { font-size: 11px; color: var(--ouro); margin-top: 3px; }
.total-ess { margin-left: auto; color: var(--ouro); font-weight: 700; font-size: 18px; }
.estudos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.estudo-res { display: grid; grid-template-columns: 30px 150px 1fr 110px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.estudo-res .hab-icone { font-size: 20px; width: 30px; }
.estudo-res .estudo-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estudo-res .estudo-rotulo { text-align: right; color: var(--texto-suave); }
.estudo-res.aprendeu { background: rgba(232, 194, 106, .1); animation: brilhar 1.6s ease-out; }
.destaque { color: var(--ouro); }
.estado-vampiro { font-size: 14px; }
.resumo { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--borda); display: grid; gap: 6px; font-size: 14px; }
.resumo .tag { display: inline-block; margin: 2px; }
.painel-botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.painel-inferior { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.hab-barra, .log { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 10px 12px; }
.hab-barra h4 { margin: 0 0 8px; font-size: 12px; color: var(--texto-fraco); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hab-barra h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.hab-barra .slots + h4, .hab-barra .area-arma + h4 { margin-top: 12px; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; }
.slot { position: relative; width: 56px; height: 56px; display: grid; place-items: center; background: var(--painel-2); border: 1px solid var(--borda-forte); border-radius: 10px; font: inherit; color: var(--texto); cursor: pointer; padding: 0; transition: transform .1s, box-shadow .2s, border-color .2s; }
.slot:hover:not(:disabled) { border-color: var(--sangue-claro); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(196, 20, 47, .3); }
.slot:active:not(:disabled) { transform: translateY(1px); }
.slot:disabled { cursor: not-allowed; }
.slot kbd { position: absolute; left: 3px; top: 2px; font: 600 9px var(--fonte); color: var(--texto-fraco); }
.slot.aura { border-radius: 50%; }
.slot.aura.ligada { border-color: var(--ouro); background: radial-gradient(circle, rgba(232, 194, 106, .25), var(--painel-2) 70%); box-shadow: 0 0 14px rgba(232, 194, 106, .45); animation: pulso-aura 2s ease-in-out infinite; }
.slot.aura:not(.ligada) .slot-icone { opacity: .55; filter: grayscale(.6); }
.slot.magia.continua.ligada { border-color: var(--sangue-claro); background: radial-gradient(circle, rgba(196, 20, 47, .3), var(--painel-2) 70%); box-shadow: 0 0 14px rgba(196, 20, 47, .5); animation: pulso-continua 1.6s ease-in-out infinite; }
.slot.magia.continua:not(.ligada) .slot-icone { opacity: .55; filter: grayscale(.6); }
.slot.magia.continua.ligada.esperando { animation: none; box-shadow: none; border-style: dashed; }
.slot.magia.continua.ligada.esperando .slot-icone { opacity: .6; }
@keyframes pulso-continua { 50% { box-shadow: 0 0 22px rgba(255, 61, 90, .7); } }
.slot.aura .slot-custo { right: 50%; transform: translateX(50%); bottom: -1px; }
kbd { font-family: var(--fonte); font-size: 11px; font-weight: 700; padding: 0 5px; border: 1px solid var(--borda-forte); border-radius: 4px; color: var(--ouro); background: var(--painel-2); }
.slot kbd { border: none; padding: 0; background: none; }
.slot-icone { font-size: 26px; }
.slot.recarga .slot-icone, .slot.sem-sangue .slot-icone { opacity: .3; filter: grayscale(.8); }
.slot-rec { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 0 4px #000; }
.slot-custo { position: absolute; right: 2px; bottom: 0; font-size: 10px; color: var(--sangue-claro); font-weight: 700; }
.slot.sem-sangue { border-color: var(--sangue-escuro); }
.log { height: 150px; overflow-y: auto; font-size: 13px; }
.log p { margin: 0 0 3px; color: var(--texto-suave); }
.log p.aliado { color: #ffc2cb; }
.log p.inimigo { color: #c9b8a8; }
.log p.morte { color: var(--ouro); }
.log p.sistema { color: var(--texto-fraco); font-style: italic; }

/* ── Animações ──────────────────────────────────────────────── */
@keyframes voar { 50% { transform: translate(40px, -8px); } }
@keyframes pulso-aura { 50% { box-shadow: 0 0 22px rgba(232, 194, 106, .7); } }
@keyframes respirar { 50% { transform: scale(1.04); filter: drop-shadow(0 0 26px rgba(196, 20, 47, .8)); } }
@keyframes surgir { from { opacity: 0; } }
@keyframes entrar-direita { from { opacity: 0; transform: translateX(30px); } }
@keyframes tremer { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes subir { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
@keyframes rotulo { 0% { opacity: 0; transform: translate(-50%, 6px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes gota { 0% { opacity: 0; transform: translate(0, 0) rotate(-45deg) scale(.6); } 15% { opacity: 1; } 100% { opacity: .2; transform: translate(var(--dx), var(--dy)) rotate(-45deg) scale(1); } }
@keyframes absorver { 50% { transform: scale(1.25); filter: drop-shadow(0 0 22px var(--sangue-claro)); } }
@keyframes anuncio { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } 20%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; } }
@keyframes brilhar { 0% { box-shadow: 0 0 0 0 rgba(232, 194, 106, .6); } 100% { box-shadow: 0 0 0 12px rgba(232, 194, 106, 0); } }

@keyframes investir-dir { 35% { transform: translateX(34px) scale(1.06) rotate(4deg); } 55% { transform: translateX(30px) scale(1.04); } }
@keyframes investir-esq { 35% { transform: translateX(-34px) scale(1.06) rotate(-4deg); } 55% { transform: translateX(-30px) scale(1.04); } }
@keyframes respiro { 50% { transform: translateY(-4px) scaleY(1.03); } }
@keyframes emergir { from { opacity: 0; transform: translateX(40px) scale(.9); filter: brightness(0); } 60% { filter: brightness(.6); } }
@keyframes atingido {
  0% { transform: translateX(0); filter: brightness(3) saturate(0) drop-shadow(0 0 10px #fff); }
  25% { transform: translateX(-7px) rotate(-3deg); filter: brightness(1.6) sepia(1) hue-rotate(-50deg) saturate(4); }
  55% { transform: translateX(5px) rotate(2deg); }
  80% { transform: translateX(-2px); }
}
@keyframes curando { 40% { filter: drop-shadow(0 0 14px var(--cura)) brightness(1.3); transform: scale(1.05); } }
@keyframes tombar { 30% { transform: translateY(-6px) rotate(-6deg); } 100% { transform: translateY(14px) rotate(78deg) scale(.85); opacity: .8; } }
@keyframes corte { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--giro)) scaleX(0); } 30% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--giro)) scaleX(1); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--giro)) scaleX(1.1) scaleY(.3); } }
@keyframes tremor-arena { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 0); } }
@keyframes pulso-chefe { 50% { opacity: .75; } }
@keyframes pulso-ferido { 50% { opacity: .4; } }
@keyframes pulso-icone { 50% { transform: scale(1.15); } }
@keyframes cintilar { 50% { opacity: .75; } }
@keyframes nevoa { to { transform: translateX(18%); } }
@keyframes tocha { to { opacity: .6; transform: scale(.92); } }
@keyframes raios { to { transform: translateX(-60px); opacity: .35; } }
@keyframes vagalume { 0%, 100% { opacity: 0; transform: translate(0, 0); } 30% { opacity: .9; } 50% { transform: translate(18px, -24px); } 70% { opacity: .7; } 85% { opacity: 0; transform: translate(-10px, -40px); } }
@keyframes poeira { 0% { opacity: 0; transform: translate(0, -20px); } 30% { opacity: .5; } 100% { opacity: 0; transform: translate(30px, 60px); } }
@keyframes bolha { 0% { opacity: 0; transform: translate(0, 40px); } 20% { opacity: .7; } 100% { opacity: 0; transform: translate(10px, -140px); } }
@keyframes brilho { 0%, 100% { opacity: 0; transform: rotate(45deg) scale(.4); } 50% { opacity: 1; transform: rotate(45deg) scale(1.2); } }
@keyframes brasa { 0% { opacity: 0; transform: translate(0, 60px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-30px, -160px); } }
@keyframes subir-critico { 0% { opacity: 0; transform: translate(-50%, 4px) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -4px) scale(1.4) rotate(-6deg); } 30% { transform: translate(-50%, -8px) scale(1.1) rotate(3deg); } 100% { opacity: 0; transform: translate(-50%, -54px) scale(1); } }

@keyframes tremular { 0% { opacity: .55; } 30% { opacity: .9; } 55% { opacity: .65; } 80% { opacity: 1; } 100% { opacity: .7; } }
@keyframes luar { 50% { filter: drop-shadow(0 0 34px rgba(255, 235, 180, .8)); } }
@keyframes halo { 50% { transform: translateX(-50%) scale(1.12); opacity: .7; } }
@keyframes entrar-comodo { from { opacity: 0; transform: translateY(8px); } }
@keyframes surgir-painel { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes investir-baixo { 35% { transform: translateY(18px) scale(1.06); } }
@keyframes investir-cima { 35% { transform: translateY(-18px) scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Telas estreitas ────────────────────────────────────────── */
@media (max-width: 860px) {
  .castelo-corpo { grid-template-columns: 1fr; }
  .painel-vampiro { order: 2; }
  .painel-vampiro { position: static; }
  .painel-inferior { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .marca h1 { font-size: 20px; }
  .recurso span { display: none; }
  .recurso { padding: 4px 10px; }
  .mapa-castelo { padding: 18px 4px 0; }
  .comodo-rotulo { padding: 2px 4px; border-radius: 5px; }
  .comodo-rotulo small, .comodo-alerta, .comodo-rotulo .nome-longo { display: none; }
  .comodo-rotulo .nome-curto { display: block; }
  .comodo-mobilia { letter-spacing: 0; }
  .treino-fontes li { grid-template-columns: 28px 1fr 50px; }
  .treino-barra { grid-column: 2 / -1; grid-row: 2; }
  .masmorra { grid-template-columns: 1fr; text-align: left; }
  .masmorra-icone { width: 100%; height: 84px; }
  .masmorra-acao { flex-direction: row; justify-content: space-between; }
  .arena { grid-template-columns: 1fr; padding: 34px 8px 24px; gap: 26px; min-height: 0; }
  .versus { display: none; }
  .lado { gap: 22px 10px; }
  .ent, .ent.jogador, .ent.chefe { width: calc(50% - 6px); max-width: 160px; }
  .ent-figura, .flutuantes { height: 86px; }
  .ent-icone { font-size: 46px; }
  .ent.jogador .ent-figura { height: 114px; }
  .ent.jogador .ent-icone { font-size: 58px; }
  .ent.chefe .ent-figura { height: 124px; }
  .ent.chefe .ent-icone { font-size: 70px; }
  .ent.agindo .ent-figura { animation-name: investir-baixo; }
  .inimigos .ent.agindo .ent-figura { animation-name: investir-cima; }
  .estudo-res { grid-template-columns: 26px 1fr 80px; }
  .estudo-res .progresso { grid-column: 2 / -1; grid-row: 2; }
  .anuncio { font-size: 22px; }
  .equipada { grid-template-columns: auto auto 1fr; }
  .equipada-botoes { grid-column: 1 / -1; justify-content: flex-end; }
}
