/* Telas de quem opera (jogador, mestre, painel, fichas). Mesma paleta da moldura. */
@font-face { font-family: 'Fell SC'; src: url('../fontes/IMFeENsc28P.ttf'); font-display: swap; }
@font-face { font-family: 'Crimson'; src: url('../fontes/CrimsonPro-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Crimson'; src: url('../fontes/CrimsonPro-SemiBold.ttf'); font-weight: 600; font-display: swap; }

:root {
  --fundo: #120d1c; --painel: #1c1530; --painel2: #251c3e; --borda: #3a2f5c;
  --texto: #efe6d2; --fraco: #a99fc0; --sangue: #b3202b; --sangue2: #e2323c; --ouro: #e8b84a; --ardosia: #4d5c80;
  --ok: #4f9d69;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fundo); }
body { margin: 0; min-height: 100vh; color: var(--texto); font: 18px/1.35 'Crimson', Georgia, serif;
  background: radial-gradient(120% 60% at 50% 0%, #2a1f4a, var(--fundo) 70%) fixed; }
h1, h2, h3 { font-family: 'Fell SC', serif; font-weight: 400; margin: 0; }
h1 { font-size: 30px; line-height: 1; }
h2 { font-size: 17px; letter-spacing: 1.5px; color: var(--ouro); margin: 0 0 8px; }
small, .fraco { color: var(--fraco); }
[hidden] { display: none !important; }

.caixa { background: linear-gradient(170deg, var(--painel2), var(--painel)); border: 1px solid var(--borda);
  border-radius: 12px; padding: 14px; }
.linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cresce { flex: 1; min-width: 0; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--borda); background: #2d2350; border-radius: 10px; padding: 9px 14px;
  touch-action: manipulation; transition: transform .06s, background .15s, border-color .15s; }
button:hover { border-color: #6a5aa0; }
button:active { transform: scale(.96); }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.forte { background: linear-gradient(180deg, var(--sangue2), var(--sangue)); border-color: #ff7a82; color: #fff; font-weight: 600; }
button.ouro { background: linear-gradient(180deg, #f3cf6e, #c9962a); border-color: #fff0b8; color: #2b1a05; font-weight: 600; }
button.leve { background: transparent; }
button.ativo { border-color: var(--ouro); box-shadow: 0 0 0 1px var(--ouro) inset; }
input[type=text], input[type=number], input:not([type]), select { background: #100b1b; border: 1px solid var(--borda);
  border-radius: 8px; padding: 7px 9px; min-width: 0; }
input[type=number] { width: 62px; text-align: center; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--ouro); outline-offset: 1px; }

/* trilha de vida (igual à do overlay, em fundo escuro) */
.trilha { display: flex; gap: 4px; height: 16px; flex: 1; min-width: 0; }
.trilha .casa { flex: 1; max-width: 30px; border-radius: 3px; border: 1.5px solid #b3313f; background: #b3313f22; }
.trilha .casa.cheia { background: linear-gradient(180deg, var(--sangue2), var(--sangue)); }
.trilha .casa.sv { border-color: #c9962a; background: linear-gradient(180deg, #ffd97a, #d99a1c); }
.trilha.barra { border: 1.5px solid #b3313f; border-radius: 4px; overflow: hidden; gap: 0; }
.trilha.barra b { display: block; height: 100%; background: linear-gradient(180deg, var(--sangue2), var(--sangue)); }
.trilha.barra b.sv { background: linear-gradient(180deg, #ffd97a, #d99a1c); }

#aviso { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 20px); max-width: 92vw; padding: 10px 16px;
  background: #1c1420; border: 1px solid var(--ouro); border-radius: 10px; color: #ffe9b0; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; text-align: center; }
#aviso.mostra { opacity: 1; transform: translate(-50%, 0); }
#aviso.erro { border-color: var(--sangue2); color: #ffc9cd; }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--sangue2); flex: none; }
.ponto.ligado { background: var(--ok); }
