/* Ficha de Personagem — componentes. Valores vêm de tokens.css (var(--…)). */
.ficha-base { font-family: var(--font-body); color: var(--ink); background: var(--bg); font-size: 15px; box-sizing: border-box; }
.ficha-base *, .ficha-base *::before, .ficha-base *::after { box-sizing: border-box; }
.ficha-base h1, .ficha-base h2, .ficha-base h3 { font-family: var(--font-display); margin: 0; color: var(--gold-soft); }
.ficha-base input, .ficha-base textarea, .ficha-base select {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--bg-alt); border: 1px solid var(--panel-border); border-radius: var(--radius-sm); padding: 6px 8px;
}
.ficha-base button { font-family: var(--font-body); }
.ficha-base button:focus-visible, .ficha-base select:focus-visible, .ficha-base input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.ficha-base label:focus-within { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.painel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); }
.rotulo-mini { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); }
.detalhe { font-size: 12px; color: var(--ink-dim); }
.campo { display: flex; flex-direction: column; gap: 3px; }

.btn-mini { min-height: 26px; padding: 2px 10px; border: 1px solid var(--gold); border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--gold-soft); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-mini:hover { background: var(--gold); color: var(--on-gold); }
.btn-sec { min-height: 32px; padding: 4px 14px; border: 1px solid var(--panel-border); border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-pri { min-height: 32px; padding: 4px 16px; border: 1px solid var(--gold); border-radius: var(--radius-sm); background: var(--gold); color: var(--on-gold); font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-perigo { min-height: 32px; padding: 4px 14px; border: 1px solid var(--red); border-radius: var(--radius-sm); background: var(--red); color: var(--on-danger); font-size: 14px; font-weight: 600; cursor: pointer; }
.nome-link { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--panel-border); text-underline-offset: 3px; }
.nome-link:hover { color: var(--gold-soft); text-decoration-color: var(--gold-soft); }

.icone-btn, .estrela { width: 30px; height: 30px; padding: 0; border: 1px solid var(--panel-border); border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--ink-dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.icone-btn[aria-pressed="true"], .estrela[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); }

.pilula { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--panel-border); background: var(--bg-alt); font-size: 13px; color: var(--ink); }
.pilula-btn { cursor: pointer; font-family: inherit; }
.pilula-btn:hover { border-color: var(--gold-soft); }

.sim { display: inline-block; width: 12px; height: 12px; flex: none; }
.sim-acao { background: var(--sym-acao); border-radius: 50%; }
.sim-bonus { background: var(--sym-bonus); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sim-reacao { background: var(--sym-reacao); border-radius: 2px; }
.acao-tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

.ponto { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--gold); flex: none; }
.ponto-prof { background: var(--gold); }
.ponto-exp { background: var(--gold); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--gold); }

.aviso { background: var(--panel); color: var(--ink); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: 10px 14px; box-shadow: var(--shadow-aviso); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.aviso-ok { border-color: var(--green); }
.modal { background: var(--panel); color: var(--ink); border: 1px solid var(--gold); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); padding: 20px 22px; }

.abas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--panel-border); padding-bottom: 2px; }
.aba { border: none; border-radius: 8px 8px 0 0; padding: 9px 16px; font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; color: var(--ink-dim); }
.aba[aria-selected="true"] { background: var(--gold); color: var(--on-gold); font-weight: 700; }

/* ---- adicionados a partir da ficha (PlayerSheet) ---- */
.btn-pri:disabled { opacity: .55; cursor: not-allowed; }

.scrim { position: fixed; inset: 0; z-index: 56; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; }

.rolar-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--panel-border); border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--gold-soft); cursor: pointer; flex: none; opacity: 0; transition: opacity .12s; }
.rolavel:hover .rolar-ico, .rolar-ico:focus-visible { opacity: 1; }
.rolar-ico:hover { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
@media (hover: none) { .rolar-ico { opacity: .75; } }

.info-tag { display: inline-flex; align-items: center; padding: 3px 10px; border: none; border-left: 3px solid var(--panel-border); border-radius: 0; background: transparent; font-size: 13px; color: var(--ink-dim); cursor: default; }
.pilula-sel { border: 1px solid var(--gold); }
.pilula-sel[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.pilula-sel:disabled { opacity: .35; cursor: not-allowed; }

.cartao-atrib { position: relative; background: var(--bg-alt); border: 1px solid var(--panel-border); border-radius: var(--radius-md); padding: 6px 4px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }

.barra { height: var(--size-barra); border-radius: var(--radius-pill); background: var(--bg-alt); overflow: hidden; border: 1px solid var(--panel-border); }
.barra > span { display: block; height: 100%; background: var(--purple); }

.tabela { border-collapse: collapse; width: 100%; }
.tabela th { padding: 6px 12px; font-size: 12px; font-weight: 400; color: var(--ink-dim); text-align: left; }
.tabela td { padding: 8px 12px; vertical-align: top; }
.tabela tbody tr { border-top: 1px solid var(--panel-border); }

/* Modos da ficha: data-modo="visualizacao" | "jogador" | "edicao" no elemento .ficha-base.
   .mut-jg = precisa de Jogador ou Edição; .mut-ed = só Edição. Fora do modo: 55% e cursor proibido. */
.ficha-base[data-modo="visualizacao"] .mut-jg, .ficha-base[data-modo="visualizacao"] .mut-ed, .ficha-base[data-modo="jogador"] .mut-ed { opacity: .55; cursor: not-allowed !important; }
.ficha-base[data-modo="visualizacao"] .rolar-ico { display: none; }
