:root {
  color: #ece9e1;
  background: #111315;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  --ink: #111315;
  --coal: #181b1d;
  --iron: #252a2d;
  --line: #3a4144;
  --fog: #b9c6c9;
  --paper: #ece9e1;
  --blood: #9e3036;
  --blood-bright: #c94b52;
  --gold: #c9a65b;
  --cyan: #79aeb7;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
}

button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 8, 0.78);
}
.intro-panel {
  position: relative;
  width: min(100%, 560px);
  padding: 34px 36px 32px;
  border: 1px solid #655c43;
  border-radius: 6px;
  background: #171a1c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.intro-panel h2 {
  margin: 0 0 16px;
  color: var(--paper);
  font-family: Copperplate, "Palatino Linotype", Georgia, serif;
  font-size: 34px;
}
.intro-panel p:not(.domain) {
  color: #c7d0d1;
  line-height: 1.6;
  margin: 12px 0;
}
.intro-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid #4a5255;
  border-radius: 4px;
  color: #d8dddc;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}
.intro-close:hover { border-color: var(--gold); color: var(--gold); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 520px);
  background: #101214;
}

.brand-field {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 64px;
  background-color: #1a1d1e;
  /* Relativa a ESTA folha (static/app.css): sob o funnel, cada jogo busca a
     SUA arte em /jogos/<slug>/brand-image — absoluta cairia na raiz (Barovia).
     O ?v= quebra o cache dos navegadores que guardaram a arte de antes dos
     cabecalhos no-cache (06/08/2026): sem ele, jogador antigo via a imagem
     velha ate um Ctrl+F5 que ninguem faz. Trocou a arte? Suba o numero. */
  background-image: url("../brand-image?v=20260806");
  background-position: center;
  background-size: cover;
  border-right: 1px solid #34393b;
  position: relative;
}

.brand-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 10, 0.42);
}

.brand-copy { position: relative; z-index: 1; max-width: 660px; }
/* A marca da rede, acima da identidade do jogo: discreta, presente em TODOS
   os logins (a matriz e as oito filiais servem este mesmo static). */
.rede {
  color: #9aa3a7;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.domain { color: var(--gold); margin: 0 0 8px; font-weight: 700; text-transform: uppercase; }
.brand-copy h1 {
  font-family: var(--fonte-titulo, Copperplate, "Palatino Linotype", Georgia, "Times New Roman", serif);
  font-size: 64px;
  line-height: 1;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 2px 18px #000;
}
.brand-line { color: #e4e7e4; font-size: 20px; margin: 14px 0 0; }

.auth-panel {
  min-height: 100vh;
  padding: 56px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #171a1c;
}

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #aeb7b9;
  padding: 13px 8px;
  font-weight: 700;
}
.tab.active { color: var(--paper); border-bottom-color: var(--blood-bright); }
.tab:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.auth-form { display: grid; gap: 10px; }
.auth-form h2 { margin: 0; font-family: Georgia, serif; font-size: 24px; }
.form-note { margin: 0 0 8px; color: #aeb7b9; line-height: 1.5; }
.auth-form label { color: #c9d0d1; font-size: 14px; font-weight: 650; margin-top: 7px; }
.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #4a5255;
  border-radius: 4px;
  color: var(--paper);
  background: #101315;
}
.primary-command {
  min-height: 48px;
  border: 1px solid #d85f66;
  border-radius: 4px;
  background: var(--blood);
  color: #fff;
  font-weight: 750;
  margin-top: 16px;
}
.primary-command:hover { background: #b73940; }
.form-error { min-height: 24px; color: #ff9398; margin: 16px 0 0; }

.game-shell {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px 42px minmax(0, 1fr) auto;
  background: #121416;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(20px, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid #303638;
  background: #181b1d;
}
.game-brand, .player-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crest {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 21px;
}
.game-brand div { display: grid; min-width: 0; }
.game-brand strong { font-family: Copperplate, "Palatino Linotype", Georgia, serif; font-size: 18px; }
.game-brand span:not(.crest) { color: #9eabad; font-size: 12px; }
#player-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd1d2; }
.quiet-command { border: 0; background: transparent; color: #d7b66d; padding: 8px; }

.quick-actions {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 28px;
  overflow-x: auto;
  border-bottom: 1px solid #2e3436;
}
.quick-actions button {
  flex: 0 0 auto;
  min-width: 88px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #aeb8ba;
  font-size: 13px;
  font-weight: 700;
}
.quick-actions button:hover { color: var(--paper); border-bottom-color: var(--gold); }

.story-column {
  width: min(100%, 1040px);
  margin: 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 16px;
  scrollbar-color: #4b5558 transparent;
}
.message { max-width: 820px; margin: 0 0 26px; }
.message.user { margin-left: auto; max-width: 680px; }
.message-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.message.user .message-header { justify-content: flex-end; }
.message-author { color: var(--gold); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.message.user .message-author { color: var(--cyan); text-align: right; }
.message-time { color: #7f8b8c; font-size: 11px; letter-spacing: .02em; white-space: nowrap; }
.message-body {
  color: #e7e5de;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: normal;
}
.message.user .message-body {
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  background: #1b2426;
  border-radius: 0 4px 4px 0;
}
.message-body strong { color: #fff; }
.message.failed .message-body { color: #ff9da2; border-color: var(--blood-bright); }
.message-media { display: grid; gap: 10px; margin-top: 14px; }
.message-media figure { margin: 0; border: 1px solid #3d4547; background: #0d0f10; }
.message-media img { display: block; width: 100%; max-height: 620px; object-fit: contain; }
.message-media figcaption { padding: 8px 10px; color: #bdc6c7; font-size: 13px; }
.media-save { display: block; padding: 6px 10px; font-size: 12px; color: #b89b5a; text-decoration: none; }
.media-save:hover { color: var(--gold); text-decoration: underline; }
.message-feedback {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin-top: 8px;
}
.message.user .message-feedback { display: none; }
.feedback-button {
  width: 30px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #9ea9aa;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  opacity: .72;
}
.feedback-button:hover, .feedback-button.active {
  border-color: #5b6668;
  color: var(--paper);
  background: #22282a;
  opacity: 1;
}
.feedback-button[data-feedback="dislike"].active { border-color: #a94a50; }
.feedback-state { color: #8d9a9b; font-size: 11px; }
.pulse-label { margin: 14px 0 6px; color: #cfd6d7; font-size: 14px; }
.pulse-hint { color: #8d9a9b; font-size: 12px; }
.pulse-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.pulse-scale button {
  min-width: 34px; height: 32px; padding: 0 8px;
  border: 1px solid #3d4547; border-radius: 4px;
  background: #151b1d; color: #cfd6d7; font-size: 14px;
}
.pulse-scale button:hover { border-color: #7a8a8c; }
.pulse-scale button.active { border-color: var(--gold); color: var(--gold); background: #22282a; }
#pulse-note {
  width: 100%; margin-top: 14px; padding: 8px 10px;
  border: 1px solid #3d4547; border-radius: 4px;
  background: #151b1d; color: #e7e5de; font-family: inherit; font-size: 14px;
}
.voice-button {
  width: 30px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #9ea9aa;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  opacity: .72;
}
.voice-button:hover:not(:disabled) {
  border-color: #5b6668;
  color: var(--paper);
  background: #22282a;
  opacity: 1;
}
.voice-button:disabled { opacity: .45; }
#auto-voice.active { border-color: var(--gold); color: var(--gold); }
audio.narration { width: 100%; margin-top: 8px; }

.typing { width: min(100%, 984px); margin: 0 auto; padding: 8px 28px 14px; color: #9facad; display: flex; align-items: center; gap: 5px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
.typing em { margin-left: 7px; font-size: 13px; }
@keyframes pulse { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }

.composer {
  width: min(calc(100% - 32px), 984px);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 10px;
  border: 1px solid #3e4649;
  border-radius: 6px;
  background: #1a1e20;
}
.composer textarea {
  width: 100%;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 8px;
  color: #f0eee8;
  background: transparent;
  line-height: 1.45;
}
.send-command {
  width: 48px;
  height: 48px;
  align-self: end;
  border: 1px solid #c0474e;
  border-radius: 4px;
  background: var(--blood);
  color: #fff;
  font-size: 22px;
}
.send-command:disabled { cursor: wait; opacity: .5; }

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-field { min-height: 34vh; padding: 32px 24px; border-right: 0; border-bottom: 1px solid #34393b; }
  .brand-copy h1 { font-size: 46px; }
  .brand-line { font-size: 16px; }
  .auth-panel { min-height: 66vh; padding: 32px 24px 48px; justify-content: flex-start; }
  .game-header { padding: 0 14px; }
  .quick-actions { padding: 0 10px; }
  #player-name { max-width: 110px; }
  .messages { padding: 22px 16px 8px; }
  .message { margin-bottom: 22px; }
  .composer { width: calc(100% - 20px); margin-bottom: 10px; grid-template-columns: minmax(0, 1fr) 44px; }
  .send-command { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

.age-notice {
  position: absolute;
  bottom: 10px;
  right: 18px;
  margin: 0;
  color: #7f8b8c;
  font-size: 11px;
}

.feedback-note {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #a9a9a0;
}
.feedback-note input {
  flex: 1;
  background: #14171a;
  border: 1px solid #3a4144;
  border-radius: 6px;
  color: inherit;
  padding: 4px 8px;
  font-size: 12px;
}
.feedback-note button {
  background: none;
  border: 1px solid #3a4144;
  border-radius: 6px;
  color: inherit;
  padding: 4px 10px;
  cursor: pointer;
}

/* Atos D: chip do ato no cabecalho e cartao de titulo na virada de ato. */
.game-brand .act-chip {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border: 1px solid #5a4a2f;
  border-radius: 999px;
  background: rgba(90, 74, 47, 0.18);
  color: #cdb27a;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  width: fit-content;
}
.act-card {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
  background: radial-gradient(ellipse at center, rgba(8, 10, 11, 0.92), rgba(8, 10, 11, 0.75));
  z-index: 60;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  padding: 24px;
}
.act-card.visible { opacity: 1; }
.act-card-kicker {
  color: #9eabad;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.act-card strong {
  font-family: Copperplate, "Palatino Linotype", Georgia, serif;
  font-size: clamp(22px, 4.5vw, 40px);
  color: #e6d7ae;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

/* Identidade por jogo: fundo de pagina e fonte de titulo (variaveis do tema). */
body {
  background-image: var(--fundo-imagem, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.game-brand strong,
#brand-title,
.act-card strong {
  font-family: var(--fonte-titulo, Copperplate, "Palatino Linotype", Georgia, serif);
}

/* --------------------------------------------------------------------------
   Fase Perfil: criacao de personagem (overlay antes do primeiro turno).
   Botoes de classe ludicos e coloridos — classes fixas (CSP sem inline). */
.perfil-panel {
  max-width: 560px;
  /* A tela do alinhamento (vozes + 9 opcoes + botao) e a mais alta do funil
     e passava da dobra SEM rolagem: o jogador clicava o alinhamento e "nada
     acontecia" — o "Chegar a Hommlet" existia, invisivel, abaixo (bug pego
     pelo GM jogando, 13/08/2026). */
  max-height: min(88vh, 720px);
  overflow-y: auto;
}
.perfil-nota { color: #9aa09b; font-size: 14px; margin: 4px 0 18px; }
.perfil-opcoes { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.perfil-opcao {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 16px 12px;
  background: #1c2023;
  border: 1px solid #3a4044;
  border-radius: 10px;
  color: #e7e5de;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.perfil-opcao:hover {
  border-color: var(--gold, #c9a65b);
  background: #23282c;
  transform: translateY(-2px);
}
.perfil-hint { font-size: 12px; font-weight: 400; color: #8f958f; }
.perfil-voltar {
  margin-top: 14px;
  background: none;
  border: none;
  color: #8f958f;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.perfil-voltar:hover { color: #c9c9c0; }
.classe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}
.classe-btn {
  --classe-cor: #8f958f;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 10px;
  background: #1a1e21;
  border: 1.5px solid color-mix(in srgb, var(--classe-cor) 45%, #2c3134);
  border-radius: 10px;
  cursor: pointer;
  color: #e7e5de;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.classe-btn:hover { transform: translateY(-2px); border-color: var(--classe-cor); }
.classe-btn.escolhida {
  border-color: var(--classe-cor);
  background: color-mix(in srgb, var(--classe-cor) 16%, #1a1e21);
  box-shadow: 0 0 14px color-mix(in srgb, var(--classe-cor) 35%, transparent);
}
.classe-emoji { font-size: 24px; line-height: 1; }
.classe-nome { font-size: 12.5px; font-family: system-ui, sans-serif; }
.c-barbaro { --classe-cor: #d05438; }
.c-bardo { --classe-cor: #c46bd6; }
.c-bruxo { --classe-cor: #8a55e0; }
.c-clerigo { --classe-cor: #e8c766; }
.c-druida { --classe-cor: #5aa85e; }
.c-feiticeiro { --classe-cor: #e2703a; }
.c-guerreiro { --classe-cor: #aab6c2; }
.c-ladino { --classe-cor: #7a8b9c; }
.c-mago { --classe-cor: #4f8fd0; }
.c-monge { --classe-cor: #d98e4a; }
.c-paladino { --classe-cor: #e6ddb8; }
.c-patrulheiro { --classe-cor: #4e9e7f; }
.perfil-historia {
  width: 100%;
  background: #14171a;
  border: 1px solid #3a4044;
  border-radius: 8px;
  color: #e7e5de;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}
.perfil-historia:focus { outline: none; border-color: var(--gold, #c9a65b); }

/* Poderes: 🍀 Sorte e Renascer (2026-07-29). */
.quick-actions .poder-sorte { color: #7fd6a0; }
.quick-actions .poder-sorte:hover { border-bottom-color: #7fd6a0; color: #a8f0c4; }
.quick-actions .poder-renascer { color: #9aa0b8; }
.quick-actions .poder-renascer:hover { border-bottom-color: #9aa0b8; color: #c9cee2; }
.message.desfeita { opacity: 0.42; }
.message.desfeita .message-body { text-decoration: line-through; text-decoration-color: rgba(200, 90, 90, 0.6); }
.message.desfeita .message-author::after { content: " · desfeita pela Sorte"; font-weight: 400; text-transform: none; color: #7fd6a0; }
.message.sistema .message-body {
  border-left: 3px solid #7fd6a0;
  background: #16201b;
  padding: 12px 14px;
  border-radius: 0 4px 4px 0;
}
.message.sistema .message-author { color: #7fd6a0; }

/* Saber mais: botao discreto na imagem e a ficha de bolso embaixo dela. */
.media-saber {
  display: inline-block;
  margin: 6px 0 0 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  padding: 4px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.media-saber:hover { border-color: var(--gold); color: #ffe6ad; }
.media-ficha {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-left: 2px solid var(--gold);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
}
.media-ficha strong { display: block; color: var(--gold); font-size: 13.5px; margin-bottom: 4px; }
.media-ficha p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.media-ficha em { color: #8f958f; font-size: 12.5px; }

/* --- Album do jogador: as imagens que ele viu e os feitos que ele fez ------
   Duas abas na mesma tela: o broche cinza so tem graca ao lado da imagem que
   ainda nao abriu. CSP proibe estilo inline, entao tudo mora aqui. */

.album {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.album-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--surface, #14100f);
  padding: 0.4rem 0;
  z-index: 2;
}

.album-abas { display: flex; gap: 0.4rem; }

.album-aba {
  background: transparent;
  border: 1px solid rgba(200, 170, 120, 0.28);
  color: rgba(235, 225, 210, 0.72);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.album-aba.ativa {
  background: rgba(200, 170, 120, 0.16);
  border-color: rgba(200, 170, 120, 0.6);
  color: #f3e9d8;
}

.album-filtros { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.album-filtro {
  background: transparent;
  border: 1px solid rgba(200, 170, 120, 0.2);
  color: rgba(235, 225, 210, 0.62);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.album-filtro.ativo {
  border-color: rgba(200, 170, 120, 0.62);
  color: #f3e9d8;
}

.album-mosaico {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.album-item {
  margin: 0;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(200, 170, 120, 0.14);
}

.album-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.album-item figcaption {
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  color: rgba(235, 225, 210, 0.78);
}

.album-vazio {
  color: rgba(235, 225, 210, 0.5);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

/* Feitos: cinza e sem cor ate acontecer; vivo depois. */

.album-placar {
  color: rgba(235, 225, 210, 0.62);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feito {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(200, 170, 120, 0.12);
}

.feito-broche {
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(160, 150, 140, 0.3);
  background: rgba(120, 118, 115, 0.14);
  color: rgba(190, 188, 184, 0.45);
  /* Bloqueado: cinza e apagado. A arte e sempre a colorida — quem tira a cor
     e o CSS, para nao existirem duas versoes de cada broche no acervo. */
  filter: grayscale(1) brightness(0.62);
}

.feito-broche img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Os broches do Codex vem em PNG/WebP com alpha e ja tem moldura propria. */
.feito-broche.com-arte {
  border: 0;
  background: transparent;
  overflow: visible;
}

.feito.conquistado .feito-broche.com-arte {
  background: transparent;
  border: 0;
  filter: drop-shadow(0 0 7px rgba(214, 176, 96, 0.5));
}

.feito.conquistado .feito-broche {
  border-color: rgba(214, 176, 96, 0.55);
  background: rgba(214, 176, 96, 0.08);
  color: #2a1c08;
  filter: none;
  box-shadow: 0 0 16px rgba(214, 176, 96, 0.3);
}

.feito-corpo { min-width: 0; }

.feito strong {
  color: rgba(200, 196, 190, 0.55);
  font-weight: 600;
}

.feito.conquistado strong { color: #f3e4c4; }

.feito-dica {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: rgba(190, 188, 184, 0.42);
}

.feito-lore {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: rgba(235, 225, 210, 0.86);
}

.feito-ganho {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: rgba(214, 176, 96, 0.9);
}

/* O broche que se conta a um amigo (07/08/2026): discreto de proposito —
   e um sussurro ao lado do feito, nao um botao de rede social. */
.feito-zap {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: rgba(140, 200, 140, 0.85);
  text-decoration: none;
  border-bottom: 1px dotted rgba(140, 200, 140, 0.5);
}

.feito-zap:hover {
  color: rgba(170, 230, 170, 1);
}

/* Tela cheia da imagem */

.album-lente {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 3, 0.94);
  display: grid;
  place-items: center;
  z-index: 60;
  padding: 1.5rem;
}

.album-lente figure { margin: 0; text-align: center; }

.album-lente img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  border-radius: 8px;
}

.album-lente figcaption {
  margin-top: 0.7rem;
  color: rgba(235, 225, 210, 0.8);
}

.album-lente-fechar {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: 0;
  color: rgba(235, 225, 210, 0.8);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Criacao de personagem: o nome e a historia, cada um com o seu rotulo.
   Ate 31/07/2026 havia so a caixa de historia — e o GM escreveu o nome dele
   la dentro, porque nao existia outro lugar. */

.perfil-rotulo {
  display: block;
  align-self: flex-start;
  margin: 0.7rem 0 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(235, 225, 210, 0.72);
}

.perfil-nome {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 170, 120, 0.32);
  background: rgba(18, 15, 14, 0.72);
  color: #f3e9d8;
  font-size: 1rem;
  font-family: inherit;
}

.perfil-nome:focus {
  outline: none;
  border-color: rgba(214, 176, 96, 0.75);
}


/* --- Livro-jogo (Hommlet): escolher QUEM voce e, e como vai jogar --- */
.pronto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .55rem;
  margin: .8rem 0;
  max-height: 46vh;
  overflow-y: auto;
}
.pronto-btn {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .6rem .7rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .04);
  color: inherit;
  cursor: pointer;
}
.pronto-btn:hover, .pronto-btn:focus-visible { background: rgba(255, 255, 255, .09); }
.pronto-btn.escolhida { border-color: currentColor; background: rgba(255, 255, 255, .12); }
.pronto-nome { font-weight: 600; }
.pronto-classe { font-size: .82rem; opacity: .72; text-transform: capitalize; }
.pronto-quem { font-size: .8rem; opacity: .62; line-height: 1.35; }
.pronto-aviso { font-size: .78rem; margin-top: .25rem; opacity: .9; }

.alinhamento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .45rem;
  margin: .8rem 0;
}
.alinhamento-btn {
  padding: .55rem .4rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .04);
  color: inherit;
  cursor: pointer;
  font-size: .88rem;
}
.alinhamento-btn:hover, .alinhamento-btn:focus-visible { background: rgba(255, 255, 255, .09); }
.alinhamento-btn.escolhida { border-color: currentColor; background: rgba(255, 255, 255, .12); }
.alinhamento-btn .perfil-hint { display: block; font-size: .72rem; opacity: .6; }

@media (max-width: 520px) {
  .alinhamento-grid { grid-template-columns: repeat(2, 1fr); }
  .pronto-grid { grid-template-columns: 1fr; max-height: 52vh; }
  /* No celular medi 39px de altura nestes botoes — abaixo do alvo de toque
     confortavel. Nove opcoes lado a lado e justamente onde errar o dedo
     custa caro: o alinhamento decide 1.265 linhas de dialogo. */
  .alinhamento-btn { min-height: 46px; }
}


/* --- Retrato do pre-pronto (ToEE) e a amostra de voz dele --- */
/* A grade cresceu: 29 personagens com retrato pedem coluna mais larga que a
   lista de texto que havia antes. */
.pronto-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pronto-arte {
  display: block;
  width: 100%;
  aspect-ratio: 13 / 15;
  overflow: hidden;
  border-radius: .4rem;
  margin-bottom: .35rem;
  background: rgba(0, 0, 0, .35);
}
.pronto-arte img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pronto-btn.escolhida .pronto-arte { outline: 2px solid currentColor; outline-offset: -2px; }
.pronto-quem { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.voz-fileira {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: .6rem 0 .2rem;
}
.voz-rotulo { font-size: .8rem; opacity: .6; margin-right: .1rem; }
.voz-btn {
  padding: .34rem .6rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: inherit;
  font-size: .8rem;
  cursor: pointer;
  /* Alvo de toque: a fileira e o unico controle pequeno desta tela. */
  min-height: 34px;
}
.voz-btn:hover, .voz-btn:focus-visible { background: rgba(255, 255, 255, .1); }

@media (max-width: 520px) {
  .pronto-grid { grid-template-columns: repeat(2, 1fr); max-height: 56vh; }
}

/* seletor de genero da voz nos pre-prontos */
.voz-genero {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
}
.voz-genero.escolhida { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }
