@import url('fonts.css');

:root {
  /* Paleta Dark Theme Premium (Inspirada no print do Linker) */
  --bg-primary: #0e1117;
  --bg-secondary: #161922;
  --bg-card: #1d212c;
  --bg-card-hover: #262b3a;
  --bg-card-alt: #181b24;
  
  --border-subtle: #2b3142;
  --border-highlight: #3c445c;
  
  /* Cores de Destaque */
  --accent-orange: #E89E73;
  --accent-orange-glow: rgba(232, 158, 115, 0.45);
  --accent-gold: #ffd166;
  
  /* Cores Temáticas dos Atributos */
  --attr-str: #e67e22;
  --attr-dex: #00b4d8;
  --attr-con: #e63946;
  --attr-int: #48cae4;
  --attr-wis: #06d6a0;
  --attr-cha: #b5179e;

  /* Status */
  --hp-green: #2ecc71;
  --hp-green-glow: #27ae60;
  --mana-blue: #3498db;
  --stamina-yellow: #f1c40f;
  --ammo-cyan: #1abc9c;
  --gore-red: #ff4757;

  /* Textos */
  --text-primary: #f1f2f6;
  --text-secondary: #9da5b4;
  --text-muted: #636e7b;
  --text-gold: #f8c291;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  height: 100%;
}

body {
  background: radial-gradient(circle at top center, #1b202e 0%, #0a0c10 100%);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  overflow-x: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  touch-action: pan-x pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* Moldura Mobile do Smartphone */
.mobile-device-frame {
  width: 100%;
  max-width: 430px;
  height: 94vh;
  max-height: 900px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Em Celulares Reais (Mobile Viewport Nativa / PWA em Tela Cheia) */
@media (max-width: 500px), (display-mode: standalone) {
  body {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    height: 100% !important;
    align-items: stretch !important;
    background: var(--bg-primary) !important;
  }
  .mobile-device-frame {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}



/* ========================================================
   BARRAS DE NAVEGAÇÃO SUPERIOR E INFERIOR (ESTILO DO PRINT)
   ======================================================== */
.nav-tab-bar {
  background: linear-gradient(180deg, #161922 0%, #11141b 100%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 2px 4px 0;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  height: 58px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.nav-tab-bar.bottom {
  border-bottom: none;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
}

button,
button:focus,
button:focus-visible {
  outline: none !important;
}

/* Botão de Aba da Barra */
.nav-tab-item {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #8d96a7;
  padding: 6px 2px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  height: 100%;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-tab-item:focus,
.nav-tab-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.nav-tab-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  color: #8d96a7;
  transition: all 0.2s ease;
}

.nav-tab-item .tab-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: inherit;
  line-height: 1;
}

.nav-tab-item .tab-substatus {
  font-size: 8px;
  font-weight: 600;
  color: #2ecc71;
  letter-spacing: 0.4px;
  line-height: 1;
  text-transform: capitalize;
}

/* Estado Ativo: Ícone e Texto em Laranja com a Linha Indicadora (Idêntico ao Print) */
.nav-tab-item.active {
  color: var(--accent-orange);
}

.nav-tab-item.active svg {
  color: var(--accent-orange);
  stroke: var(--accent-orange);
  filter: drop-shadow(0 0 8px rgba(232, 158, 115, 0.5));
}

.nav-tab-item.active .tab-label {
  color: var(--accent-orange);
}

/* Linha indicadora na base da aba ativa (Tanto na Superior quanto na Inferior) */
.nav-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 3px;
  background: var(--accent-orange);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 10px rgba(232, 158, 115, 0.7);
}

/* ========================================================
   ESTADOS DE HARDWARE: CÂMERA E MIC (3 ESTÁGIOS)
   ======================================================== */
/* Estágio 2: Desligado (Desat. ou Mudo) */
.nav-tab-item.media-state-disabled svg,
.nav-tab-item.media-state-muted svg {
  color: #a4b0be;
  filter: none;
}

/* Estágio 3: Não Encontrado (Off / Desabilitado) */
.nav-tab-item.media-state-off {
  opacity: 0.35 !important;
  filter: grayscale(1);
  cursor: not-allowed;
}

.nav-tab-item.media-state-off svg {
  color: #636e7b !important;
  stroke: #636e7b !important;
  filter: none !important;
}

.nav-tab-item.media-state-off .tab-label,
.nav-tab-item.media-state-off .tab-substatus {
  color: #636e7b !important;
}

/* REGRA CRÍTICA SOLICITADA: NUNCA exibir barra laranjada quando desligado ou off */
.nav-tab-item.media-state-disabled::after,
.nav-tab-item.media-state-muted::after,
.nav-tab-item.media-state-off::after {
  display: none !important;
}

.nav-tab-item:hover:not(.active) {
  color: #d1d5db;
}

.nav-tab-item:hover:not(.active) svg {
  color: #d1d5db;
}

/* Área Central de Visualização (Controla os Módulos) */
.viewport-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
}

/* Ficha do Personagem (Container Fixo com Scroll Interno nas Abas) */
#view-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

/* ========================================================
   MÓDULO DE INFORMAÇÕES DO PERSONAGEM (BANNER FIXO NO TOPO)
   Visual Épico com Cores Mortas, Avatar e Paisagem Fantástica
   ======================================================== */
.character-hero-banner {
  width: 100%;
  margin: 0;
  position: relative;
  flex-shrink: 0;
  background-color: var(--bg-primary);
  background-image: 
    linear-gradient(to right, #0e1117 0%, rgba(14, 17, 23, 0.94) 22%, rgba(14, 17, 23, 0.58) 55%, rgba(14, 17, 23, 0.38) 100%),
    url('../img/bg_character_landscape.jpg');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 14px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.character-banner-content {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 2;
}

/* Avatar Circular com Borda Mais Grossa em Bronze Fosco */
.profile-avatar-box {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3.5px solid #a38968; /* Borda mais grossa como no exemplo */
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.7);
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-box img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Símbolo da Classe no Canto Inferior Direito */
.avatar-class-crest {
  position: absolute;
  bottom: -1px;
  right: -1px;
  background: #181d28;
  border: 1.8px solid #a38968; /* Bronze fosco */
  border-radius: 7px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4b49b;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.75);
}

/* Textos do Personagem em Cores Mortas, Estilo Condensado Elegante */
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2.5px; /* Espaçamento reduzido e mais compacto entre os 3 textos */
  min-width: 0;
}

.profile-name {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 800;
  color: #ded1b8; /* Cor morta/pergaminho elegante do print */
  letter-spacing: 0.8px;
  line-height: 1.05;
  display: inline-block;
  transform: scaleY(1.16);
  transform-origin: left center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.profile-meta {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #c8b99d; /* Raça, Classe e Nível em tom suave fosco idêntico ao modelo */
  line-height: 1.15;
  letter-spacing: 0.15px;
}

.profile-quote {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13.5px;
  font-style: italic;
  font-weight: 400;
  color: #a89880; /* Frase do personagem em tom envelhecido sutil */
  line-height: 1.15;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sub-Barra de Status Fixa (ATRIBUTOS, INVENTÁRIO, PERÍCIAS, HISTÓRIA) */
.sub-tabs-row {
  display: flex;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  overflow-x: auto;
  flex-shrink: 0;
  z-index: 4;
}

/* Barra de Status na Ficha (Atributos, Inventário, Perícias, História) */
.sub-tabs-row {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

.sub-tab-btn {
  background: none !important;
  border: none !important;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #8d96a7 !important; /* Cinza meio azulado idêntico ao perfil do mestre */
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  padding: 4px 6px 6px;
  transition: color 0.2s;
  white-space: nowrap;
}

.sub-tab-btn.active {
  color: var(--accent-orange) !important; /* Laranja da aba selecionada */
}

.sub-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--accent-orange) !important;
  box-shadow: 0 0 8px rgba(232, 158, 115, 0.7);
}

/* Painel Central: Painéis Alternáveis por Aba (Scroll interno exclusivo da aba ativa) */
.subtab-pane {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 24px;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

.subtab-pane.active {
  display: flex;
  animation: fadeInPane 0.2s ease-out;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================
   GRID DE ATRIBUTOS (COM O VISUAL COLORIDO DO PRINT)
   ======================================================== */
.attributes-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title-modern {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #d1d5db;
}

.roll-action-btn {
  background: rgba(232, 158, 115, 0.12);
  border: 1px solid rgba(232, 158, 115, 0.4);
  color: var(--accent-gold);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.roll-action-btn:hover {
  background: rgba(232, 158, 115, 0.25);
  border-color: var(--accent-orange);
}

/* Barra Superior do Bloco de Atributos Primários */
.atributos-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.toolbar-title-text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-atualizar-ficha {
  background: linear-gradient(135deg, rgba(232, 158, 115, 0.16) 0%, rgba(218, 165, 32, 0.12) 100%);
  border: 1px solid rgba(232, 158, 115, 0.4);
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-atualizar-ficha:hover {
  background: var(--accent-orange);
  color: #0b0e14;
  border-color: var(--accent-orange);
  box-shadow: 0 0 10px rgba(232, 158, 115, 0.5);
  transform: translateY(-1px);
}

.btn-atualizar-ficha.active-editing {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border-color: #2ecc71;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

/* Banner de Distribuição de Pontos (Modo Edição) */
.banner-distribuicao-pontos {
  background: linear-gradient(135deg, rgba(24, 29, 40, 0.95) 0%, rgba(18, 21, 30, 0.95) 100%);
  border: 1px solid var(--accent-orange);
  border-radius: 10px;
  padding: 10px 14px 9px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(232, 158, 115, 0.1);
  animation: fadeIn 0.2s ease-out;
}

.banner-pontos-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.banner-pontos-col-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.banner-pontos-rotulo {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.banner-pontos-valor {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.1;
  text-shadow: 0 0 8px rgba(218, 165, 32, 0.35);
}

.banner-pontos-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-pontos-bottom-row {
  width: 100%;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.banner-pontos-bottom-row b {
  color: #2ecc71;
}

.btn-banner-cancelar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-banner-cancelar:hover {
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
  color: #ff6b81;
}

.btn-banner-concluir {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: 1px solid #2ecc71;
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(46, 204, 113, 0.4);
}

.btn-banner-concluir:hover {
  background: #2ecc71;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
}

/* Botão Compacto "+1" nos Polígonos de Atributos */
.btn-attr-add-point {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 19px;
  background: #27ae60;
  border: 1px solid #2ecc71;
  color: #ffffff;
  border-radius: 4px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
  z-index: 10;
}

.btn-attr-add-point:hover {
  background: #2ecc71;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.btn-attr-add-point:active {
  transform: scale(0.95);
}

.btn-attr-add-point:disabled {
  background: #2f3640;
  border-color: #4b6584;
  color: #718093;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.6;
}

.attr-pill-card.has-temp-points {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.35);
}

.attr-pill-card.has-temp-points .attr-value-big {
  color: #2ecc71 !important;
}

.atributos-rows-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.atributos-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

/* Polígono Individual de Atributo
   - Altura fixa (10% a mais = 78px)
   - Largura responsiva dividida igualmente pela quantidade de itens na linha
   - Topo: Ícone | Centro: Valor | Base: Nome (Completo ou Sigla)
*/
.attr-pill-card {
  flex: 1 1 0;
  min-width: 0; /* Garante compressão elegante no flex */
  height: 78px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 3px 5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.attr-pill-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

/* Topo Central: Ícone (Suporta tanto SVG inline quanto arquivo SVG externo via Mask) */
.attr-pill-card .attr-icon-box {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attr-pill-card .attr-icon-box svg {
  width: 17px;
  height: 17px;
}

/* Ícone baseado em SVG Externo com Coloração Dinâmica via Máscara CSS */
.attr-icon-box .attr-icon-mask {
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  display: block;
  transition: all 0.2s ease;
}

/* Mapeamento de Arquivos SVG Externos para Cada Atributo */
.attr-pill-card.str .attr-icon-mask { -webkit-mask-image: url('../img/icons/for.svg'); mask-image: url('../img/icons/for.svg'); }
.attr-pill-card.dex .attr-icon-mask { -webkit-mask-image: url('../img/icons/dex.svg'); mask-image: url('../img/icons/dex.svg'); }
.attr-pill-card.con .attr-icon-mask { -webkit-mask-image: url('../img/icons/con.svg'); mask-image: url('../img/icons/con.svg'); }
.attr-pill-card.int .attr-icon-mask { -webkit-mask-image: url('../img/icons/int.svg'); mask-image: url('../img/icons/int.svg'); }
.attr-pill-card.wis .attr-icon-mask { -webkit-mask-image: url('../img/icons/sab.svg'); mask-image: url('../img/icons/sab.svg'); }
.attr-pill-card.cha .attr-icon-mask { -webkit-mask-image: url('../img/icons/car.svg'); mask-image: url('../img/icons/car.svg'); }
.attr-pill-card.per .attr-icon-mask { -webkit-mask-image: url('../img/icons/per.svg'); mask-image: url('../img/icons/per.svg'); }
.attr-pill-card.von .attr-icon-mask { -webkit-mask-image: url('../img/icons/von.svg'); mask-image: url('../img/icons/von.svg'); }
.attr-pill-card.agi .attr-icon-mask { -webkit-mask-image: url('../img/icons/agi.svg'); mask-image: url('../img/icons/agi.svg'); }
.attr-pill-card.sor .attr-icon-mask { -webkit-mask-image: url('../img/icons/sor.svg'); mask-image: url('../img/icons/sor.svg'); }
.attr-pill-card.san .attr-icon-mask { -webkit-mask-image: url('../img/icons/san.svg'); mask-image: url('../img/icons/san.svg'); }

/* Central: VALOR */
.attr-pill-card .attr-value-big {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-align: center;
}

/* Base (Topo Down): NOME / SIGLA */
.attr-pill-card .attr-code-label {
  width: 100%;
  text-align: center;
  line-height: 1.1;
  padding: 0 1px;
  box-sizing: border-box;
}

/* Modo Nome Completo */
.modo-nome-completo .attr-name-full {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.modo-nome-completo .attr-name-sigla {
  display: none;
}

/* Modo Sigla de 3 Letras (Padrão Ativo) */
.modo-nome-sigla .attr-name-full {
  display: none;
}
.modo-nome-sigla .attr-name-sigla {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Cores e Temas Cromáticos para os Atributos */
.attr-pill-card.str { border-color: rgba(217, 119, 54, 0.4); color: #d97736; }
.attr-pill-card.dex { border-color: rgba(56, 189, 248, 0.4); color: #38bdf8; }
.attr-pill-card.con { border-color: rgba(230, 57, 70, 0.4); color: #e63946; }
.attr-pill-card.int { border-color: rgba(96, 165, 250, 0.4); color: #60a5fa; }
.attr-pill-card.wis { border-color: rgba(45, 212, 191, 0.4); color: #2dd4bf; }
.attr-pill-card.cha { border-color: rgba(192, 132, 252, 0.4); color: #c084fc; }
.attr-pill-card.per { border-color: rgba(251, 191, 36, 0.4); color: #fbbf24; }
.attr-pill-card.von { border-color: rgba(167, 139, 250, 0.4); color: #a78bfa; }
.attr-pill-card.agi { border-color: rgba(250, 204, 21, 0.4); color: #facc15; }
.attr-pill-card.sor { border-color: rgba(74, 222, 128, 0.4); color: #4ade80; }
.attr-pill-card.san { border-color: rgba(129, 140, 248, 0.4); color: #818cf8; }



/* ========================================================
   BLOCO 2: INFORMAÇÕES COMPLEMENTARES (2 LINHAS)
   Linha 1: XP, Deslocamento, Iniciativa (3 polígonos)
   Linha 2: Dano F., Dano M., Def. F., Def. M (4 polígonos)
   ======================================================== */
.complementares-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.complementares-row-1 {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.complementares-row-2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.status-badge-box {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px;
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
  min-height: 46px;
  box-sizing: border-box;
  box-shadow: none !important;
}

.status-badge-box:hover {
  border-color: var(--border-highlight) !important;
  background: #141824 !important;
}

.status-badge-box .badge-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: #8d96a7 !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge-box .badge-value {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 1px;
  line-height: 1.1;
}

/* Barra de Vida Integrada no Card de HP (Como no Print) */
.status-badge-box.hp-box {
  border-color: rgba(46, 204, 113, 0.3);
  padding-bottom: 4px;
}

.hp-mini-bar {
  width: 80%;
  height: 4px;
  background: #11141c;
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.hp-mini-bar-fill {
  height: 100%;
  background: var(--hp-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ========================================================
   BARRAS DE RECURSOS VITAIS MODULARES (BLOCO 3)
   Grupo 1: HP (Vermelho) e MP (Azul) - Mais próximos
   Grupo 2: Barras de Ação Customizáveis - Mais afastadas
   ======================================================== */
.vitals-module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

/* Grupo 1: HP e MP (mais perto um do outro) */
.vitals-group-primary {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Grupo 2: Barras de Ação (mais longe do primeiro grupo) */
.vitals-group-secondary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vital-bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vital-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.vital-bar-top .vital-bar-value {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.vital-bar-track {
  width: 100%;
  height: 8px;
  background: #11141c;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

.vital-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Barra de HP Vermelha e MP Azul */
.vital-bar-fill.hp { background: linear-gradient(90deg, #c0392b, #ff4757); }
.vital-bar-fill.mp { background: linear-gradient(90deg, #2980b9, var(--mana-blue)); }
.vital-bar-fill.action-bar { border-radius: 4px; }

/* Estilos de Configuração das 5 Barras de Ação no Painel do Mestre */
.action-bars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.action-bar-cfg-item {
  background: #11141d;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-bar-cfg-item.is-disabled {
  opacity: 0.52;
  background: #0d0f17;
}

.action-bar-cfg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.action-bar-toggle-btn {
  background: #1a1e2b;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-bar-toggle-btn.active {
  background: rgba(46, 204, 113, 0.2);
  border-color: #2ecc71;
  color: #2ecc71;
}

.action-bar-cfg-body {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.action-bar-cfg-body-stacked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.action-bar-cfg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.action-bar-name-input {
  flex: 1;
  background: #0a0c12;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  height: 28px;
  padding: 0 8px;
  outline: none;
}

.action-bar-name-input:focus {
  border-color: var(--accent-orange);
}

.action-bar-formula-input {
  flex: 1;
  width: 100%;
  background: #0a0c12;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--accent-gold);
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  padding: 0 8px;
  outline: none;
  box-sizing: border-box;
}

.action-bar-formula-input:focus {
  border-color: var(--accent-orange);
}

/* ========================================================
   SEÇÃO DE PERÍCIAS (SKILLS - EM 2 COLUNAS COMO NO PRINT)
   ======================================================== */
.skills-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

.skills-divider-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.skills-divider-title::before, .skills-divider-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 158, 115, 0.4), transparent);
}

.skills-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 6px;
}

.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  cursor: pointer;
  transition: color 0.15s;
}

.skill-row:hover {
  color: var(--accent-gold);
}

.skill-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-check-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--accent-orange);
}

.skill-check-box.checked {
  background: rgba(232, 158, 115, 0.2);
  border-color: var(--accent-orange);
}

.skill-bonus-num {
  font-weight: 700;
  color: #fff;
}

/* ========================================================
   MÓDULO DE FÓRMULAS COM BALÃO INFORMATIVO (i)
   ======================================================== */
.formulas-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.formula-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.formula-info-btn {
  background: #2b3142;
  color: var(--accent-orange);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
}

.formula-bubble-dark {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: #11141c;
  color: var(--accent-gold);
  border: 1px solid var(--accent-orange);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  display: none;
  z-index: 20;
}

.formula-bubble-dark::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #11141c transparent transparent;
}

/* ========================================================
   PAPERDOLL MODERNO EM 2 COLUNAS COM SILHUETA CENTRAL
   ======================================================== */
.paperdoll-modern-view {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  margin: 14px;
  padding: 14px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: 440px;
  flex-shrink: 0;
}

.paperdoll-vertical-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 84px;
  z-index: 2;
}

.modern-equip-slot {
  width: 82px;
  height: 82px;
  background: #141720;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.modern-equip-slot:hover {
  border-color: var(--accent-orange);
  transform: translateY(-1px);
}

.modern-equip-slot svg {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
}

.modern-equip-label {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.modern-equip-name {
  font-size: 9px;
  font-weight: 600;
  color: #f1f2f6;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modern-silhueta-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 380px;
}

.silhueta-svg {
  height: 85%;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

/* Gore Marker no Slot Moderno */
.modern-equip-slot.gore-locked {
  border-color: var(--gore-red);
  background: rgba(230, 57, 70, 0.15);
}

.gore-x-mark {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gore-red);
  font-size: 44px;
  font-weight: 900;
  animation: pulseGoreDark 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulseGoreDark {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 10px rgba(255, 71, 87, 0.8); }
  100% { transform: scale(0.95); opacity: 0.85; }
}

/* Toast de Ação */
.modern-toast {
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 25, 34, 0.95);
  border: 1px solid var(--accent-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 100;
  white-space: nowrap;
}

.modern-toast.show {
  opacity: 1;
}

/* ========================================================
   ESTILOS DA ABA INVENTÁRIO (INFORMAÇÕES FIXAS & BOLSA)
   ======================================================== */
.inventory-fixed-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Card de Riqueza (4 Moedas Configuráveis pelo Mestre) */
.inventory-wealth-card {
  background: linear-gradient(135deg, #181d28 0%, #12151e 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.wealth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wealth-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-gold);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wealth-lock-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: #a4b0be;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.wealth-coins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.wealth-coin-pill {
  background: rgba(14, 17, 23, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.15s, border-color 0.15s;
}

.wealth-coin-pill:hover {
  transform: translateY(-1px);
}

.wealth-coin-icon {
  font-size: 16px;
  line-height: 1;
}

.wealth-coin-amount {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.wealth-coin-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* Card de Cantil e Sobrevivência */
.inventory-canteen-card {
  background: linear-gradient(135deg, #151a24 0%, #10131b 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.canteen-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.canteen-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #74b9ff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-edit-canteen-toggle {
  background: rgba(116, 185, 255, 0.1);
  border: 1px solid rgba(116, 185, 255, 0.3);
  color: #74b9ff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-canteen-toggle:hover {
  background: rgba(116, 185, 255, 0.2);
  border-color: #74b9ff;
}

.cantis-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.canteen-item-row {
  background: rgba(14, 17, 23, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.canteen-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.canteen-label-text {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.canteen-bracket-tag {
  color: #74b9ff;
  background: rgba(116, 185, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 800;
}

.canteen-controls-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-canteen-step {
  background: #1e2433;
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}

.btn-canteen-step:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
}

.canteen-input-val {
  width: 44px;
  height: 24px;
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: #fff;
  font-family: 'Roboto Condensed', monospace;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.canteen-input-val.overflow-error {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.2);
  color: #ff6b81;
}

.canteen-bar-track {
  width: 100%;
  height: 5px;
  background: #0b0e14;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.canteen-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0984e3, #74b9ff);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Cabeçalho da Lista de Itens */
.inventory-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.items-header-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.items-count-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 12px;
}

/* Modal de Detalhes e Ajuste de Quantidade do Item */
.item-modal-icon-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(14, 17, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 12px;
}

.item-modal-big-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 6px;
}

.item-modal-type-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-qty-adjuster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #11141d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
}

.item-qty-control-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-qty-step {
  width: 32px;
  height: 32px;
  background: #1e2433;
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 6px;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-qty-step:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
}

.item-qty-value-display {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--accent-gold);
  min-width: 32px;
  text-align: center;
}

/* Aba Inventário: Rolagem Geral Única da Tela */
#subtab-pane-inventario {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.inventory-items-section {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.inventory-grid-4cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 76px;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 24px;
}

/* Card do Slot de Inventário (Exclusivamente Nome e Quantidade, Sem Ícones ou Desenhos) */
.inv-slot-card {
  width: 100%;
  min-width: 0;
  height: 76px;
  min-height: 76px;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  padding: 8px 6px 18px 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.inv-slot-card:hover {
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.inv-slot-card.empty {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(14, 17, 23, 0.35);
  box-shadow: none;
  cursor: default;
}

.inv-slot-card.empty:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(14, 17, 23, 0.5);
  transform: none;
}

.inv-slot-card .slot-item-name {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #e6edf3;
  line-height: 1.25;
  width: 100%;
  max-width: 100%;
  padding: 0 4px;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  word-break: break-word;
  letter-spacing: 0.2px;
}

.inv-slot-card .slot-item-qty {
  position: absolute;
  bottom: 4px;
  right: 5px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(218, 165, 32, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.1;
  letter-spacing: 0.3px;
}

/* ========================================================
   ESTILOS DE VANTAGENS E DESVANTAGENS (ABA PERÍCIAS)
   ======================================================== */
.features-list-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card-item {
  background: rgba(24, 27, 36, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
}

.feature-card-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-gold);
  margin-bottom: 2px;
}

.feature-card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.feature-card-item.flaw {
  border-left: 3px solid #ff4757;
}

/* ========================================================
   ESTILOS DA ABA HISTÓRIA
   ======================================================== */
.history-block-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
}

.history-title-tag {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.history-paragraph {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.player-notes-area {
  width: 100%;
  background: #12151d;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  resize: vertical;
  margin-top: 4px;
  box-sizing: border-box;
}

.player-notes-area:focus {
  outline: none;
  border-color: var(--accent-orange);
}

/* ========================================================
   TELA DE CONFIGURAÇÕES DA HUD (BARRA INFERIOR [CONFIG])
   Visual Dark Fantasy Imersivo com Toggles, Selects e Notificações
   ======================================================== */
#view-config {
  display: none; /* Controlado via JS ao clicar em [CONFIG] */
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 28px;
  gap: 14px;
  animation: fadeIn 0.2s ease;
  -webkit-overflow-scrolling: touch;
}

#view-config.active {
  display: flex;
}

/* Topo / Header da Tela de Configurações */
.config-header-banner {
  background: linear-gradient(135deg, #181d28 0%, #12151e 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.config-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-header-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-header-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-orange);
}

.config-header-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-ping-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 9.5px;
  font-weight: 700;
}

.btn-voltar-ficha {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-voltar-ficha:hover {
  background: rgba(232, 158, 115, 0.15);
  border-color: var(--accent-orange);
  color: #fff;
}

/* Cartão de Seção de Configuração */
.config-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-section-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent-orange);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 7px;
}

.config-section-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-section-title svg {
  width: 15px;
  height: 15px;
}

/* Linhas de Opções (Labels + Controles) */
.config-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.config-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.config-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.config-row-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.25;
}

/* Segmented Control (Pills de Escolha) */
.config-segmented-control {
  display: inline-flex;
  background: #11141c;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.segmented-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.segmented-btn.active {
  background: var(--accent-orange);
  color: #0e1117;
  font-weight: 800;
  box-shadow: 0 2px 8px var(--accent-orange-glow);
}

/* Toggle Switch Moderno */
.config-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.config-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.config-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2b3142;
  transition: .25s;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.config-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2.5px;
  bottom: 2px;
  background-color: #fff;
  transition: .25s;
  border-radius: 50%;
}

.config-switch input:checked + .config-switch-slider {
  background-color: var(--accent-orange);
}

.config-switch input:checked + .config-switch-slider:before {
  transform: translateX(17px);
  background-color: #0e1117;
}

/* Select Escuro Customizado */
.dark-select {
  background: #11141c;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  max-width: 180px;
}

.dark-select:focus {
  border-color: var(--accent-orange);
}

/* Range Slider de Volume e Sensibilidade */
.config-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 160px;
}

.dark-range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #2b3142;
  outline: none;
}

.dark-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-orange);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-orange-glow);
}

.slider-val-tag {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-orange);
  width: 32px;
  text-align: right;
}

/* Central de Notificações */
.notifications-list-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  background: #12151e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border-left: 2.5px solid var(--accent-orange);
  font-size: 11px;
  gap: 8px;
}

.notification-item.mestre {
  border-left-color: #ffd166;
}

.notification-item.sistema {
  border-left-color: #38bdf8;
}

.notif-text {
  color: var(--text-primary);
  flex: 1;
}

.notif-time {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Botões de Ação da Conta / Mesa */
.config-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-config-primary {
  flex: 1;
  background: linear-gradient(135deg, #d97736 0%, #b85d20 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 119, 54, 0.35);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-config-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-config-secondary {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
  border-radius: 8px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-config-secondary:hover {
  background: rgba(255, 71, 87, 0.2);
}

/* ========================================================
   NOVO HEADER DE CONFIGURAÇÃO, ROLE SWITCHER & CAMPANHA
   ======================================================== */
.master-campaign-name-input {
  flex: 1;
  background: #0a0c12;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffd166;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  height: 30px;
  padding: 0 10px;
  outline: none;
  transition: border-color 0.2s;
}

.master-campaign-name-input:focus {
  border-color: var(--accent-gold);
}

.role-switcher-badge {
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: var(--accent-gold);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.role-switcher-badge:hover {
  background: rgba(255, 209, 102, 0.25);
  transform: translateY(-1px);
}

.role-switcher-badge.is-player {
  background: rgba(52, 152, 219, 0.12);
  border-color: rgba(52, 152, 219, 0.35);
  color: #74b9ff;
}

/* ========================================================
   SUB-ABAS MODULARES DE CONFIGURAÇÃO (3 BLOCOS)
   ======================================================== */
.config-modular-tabs {
  display: flex;
  background: #12151e;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.config-modular-tab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.config-modular-tab-btn.active {
  background: var(--bg-card-hover);
  color: var(--accent-orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border-color: rgba(232, 158, 115, 0.35);
}

/* Barra de Abas de Personagens em Regras Individuais */
.character-subtabs-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px;
  margin-top: 6px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}

.character-subtab-btn {
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 4px 10px;
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.character-subtab-btn:hover {
  background: #161b26;
  color: var(--text-primary);
}

.character-subtab-btn.active {
  background: rgba(232, 158, 115, 0.18);
  border-color: var(--accent-orange);
  color: #fff;
  font-weight: 800;
}


/* ========================================================
   PAINEL DO MESTRE: GERENCIADOR DE ATRIBUTOS PRIMÁRIOS (1 COLUNA)
   ======================================================== */
.master-attr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.master-attr-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: #121520;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 6px 12px;
  height: 44px;
  box-sizing: border-box;
  gap: 12px;
  transition: all 0.2s ease;
}

.master-attr-item:hover {
  border-color: var(--border-highlight);
}

/* Estado Ativo (Habilitado): Verde Sutil idêntico ao modelo */
.master-attr-item.is-active {
  background: rgba(46, 204, 113, 0.08);
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.06);
}

.master-attr-item.is-inactive {
  opacity: 0.52;
  background: #0d0f17;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Botões de Reordenação de Posição (▲ e ▼) */
.master-attr-reorder-btns {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  margin-right: 8px; /* Espaço imutável entre as setas e o nome do atributo */
  flex-shrink: 0;
  width: 14px;
}

.btn-reorder {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 8px;
  line-height: 1;
  padding: 2px 3px;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-reorder:hover {
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.15);
}

/* Alinhado à esquerda: Nome do Atributo no topo e Sigla embaixo */
.master-attr-name-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 94px; /* Limite seguro para acomodar Constituição sem empurrar os controles */
  overflow: hidden;
}

.master-attr-name-text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Reticências automáticas para nomes que excederem o espaço */
  max-width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  transition: color 0.15s ease;
}

.master-attr-item.is-active .master-attr-name-text {
  color: #2ecc71;
}

.master-attr-sigla-sub {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  margin-top: 2px;
  line-height: 1;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.master-attr-item.is-active .master-attr-sigla-sub {
  color: rgba(46, 204, 113, 0.85);
}

/* Alinhado à direita: [Nome do Ícone] -> [Ícone] -> [Cor] */
.master-attr-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-shrink: 0; /* Imutável: nunca é espremido nem empurrado para fora */
}

/* Antepenúltimo: Nome do Ícone (tamanho levemente reduzido para caber nomes como Constituição) */
.master-attr-select-icon {
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  height: 28px;
  padding: 0 4px;
  outline: none;
  cursor: pointer;
  width: 82px;
  max-width: 82px;
  box-sizing: border-box;
}

.master-attr-select-icon:focus {
  border-color: var(--accent-orange);
}

/* Penúltimo: Ícone (Preview) */
.master-attr-preview-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1c202d;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.master-attr-preview-badge .attr-icon-mask {
  width: 16px;
  height: 16px;
}

/* Mais à direita: Cor (Color Picker) - Espaço com a borda direita fixo em 12px pelo padding do item */
.master-color-picker {
  -webkit-appearance: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.master-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.master-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}


/* Botão de Excluir Atributo Criado pelo Mestre (Clique e Segure) */
.btn-delete-attr {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff6b81;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
  padding: 0;
}

.btn-delete-attr:hover {
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
  color: #ff4757;
}

.btn-delete-attr .btn-del-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(255, 71, 87, 0.45);
  pointer-events: none;
  transition: height 0.05s linear;
}

.btn-delete-attr.is-holding .btn-del-fill {
  height: 100%;
  transition: height 0.9s linear;
}

/* Inputs de Fórmulas e Termos do Mestre */
.master-formula-input, .master-term-input {
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #fff;
  font-family: 'Inter', monospace;
  font-size: 11px;
  padding: 6px 10px;
  outline: none;
  width: 160px;
  transition: border-color 0.2s;
}

.master-formula-input:focus, .master-term-input:focus {
  border-color: var(--accent-orange);
}

/* Alerta de Fórmula Incompleta (Marcado em Vermelho) */
.master-formula-input.has-formula-error {
  border: 1.5px solid #ff4757 !important;
  background: rgba(255, 71, 87, 0.12) !important;
  color: #ff6b81 !important;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3) !important;
  animation: pulseFormulaError 1.5s infinite alternate;
}

@keyframes pulseFormulaError {
  0% { border-color: #ff4757; }
  100% { border-color: #ff6b81; }
}

.formula-error-msg {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #ff4757;
  margin-top: 3px;
}

.btn-add-attribute {
  background: rgba(232, 158, 115, 0.1);
  border: 1px dashed var(--accent-orange);
  border-radius: 8px;
  color: var(--accent-orange);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-add-attribute:hover {
  background: rgba(232, 158, 115, 0.2);
}

/* ========================================================
   MODAIS DARK FANTASY (CADASTRO E CONFIRMAÇÃO DE EXCLUSÃO)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-overlay.show,
.modal-overlay.active {
  display: flex;
  animation: fadeInModal 0.2s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #141824;
  border: 1px solid rgba(232, 158, 115, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(232, 158, 115, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.modal-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.modal-btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-btn-close:hover {
  color: #fff;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-input-text {
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
}

.modal-input-text:focus {
  border-color: var(--accent-orange);
}

.modal-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d1017;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.modal-warning-box {
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.4);
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.35;
  color: #ff6b81;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.modal-btn-confirm {
  flex: 1;
  background: var(--accent-orange);
  color: #0b0c10;
  border: none;
  border-radius: 7px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-confirm:hover {
  filter: brightness(1.15);
}

.modal-btn-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-btn-danger {
  flex: 1;
  background: #ff4757;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-danger:hover {
  background: #ff6b81;
}

/* ========================================================
   DROPDOWN AUTOCOMPLETE DE VARIÁVEIS [SIGLA]
   ======================================================== */
.formula-autocomplete-dropdown {
  position: fixed;
  background: #10141f;
  border: 1px solid var(--accent-orange);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 12px rgba(232, 158, 115, 0.2);
  border-radius: 8px;
  z-index: 10000;
  max-height: 180px;
  overflow-y: auto;
  width: 240px;
  display: none;
  padding: 5px;
  box-sizing: border-box;
}

.formula-autocomplete-dropdown.show {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeInModal 0.15s ease;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-primary);
  transition: all 0.15s ease;
  user-select: none;
}

.autocomplete-item:hover, .autocomplete-item.selected {
  background: rgba(232, 158, 115, 0.18);
  color: #fff;
}

.autocomplete-sigla {
  font-family: 'Roboto Condensed', monospace;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.5px;
}

.autocomplete-nome {
  font-size: 10px;
  color: var(--text-muted);
}

.readonly-mode {
  background: rgba(13, 16, 23, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
  cursor: default !important;
}

/* ========================================================
   CONTROLES DE AJUSTE MANUAL DE HP / MP (ATUALIZAR FICHA)
   ======================================================== */
.vital-value-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-vital-step {
  height: 20px;
  min-width: 20px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-vital-step.minus {
  background: rgba(231, 76, 60, 0.2);
  color: #ff6b81;
  border-color: rgba(231, 76, 60, 0.5);
}

.btn-vital-step.minus-bulk {
  background: rgba(192, 57, 43, 0.3);
  color: #ff4757;
  border-color: rgba(192, 57, 43, 0.7);
  font-size: 9.5px;
}

.btn-vital-step.plus {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.5);
}

.btn-vital-step.plus-bulk {
  background: rgba(39, 174, 96, 0.3);
  color: #2ecc71;
  border-color: rgba(39, 174, 96, 0.7);
  font-size: 9.5px;
}

.btn-vital-step:hover {
  transform: scale(1.08);
}

.btn-vital-step:active {
  transform: scale(0.95);
}

/* Pílulas de Debuffs Ativos na Ficha */
.debuffs-ativos-ficha-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: 6px;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 rgba(231, 76, 60, 0); }
  50% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.25); }
  100% { box-shadow: 0 0 0 rgba(231, 76, 60, 0); }
}

.debuff-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(231, 76, 60, 0.5);
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
}

.debuff-pill .pill-icon {
  font-size: 12px;
}

.debuff-pill .pill-burn {
  color: #ff6b81;
}

.debuff-pill .pill-duration {
  color: #ffd166;
  font-size: 9.5px;
}

/* ========================================================
   ESTILOS DA ABA DEBUFF NO PAINEL DO MESTRE
   ======================================================== */
.debuffs-config-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debuff-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(18, 21, 28, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  gap: 8px;
  transition: border-color 0.2s;
}

.debuff-config-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.debuff-config-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.debuff-icon-display {
  font-size: 16px;
  min-width: 22px;
  text-align: center;
}

.debuff-name-input {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 4px;
  flex: 1;
  transition: all 0.2s;
}

.debuff-name-input:focus {
  border-bottom-color: var(--accent-orange);
  outline: none;
  background: rgba(0, 0, 0, 0.3);
}

.debuff-status-badge-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.debuff-status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.debuff-status-pill.on {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid #2ecc71;
}

.debuff-status-pill.off {
  background: rgba(120, 144, 156, 0.15);
  color: #78909c;
  border: 1px solid rgba(120, 144, 156, 0.3);
}

.active-debuff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 6px;
}

.btn-remove-debuff {
  background: rgba(255, 71, 87, 0.2);
  border: 1px solid #ff4757;
  color: #ff6b81;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-remove-debuff:hover {
  background: #ff4757;
  color: #fff;
}

/* ========================================================
   ESTILOS DA TELA DE COMBATE & INICIATIVA
   ======================================================== */
.combat-fullscreen-view {
  background: var(--bg-deep);
  color: var(--text-primary);
  width: 100%;
}

.combat-header-card {
  background: linear-gradient(135deg, rgba(26, 30, 42, 0.95), rgba(18, 20, 29, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}

.combat-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.combat-status-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.combat-status-tag.inactive {
  background: rgba(149, 165, 166, 0.15);
  color: #bdc3c7;
  border: 1px solid rgba(149, 165, 166, 0.3);
}

.combat-status-tag.active {
  background: rgba(231, 76, 60, 0.2);
  color: #ff6b81;
  border: 1px solid #e74c3c;
  animation: pulseGlow 2s infinite ease-in-out;
}

.btn-combat-start {
  background: linear-gradient(135deg, #e67e22, #d35400);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-combat-start:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.btn-combat-start.active-combat {
  background: linear-gradient(135deg, #c0392b, #962d22);
}

.combat-turn-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  gap: 8px;
}

.round-counter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.round-label {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.round-number {
  font-size: 16px;
  font-weight: 800;
  color: #ffd166;
  line-height: 1.1;
}

.current-turn-hero-box {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 6px;
}

.turn-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}

.turn-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.btn-next-turn {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-next-turn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.ordem-resumo-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #ffd166;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Fita Horizontal de Combatentes */
.combat-order-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px 2px;
}

.combat-fighter-card {
  min-width: 120px;
  background: rgba(18, 22, 31, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: all 0.2s;
  user-select: none;
}

.combat-fighter-card.active-turn {
  border-color: #ffd166;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.15), rgba(18, 22, 31, 0.95));
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.3);
  transform: translateY(-2px);
}

.fighter-turn-indicator {
  position: absolute;
  top: -6px;
  font-size: 8.5px;
  font-weight: 800;
  background: #ffd166;
  color: #000;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-prontidao {
  font-size: 8px;
  font-weight: 800;
  background: rgba(241, 196, 15, 0.25);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.6);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 3px;
  text-transform: uppercase;
}

.combat-rolls-log {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 8px;
}

.combat-roll-item {
  font-size: 11.5px;
  color: #e6edf3;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.combat-roll-item.prontidao-log {
  border-left: 3px solid #f1c40f;
  background: rgba(241, 196, 15, 0.05);
}

/* ========================================================
   NOVA HUD SUPERIOR (CIMA): WIDGET DE SISTEMA & LATÊNCIA
   [Hora, Bateria, Internet] | [FICHA] | [NOTCH] | [AÇÕES] | [Latência]
   ======================================================== */
.nav-system-status-widget,
.nav-latency-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 50px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin: 4px 3px;
  user-select: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-system-status-widget {
  cursor: default;
}

.nav-latency-widget {
  cursor: pointer;
}

.nav-latency-widget:hover {
  background: rgba(46, 204, 113, 0.08);
  border-color: rgba(46, 204, 113, 0.25);
}

/* Espaçador flexível de Notch na HUD Superior */
.hud-notch-spacer {
  display: none;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

/* Modos de Notch Aplicáveis à Barra Superior */
.nav-tab-bar.hud-notch-center .hud-notch-spacer {
  display: block;
  width: 36px;
  height: 100%;
}

.nav-tab-bar.hud-notch-left {
  padding-left: 28px !important;
}

.nav-tab-bar.hud-notch-right {
  padding-right: 28px !important;
}

.latency-status-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
}

.latency-dot {
  width: 5.5px;
  height: 5.5px;
  min-width: 5.5px;
  min-height: 5.5px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.85);
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.latency-val {
  font-family: 'Roboto Condensed', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.3px;
  line-height: 1;
}

.latency-tag {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.2px;
  line-height: 1;
  margin-top: 3px;
}

/* Notificação Badge na aba superior */
.nav-tab-item .notif-count-badge {
  position: absolute;
  top: 4px;
  right: 14px;
  background: #ff4757;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 8px;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 6px rgba(255, 71, 87, 0.6);
}

/* ========================================================
   BARRA INFERIOR (BAIXO): TOGGLES CÂMERA, MIC, MEET, RESERVADO
   ======================================================== */
.nav-tab-item.toggle-btn {
  user-select: none;
}

.nav-tab-item.disabled-tab {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-tab-item.disabled-tab:hover {
  color: #8d96a7;
}

.nav-tab-item .btn-sub-state {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: capitalize;
  line-height: 1;
}

.nav-tab-item .btn-sub-state.active-state {
  color: #2ecc71;
}

.nav-tab-item .btn-sub-state.inactive-state {
  color: #78909c;
}

.nav-tab-item .btn-sub-state.danger-state {
  color: #ff4757;
}

/* ========================================================
   HUB DE AÇÕES (#view-acoes) & SUB-ABAS
   [DADOS] | [GRID] | [COMBATE] | [BUFF / DEBUFF]
   ======================================================== */
#view-acoes {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

#view-acoes.active {
  display: flex;
}

.actions-hub-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Barra de Navegação Interna de Ações */
.actions-subnav-bar {
  background: #11141d;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.actions-subnav-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: 7px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.actions-subnav-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  color: inherit;
}

.actions-subnav-btn:hover {
  background: rgba(232, 158, 115, 0.1);
  color: #fff;
  border-color: rgba(232, 158, 115, 0.4);
}

.actions-subnav-btn.active {
  background: linear-gradient(135deg, #d97736 0%, #a84f18 100%);
  border-color: #f39c12;
  color: #fff;
  box-shadow: 0 2px 10px rgba(217, 119, 54, 0.45);
}

/* Área de Conteúdo das Sub-abas de Ações */
.actions-subpane-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.acao-subpane {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  height: 100%;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
  -webkit-overflow-scrolling: touch;
}

.acao-subpane.active {
  display: flex;
}

/* A sub-aba de Dados preenche 100% sem padding nem overflow para a barra colar perfeitamente na HUD inferior */
.acao-subpane.dice-system-main-view {
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1;
  min-height: 0;
}

/* Placeholder Temático para Grid e Dados */
.placeholder-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 240px;
}

.placeholder-action-icon {
  font-size: 38px;
  color: var(--accent-orange);
  filter: drop-shadow(0 0 12px rgba(232, 158, 115, 0.4));
}

.placeholder-action-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffd166;
  letter-spacing: 0.5px;
}

.placeholder-action-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 320px;
}

/* ========================================================
   CENTRAL DE NOTIFICAÇÕES (#view-notificacoes)
   Feed em Tempo Real com Filtros de Mesa
   ======================================================== */
#view-notificacoes {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

#view-notificacoes.active {
  display: flex;
}

.notif-fullscreen-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Barra de Filtros de Notificação */
.notif-filters-bar {
  background: #11141d;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
}

.notif-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.notif-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.notif-filter-btn.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #0e1117;
  font-weight: 800;
  box-shadow: 0 2px 8px var(--accent-orange-glow);
}

/* Feed Stream de Notificações */
.notif-feed-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.notif-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  transition: all 0.2s;
}

.notif-card-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.notif-card-item.combate {
  border-left: 3px solid #ff4757;
}

.notif-card-item.debuff {
  border-left: 3px solid #e67e22;
}

.notif-card-item.cura {
  border-left: 3px solid #2ecc71;
}

.notif-card-item.mestre {
  border-left: 3px solid #ffd166;
}

.notif-card-item.sistema {
  border-left: 3px solid #38bdf8;
}

.notif-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notif-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-sender-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #e6edf3;
  letter-spacing: 0.3px;
}

.notif-timestamp-tag {
  font-size: 9.5px;
  color: var(--text-muted);
}

.notif-body-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.notif-highlight-val {
  font-weight: 800;
  color: #ffd166;
}

/* ========================================================
   TELA DE VÍDEOCALL / MEET (#view-meet)
   Grade 2x3 de Câmeras Imersivas para a Mesa
   ======================================================== */
#view-meet {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0a0d13;
  padding: 12px;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

#view-meet.active {
  display: flex;
}

.meet-fullscreen-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}

.meet-header-banner {
  background: linear-gradient(135deg, #181d28 0%, #12151e 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.meet-header-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #ffd166;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meet-cameras-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 130px;
  gap: 8px;
  flex: 1;
}

.meet-cam-card {
  background: #11141e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.meet-cam-card.talking {
  border-color: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.meet-cam-avatar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: grayscale(40%);
}

.meet-cam-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.meet-cam-role-pill {
  font-size: 8.5px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffd166;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.meet-cam-audio-indicator {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 5px;
  border-radius: 4px;
}

.audio-bar-wave {
  width: 2.5px;
  height: 8px;
  background: #2ecc71;
  border-radius: 2px;
  animation: waveAudio 1s infinite ease-in-out;
}

.audio-bar-wave:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.audio-bar-wave:nth-child(3) { height: 6px; animation-delay: 0.4s; }

@keyframes waveAudio {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.meet-cam-bot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 6px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.meet-cam-name {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-cam-ping {
  font-size: 8.5px;
  color: #2ecc71;
  font-weight: 700;
}

/* ========================================================
   SPLASH SCREEN DE ABERTURA CINEMATOGRÁFICA (ESTILO NETFLIX)
   ======================================================== */
.splash-screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #1a1512 0%, #080a0f 70%, #040508 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  user-select: none;
  cursor: pointer;
  animation: splashFadeIn 0.4s ease forwards;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  animation: splashFadeIn 0.5s ease forwards;
}

/* Contêiner do Brasão D20 / Infinity Dice */
.splash-infinity-crest-wrap {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  animation: infinityCrestFreezeGrow 7.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.splash-infinity-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* Cobrinha de Luz Dourada Rúnica (Traçado 1 única vez) */
.splash-infinity-svg .snake-runner {
  stroke: #ffd166;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 71 2000; /* 71 = 1 volta exata do Infinito; gap 2000 impede reiniciar no começo */
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.95)) drop-shadow(0 0 20px rgba(217, 119, 54, 0.7));
  animation: crawlInfinityDiceOnce 7.2s linear forwards;
}

/* Estrutura final consolidada que surge e congela para sempre */
.splash-infinity-svg .solid-result {
  opacity: 0;
  animation: showSolidResultOnce 7.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  filter: drop-shadow(0 0 12px rgba(255, 209, 102, 0.6)) drop-shadow(0 0 24px rgba(217, 119, 54, 0.4));
}

/* Tipografia "Infinity Dice" (Infinity em cima, Dice em baixo) */
.splash-infinity-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: textInfinityReveal 7.2s ease forwards;
  user-select: none;
  margin-top: 4px;
}

.splash-infinity-title-top {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1.1;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #ffd166 60%, #d97736 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 15px rgba(217, 119, 54, 0.55));
}

.splash-infinity-title-bottom {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 8px;
  line-height: 1.2;
  text-align: center;
  margin-top: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #ffd166 60%, #d97736 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 15px rgba(217, 119, 54, 0.55));
}

/* Animações Core da Abertura */
@keyframes crawlInfinityDiceOnce {
  0% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  72%, 100% {
    stroke-dashoffset: -929; /* Para e permanece estacionada 100% no símbolo do Infinito [929..1000] */
    opacity: 1;
  }
}

@keyframes showSolidResultOnce {
  0%, 70% {
    opacity: 0;
  }
  77%, 100% {
    opacity: 1; /* Permanece congelado e consolidado */
  }
}

@keyframes infinityCrestFreezeGrow {
  0%, 73% {
    transform: scale(1);
    filter: drop-shadow(0 0 14px rgba(232, 158, 115, 0.4));
  }
  80% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 22px rgba(255, 209, 102, 0.7));
  }
  88%, 100% {
    transform: scale(1.08); /* Crescimento suave no congelamento */
    filter: drop-shadow(0 0 30px rgba(255, 209, 102, 0.95)) drop-shadow(0 0 45px rgba(217, 119, 54, 0.5));
  }
}

@keyframes textInfinityReveal {
  0%, 75% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  84%, 100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================================
   TELA INICIAL DE BOAS-VINDAS / LOBBY (#view-lobby)
   SALA DE ESPERA EM TEMPO REAL
   ======================================================== */
.lobby-screen-fullscreen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden; /* Apenas o container de mesas terá scroll */
  padding: 16px 14px 14px;
  gap: 10px;
  background: linear-gradient(180deg, #10141d 0%, #0a0d13 100%);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

/* 0. Banner Título da Taverna no Topo (Transição 70%-95%) */
.lobby-banner-top-wrap {
  width: calc(100% + 28px);
  margin: -16px -14px 2px -14px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.lobby-banner-top-img {
  width: 100%;
  max-height: 180px;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0) 100%);
}

.lobby-banner-fade-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, transparent 70%, #10141d 95%, #10141d 100%);
}

.btn-fullscreen-toggle {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(16, 20, 29, 0.75);
  border: 1px solid rgba(248, 194, 145, 0.4);
  color: #f8c291;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  z-index: 25;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.btn-fullscreen-toggle:active {
  transform: scale(0.92);
  background: rgba(248, 194, 145, 0.25);
}

/* 1. Cabeçalho de Boas-Vindas (Inline compacto) */
.lobby-header-section {
  flex-shrink: 0;
  padding: 0 2px;
}

.lobby-welcome-box {
  display: flex;
  align-items: center;
}

.lobby-welcome-inline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.lobby-welcome-prefix {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.4px;
}

.lobby-welcome-user-inline {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  font-weight: 900;
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.45);
}

/* 2. Título Centralizado Sala de Espera */
.lobby-waiting-room-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 1px 0 2px;
}

.lobby-waiting-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lobby-waiting-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: #e89e73;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  text-align: center;
}

.lobby-waiting-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
  animation: pulseDot 2s infinite ease-in-out;
}

/* ==========================================================================
   PAINEL DE ACESSO RÁPIDO PARA TESTERS (MESTRE X JOGADOR NO LOBBY)
   ========================================================================== */
.lobby-tester-control-box {
  flex-shrink: 0;
  margin: 6px 0 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(26, 32, 44, 0.96) 0%, rgba(16, 20, 29, 0.98) 100%);
  border: 1px solid rgba(232, 158, 115, 0.35);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tester-control-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.tester-shield-icon {
  font-size: 13px;
}

.tester-title {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  flex: 1;
}

.tester-badge-tag {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: rgba(232, 158, 115, 0.2);
  color: #e89e73;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(232, 158, 115, 0.4);
}

.tester-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-tester-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(20, 24, 33, 0.9);
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.btn-tester-action:active {
  transform: scale(0.97);
}

.btn-tester-mestre {
  border: 1.5px solid rgba(255, 209, 102, 0.45);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.12) 0%, rgba(217, 119, 54, 0.08) 100%);
  box-shadow: 0 2px 10px rgba(255, 209, 102, 0.08);
}

.btn-tester-mestre:hover,
.btn-tester-mestre:active {
  border-color: #ffd166;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.22) 0%, rgba(217, 119, 54, 0.16) 100%);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.25);
}

.btn-tester-jogador {
  border: 1.5px solid rgba(46, 204, 113, 0.45);
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12) 0%, rgba(39, 174, 96, 0.08) 100%);
  box-shadow: 0 2px 10px rgba(46, 204, 113, 0.08);
}

.btn-tester-jogador:hover,
.btn-tester-jogador:active {
  border-color: #2ecc71;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.22) 0%, rgba(39, 174, 96, 0.16) 100%);
  box-shadow: 0 0 14px rgba(46, 204, 113, 0.25);
}

.tester-btn-icon {
  font-size: 19px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tester-btn-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.tester-btn-role {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-tester-mestre .tester-btn-role {
  color: #ffd166;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.35);
}

.btn-tester-jogador .tester-btn-role {
  color: #2ecc71;
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.35);
}

.tester-btn-desc {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  color: #a4b0be;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tester-btn-arrow {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.btn-tester-mestre:active .tester-btn-arrow {
  color: #ffd166;
  transform: translateX(2px);
}

.btn-tester-jogador:active .tester-btn-arrow {
  color: #2ecc71;
  transform: translateX(2px);
}

/* Ocultação do Editor de Cenas do Grid para o Jogador */
body.role-is-jogador #tab-btn-drawer-editor {
  display: none !important;
}
body.role-is-jogador #pane-drawer-editor {
  display: none !important;
}

/* 3. Bloco das Mesas Existentes - ÚNICO SCROLL DA TELA */
.lobby-tables-scroll-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}

.lobby-tables-scroll-container::-webkit-scrollbar {
  width: 5px;
}

.lobby-tables-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.lobby-tables-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(232, 158, 115, 0.35);
  border-radius: 4px;
}

.lobby-tables-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* Card Retangular das Mesas */
.lobby-table-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(232, 158, 115, 0.22);
  background: #121620;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: all 0.22s ease;
  min-height: 114px;
}

.lobby-table-card:hover {
  border-color: #ffd166;
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.25);
  transform: translateY(-2px);
}

.lobby-table-card.active-test-table {
  border-color: rgba(255, 209, 102, 0.4);
}

/* Camada de Background dos Cards com imagens temáticas */
.table-card-bg-layer {
  position: absolute;
  inset: 0;
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}

/* Background Sala 1: Medieval */
.table-bg-crypt {
  background-image: 
    linear-gradient(to right, #0e1117 0%, rgba(14, 17, 23, 0.92) 28%, rgba(14, 17, 23, 0.65) 65%, rgba(14, 17, 23, 0.35) 100%),
    url('../img/bg_character_landscape.jpg');
}

/* Background Sala 2: Survivor */
.table-bg-survivor {
  background-image: 
    linear-gradient(to right, #0d1210 0%, rgba(13, 18, 16, 0.93) 28%, rgba(20, 28, 24, 0.65) 65%, rgba(28, 38, 32, 0.35) 100%),
    url('../img/bg_table_survivor.jpg');
}

/* Background Sala 3: Cyberpunk */
.table-bg-cyberpunk {
  background-image: 
    linear-gradient(to right, #080d1a 0%, rgba(8, 13, 26, 0.93) 28%, rgba(15, 22, 45, 0.65) 65%, rgba(22, 32, 65, 0.35) 100%),
    url('../img/bg_table_cyberpunk.jpg');
}

/* Background Sala 4: Medieval (Sombra) */
.table-bg-sombras {
  background-image: 
    linear-gradient(to right, #0b0f19 0%, rgba(11, 15, 25, 0.93) 28%, rgba(15, 20, 36, 0.65) 65%, rgba(20, 25, 48, 0.35) 100%),
    url('../img/bg_character_landscape.jpg');
  filter: hue-rotate(220deg) saturate(1.1);
}

/* Background Sala 5: Cyberpunk (Mercado Clandestino / Neon Púrpura) */
.table-bg-cyberpunk-alt {
  background-image: 
    linear-gradient(to right, #12091c 0%, rgba(18, 9, 28, 0.93) 28%, rgba(35, 14, 52, 0.65) 65%, rgba(52, 18, 76, 0.35) 100%),
    url('../img/bg_table_cyberpunk.jpg');
  filter: hue-rotate(60deg) saturate(1.2);
}

/* Conteúdo interno do Card */
.table-card-content {
  position: relative;
  z-index: 2;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-card-badge {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.table-card-badge.access-public {
  background: rgba(46, 204, 113, 0.16);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.table-card-badge.access-private {
  background: rgba(231, 76, 60, 0.16);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.table-card-style-tag {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: #c5cad6;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-card-style-tag.tag-survivor {
  background: rgba(230, 126, 34, 0.2);
  color: #f39c12;
  border-color: rgba(243, 156, 18, 0.4);
}

.table-card-style-tag.tag-cyberpunk {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.4);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.35);
}


.table-card-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.table-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-card-meta b {
  color: #ffd166;
  font-weight: 700;
}

.table-card-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1px;
  padding-bottom: 2px;
}

.btn-enter-table-action {
  background: linear-gradient(135deg, #d97736 0%, #b85d20 100%);
  color: #ffffff;
  border: 1px solid #ffd166;
  border-radius: 6px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(217, 119, 54, 0.4);
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-enter-table-action:hover {
  filter: brightness(1.18);
  transform: translateX(2px);
  box-shadow: 0 3px 12px rgba(255, 209, 102, 0.4);
}

.btn-enter-table-action.btn-fake-table {
  background: rgba(25, 30, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #abb2bf;
  box-shadow: none;
}

.btn-enter-table-action.btn-fake-table:hover {
  background: rgba(35, 42, 58, 0.95);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* 4. Rodapé Fixo com Botão "Criar uma mesa de RPG" */
.lobby-footer-section {
  flex-shrink: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-create-rpg-table {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ffd166;
  background: linear-gradient(135deg, #222838 0%, #151923 100%);
  color: #ffd166;
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.btn-create-rpg-table:hover {
  background: linear-gradient(135deg, #d97736 0%, #b85d20 100%);
  color: #ffffff;
  border-color: #ffd166;
  box-shadow: 0 4px 18px rgba(217, 119, 54, 0.45);
  transform: translateY(-1px);
}

.btn-create-icon {
  font-size: 15px;
}

/* ========================================================
   5. MODAL / TELA DE CRIAÇÃO DE NOVA MESA DE RPG
   ======================================================== */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 0;
  animation: fadeIn 0.2s ease;
  box-sizing: border-box;
}

.modal-box-create-table {
  background: linear-gradient(180deg, #151923 0%, #0c0f16 100%);
  border: none;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9);
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.2s ease;
}

@media (min-width: 500px) {
  .modal-backdrop-custom {
    padding: 12px;
  }
  .modal-box-create-table {
    border-radius: 14px;
    border: 1px solid rgba(255, 209, 102, 0.35);
    max-height: 94vh;
  }
}

.modal-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.create-header-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.create-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 15.5px;
  font-weight: 800;
  color: #ffd166;
  margin: 0;
  letter-spacing: 0.5px;
}

.create-modal-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
  margin: 0;
}

.btn-close-create-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.btn-close-create-modal:hover {
  color: #e74c3c;
}

.modal-create-body {
  padding: 10px 16px;
  overflow: hidden; /* Não gera scroll */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.create-form-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.create-section-tag {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.form-group-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.create-field-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #c5cad6;
}

.create-text-input,
.create-select-input,
.create-number-input {
  width: 100%;
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #ffffff;
  padding: 7px 9px;
  font-size: 11.5px;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.create-text-input:focus,
.create-select-input:focus,
.create-number-input:focus {
  outline: none;
  border-color: #ffd166;
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.2);
}

/* Uploader de Capa e Chips Rápidos */
.custom-cover-uploader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cover-preview-thumb {
  width: 70px;
  height: 42px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid #ffd166;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: all 0.2s;
}

.cover-uploader-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-upload-cover-trigger {
  background: rgba(255, 209, 102, 0.12);
  border: 1px dashed rgba(255, 209, 102, 0.45);
  color: #ffd166;
  border-radius: 5px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.btn-upload-cover-trigger:hover {
  background: rgba(255, 209, 102, 0.2);
  border-color: #ffd166;
}

.quick-covers-chips {
  display: flex;
  gap: 5px;
}

.chip-cover-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c5cad6;
  border-radius: 4px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-cover-btn.active {
  background: rgba(217, 119, 54, 0.3);
  border-color: #ffd166;
  color: #ffd166;
  font-weight: 800;
}

/* Seletor de Avatares estilo Netflix */
.netflix-avatar-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
}

.netflix-avatar-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  background: #090c12;
}

.netflix-avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.netflix-avatar-item:hover {
  transform: scale(1.08);
  border-color: rgba(255, 209, 102, 0.6);
}

.netflix-avatar-item.selected {
  border-color: #ffd166;
  transform: scale(1.12);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.7);
}

.netflix-avatar-item .avatar-check-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #2ecc71;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #000;
}

.netflix-avatar-item.selected .avatar-check-badge {
  display: flex;
}

.modal-create-footer {
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.btn-cancel-create-table {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel-create-table:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-confirm-create-table {
  flex: 1;
  background: linear-gradient(135deg, #d97736 0%, #b85d20 100%);
  border: 1px solid #ffd166;
  color: #ffffff;
  border-radius: 6px;
  padding: 9px 12px;
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(217, 119, 54, 0.4);
  text-align: center;
}

.btn-confirm-create-table:hover {
  filter: brightness(1.15);
  box-shadow: 0 3px 14px rgba(255, 209, 102, 0.4);
}


/* Badge Fixa Indicadora de Papel nas Configurações */
.role-indicator-badge-fixed {
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.3);
  color: var(--accent-gold);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  user-select: none;
  transition: all 0.25s ease;
}

.role-indicator-badge-fixed.mestre {
  background: rgba(255, 209, 102, 0.12) !important;
  border-color: rgba(255, 209, 102, 0.45) !important;
  color: var(--accent-gold) !important;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.18);
}

.role-indicator-badge-fixed.jogador {
  background: rgba(46, 204, 113, 0.12) !important;
  border-color: rgba(46, 204, 113, 0.45) !important;
  color: #2ecc71 !important;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.18);
}

/* ========================================================
   CENTRALIZAÇÃO UNIVERSAL DE CAMPOS DE ENTRADA (INPUTS)
   ======================================================== */
input, select, textarea,
.config-field-input,
.master-term-input,
.create-text-input,
.create-select-input,
.master-campaign-name-input,
.character-name-input,
.table-access-input {
  text-align: center !important;
}

/* ========================================================
   BOTÃO PROMINENTE DE SAIR DA MESA
   ======================================================== */
.btn-leave-table-prominent {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.25), rgba(231, 76, 60, 0.15));
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: #ff6b81;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-leave-table-prominent:hover {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.4), rgba(231, 76, 60, 0.3));
  border-color: #e74c3c;
  color: #fff;
  transform: translateY(-1px);
}

.btn-leave-table-prominent:active {
  transform: scale(0.96);
}

/* ========================================================
   MODAL DE SELEÇÃO DE JOGADORES PARA RESET DE PONTOS
   ======================================================== */
.players-reset-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.player-reset-radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-reset-radio-item:hover {
  background: rgba(255, 118, 117, 0.08);
  border-color: rgba(255, 118, 117, 0.35);
}

.player-reset-radio-item input[type="radio"] {
  accent-color: #ff7675;
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.player-reset-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-reset-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f2f6;
}

.player-reset-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Restrição da linha de reset para jogadores */
body.role-is-jogador .mestre-only-reset-row {
  display: none !important;
}

/* ========================================================
   SISTEMA DE DADOS 3D (AÇÕES > DADOS)
   1. Região Superior: Escolha dos Dados (Alinhada à Ficha)
   2. Região Inferior: Região de Lançamento (Arena 3D)
   ======================================================== */
.dice-system-main-view {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: 100% !important;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* 1. Região Superior: Escolha dos Dados (Cards Balanceados em 2 Linhas) */
.dice-selection-top-section {
  width: 100%;
  height: auto;
  min-height: 154px;
  max-height: 162px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #151923 0%, #10141d 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  z-index: 5;
  box-sizing: border-box;
}

/* Grade Balanceada em 2 Linhas para os Dados */
.dice-selector-balanced-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.dice-row-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

/* Card Individual de Cada Dado */
.dice-picker-pill {
  flex: 1;
  min-width: 0;
  height: 68px;
  max-height: 70px;
  background: rgba(16, 20, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px 5px 7px;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dice-picker-pill.has-selection {
  border: 1.5px solid #ffd166 !important;
  background: rgba(255, 209, 102, 0.08);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.25), inset 0 0 6px rgba(255, 209, 102, 0.05);
}

/* Coluna Esquerda: Título / Subtítulo e Ícone Marca d'Água */
.dice-card-left-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
  padding-right: 4px;
}

.dice-card-title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.dice-type-title {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.3px;
}

.dice-type-sub {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  opacity: 0.95;
}

.dice-icon-poly-bg {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.30;
  margin-top: auto;
  margin-bottom: 2px;
  align-self: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dice-picker-pill.has-selection .dice-icon-poly-bg {
  opacity: 0.55;
}

.dice-icon-poly-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

/* Coluna Direita: Botão ▲, Display de Qtd e Botão ▼ */
.dice-spinners-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 22px;
  flex-shrink: 0;
  z-index: 3;
}

.btn-dice-spin {
  width: 22px;
  height: 18px;
  min-height: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f2f6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-dice-spin:active {
  transform: scale(0.92);
  background: rgba(255, 209, 102, 0.25);
  border-color: #ffd166;
  color: #ffd166;
}

.dice-qty-display {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Condensed', monospace;
  font-size: 15px;
  font-weight: 800;
  color: #8d96a7;
  text-align: center;
  line-height: 1;
  margin: 1px 0;
}

.dice-picker-pill.has-selection .dice-qty-display {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* 2. Região Inferior: Região de Lançamento (Arena 3D) */
.dice-throwing-arena-region {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #1b202e 0%, #0c0f15 100%);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
  transition: background 0.3s ease;
}

/* Animações Visuais Exclusivas para 'A Regra do D20' Solitário */
@keyframes d20CriticalSuccessAura {
  0% {
    box-shadow: inset 0 0 0px rgba(46, 204, 113, 0);
  }
  20% {
    box-shadow: inset 0 0 80px rgba(46, 204, 113, 0.95), 0 0 50px rgba(46, 204, 113, 0.6);
  }
  50% {
    box-shadow: inset 0 0 60px rgba(46, 204, 113, 0.7);
  }
  100% {
    box-shadow: inset 0 0 0px rgba(46, 204, 113, 0);
  }
}

/* Tremor Sísmico de Alta Frequência (Terremoto Rápido) no Erro Crítico */
@keyframes d20EarthquakeShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  6% { transform: translate(-8px, 5px) rotate(-1.5deg); }
  12% { transform: translate(8px, -6px) rotate(1.4deg); }
  18% { transform: translate(-9px, 4px) rotate(-1.2deg); }
  24% { transform: translate(7px, -5px) rotate(1.1deg); }
  30% { transform: translate(-6px, 6px) rotate(-0.9deg); }
  36% { transform: translate(6px, -4px) rotate(0.8deg); }
  42% { transform: translate(-5px, 3px) rotate(-0.6deg); }
  48% { transform: translate(4px, -3px) rotate(0.5deg); }
  56% { transform: translate(-3px, 2px) rotate(-0.3deg); }
  65% { transform: translate(3px, -2px) rotate(0.2deg); }
  75% { transform: translate(-2px, 1px) rotate(-0.1deg); }
  85% { transform: translate(1px, -1px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes d20CriticalFailureVignette {
  0% { box-shadow: inset 0 0 0px rgba(231, 76, 60, 0); }
  10% { box-shadow: inset 0 0 95px rgba(231, 76, 60, 0.95); }
  35% { box-shadow: inset 0 0 70px rgba(231, 76, 60, 0.75); }
  65% { box-shadow: inset 0 0 35px rgba(231, 76, 60, 0.35); }
  100% { box-shadow: inset 0 0 0px rgba(231, 76, 60, 0); }
}

.dice-throwing-arena-region.d20-critico-acerto-anim {
  animation: d20CriticalSuccessAura 2.4s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.dice-throwing-arena-region.d20-critico-erro-anim {
  animation: d20EarthquakeShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both, d20CriticalFailureVignette 2.0s ease-out forwards !important;
}

/* Estado Bloqueado da Barra de Instrução durante Rolagem (Anti-Cheat) */
.dice-swipe-instruction-bar.locked {
  opacity: 0.60 !important;
  pointer-events: none !important;
  cursor: wait !important;
  border-color: rgba(255, 209, 102, 0.15) !important;
}

.dice-swipe-instruction-bar.locked .swipe-arrow-anim {
  animation: none !important;
  opacity: 0.3 !important;
}

/* Modo Transparente quando 'Rolar dados na ficha' está ativado */
.dice-throwing-arena-region.mode-roll-on-sheet {
  background: transparent !important;
  box-shadow: none !important;
}

/* Espelho da Ficha sob a Região de Lançamento */
.dice-sheet-underlay-mirror {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 10px 14px 80px;
  pointer-events: none;
  opacity: 0.88;
  z-index: 1;
}

/* Canvas e Container de Física dos Dados 3D */
.dice-physics-canvas,
.dice-box-3d-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.dice-box-3d-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* Controles do Rodapé da Região de Lançamento */
.dice-tray-bottom-controls {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 25;
  pointer-events: auto;
}

/* 3. Rodapé da Aba de Dados: Instrução de Lançamento + Sliders Lado a Lado */
.dice-footer-controls-container {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(20, 25, 36, 0.98) 0%, rgba(10, 13, 19, 1) 100%);
  border-top: 1px solid rgba(255, 209, 102, 0.28);
  padding: 8px 14px 10px;
  box-sizing: border-box;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
  z-index: 20;
  flex-shrink: 0;
  gap: 7px;
  margin: 0 !important;
}

.dice-swipe-instruction-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  min-height: auto !important;
  box-shadow: none !important;
  cursor: pointer;
  user-select: none;
  touch-action: pan-y;
  transition: opacity 0.2s ease;
}

.dice-swipe-instruction-bar:active {
  opacity: 0.8;
}

.swipe-hand-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.swipe-instruction-text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #dcdde1;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Linha 2: Sliders de Velocidade e Tamanho Lado a Lado */
.dice-footer-sliders-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.dice-footer-slider-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.dice-slider-label {
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(255, 209, 102, 0.25);
  flex-shrink: 0;
}

.dice-compact-range {
  flex: 1;
  min-width: 45px;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: #ffd166;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.dice-compact-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #dcdde1;
  border: 2px solid #57606f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.dice-compact-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  border-color: #ffd166;
}

.dice-compact-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #dcdde1;
  border: 2px solid #57606f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.dice-compact-range::-moz-range-track {
  background: #ffd166;
  height: 3px;
  border-radius: 2px;
}

/* Checkbox com Fundo 50% Transparente */
.dice-roll-on-sheet-checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 20, 29, 0.5) !important; /* 50% Transparente solicitado */
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  backdrop-filter: blur(5px);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.dice-roll-on-sheet-checkbox-pill:hover {
  background: rgba(16, 20, 29, 0.7) !important;
  border-color: rgba(255, 209, 102, 0.4);
}

.dice-roll-on-sheet-checkbox-pill input[type="checkbox"] {
  display: none;
}

.custom-chk-square {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dice-roll-on-sheet-checkbox-pill input[type="checkbox"]:checked + .custom-chk-square {
  background: #ffd166;
  border-color: #ffd166;
  box-shadow: 0 0 6px rgba(255, 209, 102, 0.6);
}

.dice-roll-on-sheet-checkbox-pill input[type="checkbox"]:checked + .custom-chk-square::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  background-color: #10141d;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
  forced-color-adjust: none;
}

.chk-label-text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #f1f2f6;
  letter-spacing: 0.3px;
}

/* Card Flutuante de Resultado */
.dice-floating-result-banner {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  background: rgba(16, 20, 29, 0.92);
  border: 1px solid rgba(255, 209, 102, 0.5);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 209, 102, 0.2);
  backdrop-filter: blur(8px);
  z-index: 30;
  animation: slideDownBanner 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.dice-result-badge-sum {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  color: #ffd166;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.6);
}

.dice-result-breakdown {
  flex: 1;
  font-size: 11.5px;
  color: #fff;
  line-height: 1.35;
  text-align: left;
}

.btn-close-result-banner {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-close-result-banner:hover {
  color: #fff;
}

/* Painel do Mestre: Grid de Toggles dos 18 Dados Permitidos (3 Colunas) */
.dice-master-toggles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.dice-master-toggle-card {
  background: linear-gradient(145deg, rgba(20, 25, 36, 0.9) 0%, rgba(13, 16, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 102px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.dice-master-toggle-card:hover {
  border-color: rgba(255, 209, 102, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.dice-master-toggle-card.active {
  border-color: rgba(255, 209, 102, 0.55);
  background: linear-gradient(145deg, rgba(32, 40, 56, 0.92) 0%, rgba(18, 24, 35, 0.95) 100%);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.12), inset 0 0 10px rgba(255, 209, 102, 0.04);
}

.dice-master-toggle-card.long-pressing {
  transform: scale(0.96);
  border-color: var(--accent-orange) !important;
  box-shadow: 0 0 16px rgba(232, 158, 115, 0.5) !important;
}

.dice-master-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dice-svg-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.dice-master-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  gap: 2px;
}

.dice-master-card-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  line-height: 1.2;
}

.dice-master-card-faces {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
}

.dice-master-card-action {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rodapé Explicativo (Toque e Segure) */
.dice-master-instruction-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #ffd166;
  opacity: 0.88;
  font-style: italic;
  margin-top: 10px;
  padding: 6px 10px;
  background: rgba(255, 209, 102, 0.05);
  border: 1px dashed rgba(255, 209, 102, 0.2);
  border-radius: 6px;
  text-align: center;
}

.dice-footnote-hand {
  font-style: normal;
  animation: pulseHand 1.8s infinite ease-in-out;
}

@keyframes pulseHand {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Modal Explicativo de Detalhes e Frases/Memes do Dado */
.dice-detail-modal-card {
  max-width: 360px !important;
  background: linear-gradient(135deg, #131722 0%, #0d1017 100%) !important;
  border: 1px solid var(--accent-orange) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(232, 158, 115, 0.2) !important;
  padding: 16px 18px !important;
}

.dice-detail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.dice-detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dice-detail-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-radius: 10px;
  padding: 6px;
  box-shadow: inset 0 0 10px rgba(255, 209, 102, 0.1);
}

.dice-detail-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dice-detail-desc-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: #cfd6e0;
  margin: 0 0 14px;
}

.dice-detail-meme-box {
  background: rgba(232, 158, 115, 0.07);
  border-left: 3px solid var(--accent-orange);
  border-radius: 4px 8px 8px 4px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.dice-meme-quote-icon {
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1;
  color: var(--accent-orange);
  opacity: 0.6;
}

.dice-detail-meme-text {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-style: italic;
  color: #ffd166;
  line-height: 1.45;
  margin: 0;
}

/* Seletor de Cores de Dados 3D (Preferência Individual do Usuário) */
.dice-color-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}

.dice-color-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 18, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 9px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #cfd6e0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.dice-color-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.dice-color-btn.active {
  border-color: #ffd166;
  background: rgba(255, 209, 102, 0.14);
  color: #ffd166;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.25);
}

.dice-color-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  box-sizing: border-box;
}

.dice-color-btn.btn-random {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.18), rgba(52, 152, 219, 0.18), rgba(46, 204, 113, 0.18));
  border-color: rgba(255, 209, 102, 0.4);
}

.dice-color-btn.btn-random .dice-color-circle {
  background: conic-gradient(#e74c3c, #ffd166, #2ecc71, #1abc9c, #3498db, #9b59b6, #e84393, #e74c3c);
  border-color: #ffd166;
  box-shadow: 0 0 6px rgba(255, 209, 102, 0.6);
}

.dice-color-btn.btn-random.active {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.3), rgba(52, 152, 219, 0.3), rgba(46, 204, 113, 0.3));
  border-color: #ffd166;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.4);
}

/* ==========================================================================
   ESTILOS DO TABULEIRO TÁTICO 2D (GRID SYSTEM)
   ========================================================================== */
.acao-subpane.grid-system-main-view {
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #090c12;
}

.grid-viewport-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: grab;
  background: #0b0e14;
}

.grid-viewport-container:active {
  cursor: grabbing;
}

.grid-board-layer {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.grid-map-background {
  display: block;
  pointer-events: none;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.95);
}

.grid-blocked-cells-overlay,
.grid-matrix-overlay,
.grid-trail-ruler-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10;
}

.grid-tokens-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* Token Circular na Grade */
.grid-token-item {
  position: absolute;
  display: block;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  z-index: 25;
  transition: transform 0.12s ease;
}

.grid-token-item:active,
.grid-token-item.token-dragging {
  cursor: grabbing;
  z-index: 35;
  transform: scale(1.12);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.9));
}

.token-circle-body {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #141923;
  box-sizing: border-box;
}

.token-circle-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.1s ease-out;
}

/* Bordas Temáticas Diferenciadas */
.token-border-heroi {
  border: 3px solid #ffd166;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.token-border-monstro {
  border: 3px solid #e74c3c;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.token-border-aliado {
  border: 3px solid #3498db;
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.6);
}

/* Nome Embutido no Rodapé do Medalhão (Opção 2 - Zero Deformação Circular) */
.token-inner-name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36%;
  background: linear-gradient(to top, rgba(10, 14, 22, 0.98) 0%, rgba(10, 14, 22, 0.75) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2.5px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 5;
}

.token-inner-name-overlay span {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 3px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.1px;
}

/* Setinha Verde de Apontamento de Cima para Baixo (Turno Ativo) */
.token-turn-indicator-arrow {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  animation: bounceArrowTurno 1.1s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.95));
  z-index: 30;
  pointer-events: none;
}

.token-turn-indicator-arrow svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes bounceArrowTurno {
  0% {
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    transform: translate(-50%, -7px) scale(1.15);
  }
}

/* Token Fantasma da Ação Anterior (20% de Opacidade e Intangível) */
.grid-token-ghost-copy {
  position: absolute;
  display: block;
  opacity: 0.20;
  pointer-events: none;
  z-index: 15;
  filter: grayscale(0.6) blur(0.3px);
}

/* Botão Menu Sanduíche (Topo Esquerdo do Grid) */
.grid-btn-hamburger {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(16, 20, 29, 0.88);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 209, 102, 0.55);
  color: #ffd166;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.grid-btn-hamburger svg {
  width: 20px;
  height: 20px;
}

.grid-btn-hamburger:hover {
  background: rgba(26, 32, 46, 0.95);
  border-color: #ffd166;
  transform: scale(1.06);
}

/* Indicador Discreto de Turno (Base Esquerda) */
.grid-turn-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  height: 34px;
  padding: 0 12px;
  border-radius: 18px;
  background: rgba(16, 20, 29, 0.90);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(46, 204, 113, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 50;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease;
}

.grid-turn-pill:hover {
  transform: scale(1.04);
}

.grid-turn-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
  animation: pulseGreen 1.4s infinite;
}

.grid-turn-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.grid-turn-hero-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Cinzel', serif;
}

.grid-turn-next-hint {
  font-size: 10px;
  opacity: 0.7;
}

/* Botão Rápido de Ping (Base Direita) */
.grid-btn-ping-quick {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 20, 29, 0.90);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 209, 102, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease, background 0.2s ease;
}

.grid-btn-ping-quick.active {
  background: rgba(255, 209, 102, 0.3);
  border-color: #ffd166;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.8);
  transform: scale(1.12);
}

/* Efeito Visual do Ping Tático (Vainglory Style) */
.grid-ping-wave-effect {
  position: absolute;
  pointer-events: none;
  z-index: 45;
  transform: translate(-50%, -50%);
}

.ping-beacon-center {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 14px #ffd166, 0 0 24px #ffaa00;
  animation: pingBeaconFlash 1.8s forwards ease-out;
}

.ping-wave-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid #ffd166;
  opacity: 0.9;
}

.ping-wave-ring.ring-1 {
  animation: pingRingExpand 1.6s forwards cubic-bezier(0.1, 0.6, 0.2, 1);
}

.ping-wave-ring.ring-2 {
  animation: pingRingExpand 1.8s 0.25s forwards cubic-bezier(0.1, 0.6, 0.2, 1);
  border-color: #3498db;
}

.ping-author-tag {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 20, 29, 0.9);
  border: 1px solid #ffd166;
  color: #ffd166;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  animation: fadeOut 2.8s forwards;
}

@keyframes pingRingExpand {
  0% {
    width: 10px;
    height: 10px;
    opacity: 0.95;
  }
  100% {
    width: 140px;
    height: 140px;
    opacity: 0;
  }
}

@keyframes pingBeaconFlash {
  0% { transform: scale(1.5); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0; }
}

/* MENU DRAWER (Painel Lateral de Comandos - Abre pela Esquerda) */
.grid-drawer-panel {
  position: absolute;
  top: 0;
  left: -320px;
  right: auto;
  width: 290px;
  max-width: 85vw;
  height: 100%;
  background: rgba(16, 20, 29, 0.96);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255, 209, 102, 0.25);
  border-left: none;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.85);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transition: left 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.grid-drawer-panel.open {
  left: 0;
  right: auto;
}

.grid-drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 65;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.grid-drawer-backdrop.show {
  display: block;
  opacity: 1;
}

.grid-drawer-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-drawer-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Cinzel', serif;
}

.grid-drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.grid-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.grid-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grid-drawer-section-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffd166;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grid-color-toggle-box {
  display: flex;
  gap: 8px;
}

.btn-grid-color {
  flex: 1;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-grid-color.active {
  background: rgba(255, 209, 102, 0.12);
  border-color: #ffd166;
  color: #ffd166;
}

.color-sample {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.color-sample.white-sample {
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.color-sample.black-sample {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.grid-drawer-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid-slider-val {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

/* Seletor de Mapas no Drawer */
.grid-maps-selector-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-map-preset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.grid-map-preset-item:hover,
.grid-map-preset-item.active {
  background: rgba(255, 209, 102, 0.12);
  border-color: #ffd166;
}

.grid-map-preset-item img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.grid-map-preset-item span {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.grid-btn-upload-map {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.grid-btn-upload-map:hover {
  border-color: #ffd166;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.08);
}

.grid-drawer-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-drawer-action {
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-drawer-action:hover {
  background: rgba(255, 209, 102, 0.12);
  border-color: #ffd166;
  color: #ffd166;
}

.btn-drawer-action.btn-drawer-advance {
  border-color: rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.btn-drawer-action.btn-drawer-advance:hover {
  background: rgba(46, 204, 113, 0.15);
  border-color: #2ecc71;
}

/* MODAL DE PERSONALIZAÇÃO DO TOKEN (ENQUADRAMENTO) */
.grid-token-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.grid-token-modal.show {
  display: flex;
}

.grid-token-modal-card {
  width: 100%;
  max-width: 340px;
  background: #141923;
  border: 1.5px solid rgba(255, 209, 102, 0.4);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.grid-token-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid-token-modal-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #ffd166;
  font-family: 'Cinzel', serif;
}

.grid-token-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.grid-modal-instruction {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* Palco do Cropper de Token */
.token-cropper-stage {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.token-cropper-stage:active {
  cursor: grabbing;
}

.token-cropper-circle-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #090c12;
}

.token-cropper-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transform-origin: center center;
}

.token-cropper-golden-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #ffd166;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  box-sizing: border-box;
}

.token-cropper-zoom-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #ffd166;
}

.grid-modal-actions-row {
  width: 100%;
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-modal-cancel {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-save {
  flex: 1.4;
  height: 38px;
  background: linear-gradient(135deg, #d4af37, #aa820a);
  border: 1px solid #ffd166;
  border-radius: 8px;
  color: #10141d;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* ========================================================
   MODO HUD PRINCIPAL: VISÍVEL vs CLEAN (TELA CHEIA IMERSIVA)
   ======================================================== */
body.hud-mode-clean #top-nav-bar,
body.hud-mode-clean #bottom-nav-bar,
body.hud-mode-clean #actions-subnav-bar {
  display: none !important;
}

body.hud-mode-clean .viewport-content {
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 100% !important;
}

/* Botão Flutuante de Menu Sanduíche da HUD Clean (Canto Superior Direito) */
.main-hud-clean-btn {
  display: none !important;
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 10050;
  width: 42px;
  height: 42px;
  background: rgba(17, 20, 28, 0.92);
  border: 1px solid rgba(232, 158, 115, 0.45);
  border-radius: 12px;
  color: #f1f2f6;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75), 0 0 12px rgba(232, 158, 115, 0.2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Só aparece se o modo clean estiver ativo E o usuário estiver dentro da sessão da mesa */
body.hud-mode-clean.in-session .main-hud-clean-btn {
  display: flex !important;
}

/* Ocultação automática temporária enquanto o menu de comandos do Grid estiver aberto */
body.grid-drawer-open #main-hud-clean-btn {
  display: none !important;
}

.main-hud-clean-btn:hover {
  background: rgba(232, 158, 115, 0.22);
  border-color: #E89E73;
  color: #ffd166;
  transform: scale(1.05);
}

.main-hud-clean-btn:active {
  transform: scale(0.95);
}

/* No Grid em modo Clean, o botão de comandos do grid fica elegante no canto superior esquerdo */
body.hud-mode-clean .grid-btn-hamburger {
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
}

/* No modo clean na arena de dados, respiro superior para os botões */
body.hud-mode-clean .dice-selection-top-section {
  padding-top: 48px !important;
}

/* Backdrop escurecido do Drawer da HUD Clean */
.main-hud-clean-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10080;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.main-hud-clean-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Painel Lateral Drawer da HUD Clean (Abre pela Direita) */
.main-hud-clean-drawer {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  width: 320px;
  max-width: 86vw;
  height: 100%;
  background: linear-gradient(180deg, #151822 0%, #0e1117 100%);
  border-left: 1px solid rgba(232, 158, 115, 0.3);
  border-right: none;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.85);
  z-index: 10090;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-hud-clean-drawer.open {
  transform: translateX(0);
}

/* Cabeçalho do Drawer: Imagem de Fundo Panorâmica da Taverna (Sem textos nem castelo) */
.main-hud-drawer-header {
  position: relative;
  width: 100%;
  height: 98px;
  background-image: url('../img/bg_drawer_timbungo.jpg');
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(232, 158, 115, 0.35);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 8px 8px;
}

.main-hud-drawer-close {
  background: rgba(14, 17, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: #f1f2f6;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.main-hud-drawer-close:hover {
  background: rgba(231, 76, 60, 0.85);
  border-color: #e74c3c;
  color: #fff;
  transform: scale(1.05);
}

/* Barra de Status do Sistema: 4 Informações Idênticas à HUD Visível */
.main-hud-drawer-system-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  flex-shrink: 0;
}

.main-hud-drawer-sys-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Corpo com Rolagem */
.main-hud-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-hud-drawer-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent-orange);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Itens de Navegação Principal */
.main-hud-drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 6px;
}

.main-hud-drawer-nav-item:hover {
  background: rgba(232, 158, 115, 0.12);
  border-color: rgba(232, 158, 115, 0.4);
  transform: translateX(-3px);
}

.main-hud-drawer-nav-item.active {
  background: rgba(232, 158, 115, 0.18);
  border-color: var(--accent-orange);
  box-shadow: 0 2px 10px rgba(232, 158, 115, 0.2);
}

.drawer-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  flex-shrink: 0;
}

.main-hud-drawer-nav-item.active .drawer-nav-icon {
  background: var(--accent-orange);
  color: #0e1117;
  border-color: var(--accent-orange);
}

.drawer-nav-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.drawer-nav-label {
  font-size: 13px;
  font-weight: 700;
  color: #f1f2f6;
}

.main-hud-drawer-nav-item.active .drawer-nav-label {
  color: #ffd166;
}

.drawer-nav-desc {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-nav-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--accent-orange);
  color: #0e1117;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Controles de Mídia */
.drawer-media-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drawer-media-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-media-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-orange);
}

.drawer-media-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.drawer-media-label {
  font-size: 11px;
  font-weight: 700;
}

.drawer-media-status {
  font-size: 10px;
  font-weight: 800;
}

/* Linha de Troca Rápida de Modo da HUD */
.drawer-hud-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-hud-mode-label {
  font-size: 11px;
  color: var(--text-primary);
}

.btn-drawer-switch-visivel {
  background: rgba(232, 158, 115, 0.15);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-drawer-switch-visivel:hover {
  background: var(--accent-orange);
  color: #0e1117;
  box-shadow: 0 2px 8px rgba(232, 158, 115, 0.3);
}

/* Botão de Sair da Mesa no Drawer da HUD Clean */
.drawer-btn-leave-table {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.25), rgba(231, 76, 60, 0.15));
  border: 1px solid rgba(231, 76, 60, 0.45);
  border-radius: 10px;
  color: #ff6b81;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-btn-leave-table:hover {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.48), rgba(231, 76, 60, 0.35));
  border-color: #e74c3c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.25);
}

.drawer-btn-leave-table:active {
  transform: scale(0.97);
}

/* ==========================================================================
   EDITOR DE CENAS & BLOQUEIO DE TERRENO (MESTRE) - ESTILOS
   ========================================================================== */

/* Camada SVG de Células Bloqueadas */
.grid-blocked-cells-overlay,
.grid-blocked-cells-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 5;
}

.grid-blocked-cell-rect {
  pointer-events: none;
  animation: grid-fade-blocked 0.25s ease-out;
}

@keyframes grid-fade-blocked {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Banner Superior quando o Modo Pincel de Bloqueio estiver Ativo */
.grid-editor-mode-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10040;
  width: 90%;
  max-width: 360px;
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid #ffd166;
  border-radius: 20px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 209, 102, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: banner-float-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes banner-float-in {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.banner-editor-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.banner-editor-text {
  font-size: 11px;
  font-weight: 600;
  color: #f1f2f6;
  line-height: 1.25;
}

.banner-editor-text b {
  color: #ffd166;
}

.banner-editor-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 8px #ff4757;
  animation: pulse-block 1.2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-block {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-editor-done {
  background: linear-gradient(135deg, #ffd166, #e89e73);
  border: none;
  border-radius: 12px;
  color: #0e1117;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 209, 102, 0.35);
}

.btn-editor-done:hover {
  background: #fff;
  transform: scale(1.04);
}

.btn-editor-done:hover {
  background: #fff;
  transform: scale(1.05);
}

/* Abas de Navegação no Topo do Drawer (Tabuleiro x Editor de Cenas) */
.grid-drawer-tabs-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.grid-drawer-tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.grid-drawer-tab-btn:hover {
  color: #f1f2f6;
  background: rgba(255, 255, 255, 0.03);
}

.grid-drawer-tab-btn.active {
  color: #ffd166;
  border-bottom-color: #ffd166;
  background: rgba(255, 209, 102, 0.08);
}

/* Controles do Painel Editor */
.grid-editor-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid-badge-counter {
  font-size: 10px;
  font-weight: 800;
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.45);
  color: #ff6b81;
  padding: 2px 8px;
  border-radius: 10px;
}

.btn-toggle-block-mode {
  width: 100%;
  height: 40px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 8px;
  color: #ff6b81;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-toggle-block-mode:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: #ff4757;
  color: #fff;
}

.btn-toggle-block-mode.active {
  background: #e74c3c;
  border-color: #ff6b81;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.55);
}

.grid-editor-mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-editor-mini {
  flex: 1;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f1f2f6;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-editor-mini:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger-mini {
  color: #ff6b81;
  border-color: rgba(231, 76, 60, 0.35);
}

.btn-danger-mini:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
  color: #fff;
}

.grid-editor-help-text {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 6px 0 0 0;
}

/* Card de Alinhamento Fino (Offset X e Y) */
.grid-offset-control-card {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grid-offset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.offset-axis-label {
  font-size: 11px;
  font-weight: 700;
  color: #f1f2f6;
}

.offset-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-offset-step {
  min-width: 27px;
  height: 26px;
  padding: 0 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-offset-step:hover {
  background: rgba(255, 209, 102, 0.2);
  border-color: #ffd166;
  color: #ffd166;
}

.offset-display-value {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffd166;
  font-family: monospace;
}

.btn-reset-offset {
  width: 100%;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-reset-offset:hover {
  border-color: #ffd166;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.06);
}

/* JANELA FLUTUANTE DE AJUSTE FINO DA IMAGEM (SEM BLUR NO MAPA) */
.grid-floating-offset-window {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  max-width: calc(100vw - 20px);
  background: rgba(14, 18, 26, 0.96);
  border: 1.5px solid rgba(255, 209, 102, 0.5);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 209, 102, 0.12);
  z-index: 75;
  user-select: none;
  animation: fadeInPopOffset 0.2s ease-out;
}

@keyframes fadeInPopOffset {
  from { opacity: 0; transform: translate(-50%, -8px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.grid-floating-window-header {
  padding: 10px 14px;
  background: rgba(26, 32, 46, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  touch-action: none;
}

.grid-floating-window-header:active {
  cursor: grabbing;
}

.floating-window-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-window-icon {
  font-size: 18px;
}

.floating-window-h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #ffd166;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
}

.floating-window-subtitle {
  font-size: 9px;
  color: var(--text-muted, #a0a6b5);
  display: block;
  margin-top: 1px;
}

.grid-floating-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grid-floating-close-btn:hover {
  background: rgba(231, 76, 60, 0.4);
  border-color: #e74c3c;
  color: #fff;
}

.grid-floating-window-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-window-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-concluir-offset {
  height: 28px;
  padding: 0 16px;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-concluir-offset:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Slider com Botões Passo a Passo */
.grid-slider-with-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-slider-step {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-slider-step:hover {
  background: rgba(255, 209, 102, 0.18);
  border-color: #ffd166;
  color: #ffd166;
}

/* Card de Dimensões da Tabela (Colunas x Linhas) */
.grid-table-dims-card {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dims-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f2f6;
}

.dims-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-dims-step {
  width: 28px;
  height: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dims-step:hover {
  background: rgba(255, 209, 102, 0.18);
  border-color: #ffd166;
  color: #ffd166;
}

.dims-val {
  min-width: 36px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffd166;
  font-family: monospace;
}

.btn-save-scene {
  background: rgba(46, 204, 113, 0.15) !important;
  border-color: rgba(46, 204, 113, 0.4) !important;
  color: #2ecc71 !important;
}

.btn-save-scene:hover {
  background: rgba(46, 204, 113, 0.28) !important;
  border-color: #2ecc71 !important;
  color: #fff !important;
}




/* ==========================================================================
   TAVERNA DO TIMBUNGO V2.0.0 — DESIGN SYSTEM (DESIGN.MD)
   - 100% Ícones SVG Vetoriais (.svg-icon)
   - Regra Universal dos 4 Polígonos (0px, 12px/16px Squircle, 9999px Círculo/Pílula)
   - Títulos, Subtítulos e Menus em Linha Única (white-space: nowrap)
   - Padrão de Telas Cheias Contínuas (Aposentadoria de Popups Flutuantes)
   - Banner Autônomo de Nova Versão (Padrão WhatsApp Web / Anti-Shift+F5)
   - Assinatura Canônica Oficial ("Creation By Linker")
   - Blindagem Universal de Viewport e Scroll (100svh)
   ========================================================================== */

.svg-icon {
  display: inline-block;
  vertical-align: -0.16em;
  flex-shrink: 0;
  pointer-events: none;
  forced-color-adjust: none;
}

/* 1. Banner Autônomo de Nova Versão (Padrão WhatsApp Web) */
.version-update-banner {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 12000;
  background: linear-gradient(90deg, #132a21 0%, #19382b 100%);
  border-bottom: 1px solid rgba(46, 204, 113, 0.45);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.version-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.version-banner-icon {
  color: #2ecc71;
  flex-shrink: 0;
}

.version-banner-text {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11.5px;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-banner-text strong {
  color: #2ecc71;
  font-weight: 800;
}

.btn-version-update-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: #2ecc71;
  color: #09130e;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-version-update-now:hover,
.btn-version-update-now:active {
  filter: brightness(1.08);
  transform: scale(0.98);
}

/* 2. Assinatura Canônica Oficial ("Creation By Linker") */
.canonical-signature-footer {
  width: 100%;
  text-align: center;
  padding: 10px 12px 6px;
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: rgba(232, 158, 115, 0.75);
  text-transform: none;
  user-select: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.modal-signature-footer {
  margin-top: auto;
  padding: 16px 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 3. Títulos, Subtítulos e Menus em Linha Única (Sem Quebra de Linha) */
.create-modal-title,
.create-modal-subtitle,
.modal-title,
.config-section-title span,
.config-row-label,
.table-card-title,
.lobby-waiting-title,
.tester-title,
.tester-btn-role,
.tester-btn-desc,
.nav-tab-label,
.sub-tab-btn,
.drawer-nav-label,
.main-hud-drawer-section-title,
.grid-drawer-section-label,
.skills-divider-title,
.history-title-tag {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4. Regra Universal dos 4 Polígonos (Border-Radius Padronizado)
   - Squircle: 12px / 16px
   - Círculo / Pílula: 9999px
   - Quadrado / Retângulo: 0px */
.config-section-card,
.lobby-table-card,
.lobby-tester-control-box,
.atributos-block,
.wealth-card,
.canteen-card,
.combat-tracker-box,
.notif-item-card {
  border-radius: 16px !important;
}

.atributo-poligono,
.comp-poligono,
.inventory-slot-box,
.btn-tester-action,
.btn-create-rpg-table,
.btn-enter-table-action,
.dice-select-card,
.modal-input-text,
.create-text-input,
.create-select-input,
.create-number-input,
.modal-btn-confirm,
.modal-btn-cancel,
.modal-btn-danger,
.modal-btn-secondary,
.btn-confirm-create-table,
.btn-cancel-create-table,
.drawer-media-btn,
.drawer-btn-leave-table,
.btn-leave-table-prominent {
  border-radius: 12px !important;
}

.table-card-badge,
.table-card-style-tag,
.tester-badge-tag,
.config-pill-badge,
.chip-cover-btn,
.notif-filter-btn {
  border-radius: 9999px !important;
}

/* 5. Aposentadoria de Popups Flutuantes — Padrão de Telas Cheias Contínuas */
.modal-overlay,
.modal-backdrop-custom,
.grid-token-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100svh !important;
  min-height: 100svh !important;
  background: var(--bg-primary) !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  z-index: 10050 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-direction: column !important;
}

.modal-overlay .modal-card,
.modal-backdrop-custom .modal-box-create-table,
.grid-token-modal .grid-token-modal-card {
  width: 100% !important;
  max-width: none !important;
  min-height: 100svh !important;
  max-height: none !important;
  height: auto !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--bg-primary) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.modal-overlay .modal-header,
.modal-backdrop-custom .modal-create-header,
.grid-token-modal .grid-token-modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  background: rgba(14, 17, 23, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 14px 16px !important;
  width: 100% !important;
  flex-shrink: 0 !important;
}

.modal-overlay .modal-body,
.modal-backdrop-custom .modal-create-body,
.grid-token-modal .grid-token-modal-body {
  width: 100% !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  padding: 20px 16px !important;
  flex: 1 0 auto !important;
  overflow: visible !important;
  max-height: none !important;
}

.modal-overlay .modal-actions,
.modal-backdrop-custom .modal-create-footer,
.grid-token-modal .grid-modal-actions-row {
  width: 100% !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  padding: 14px 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: transparent !important;
  flex-shrink: 0 !important;
}

/* Gavetas Laterais (Drawers) com altura estável 100svh (Modern Web Guidance) */
.main-hud-drawer-panel,
.grid-drawer-panel {
  height: 100svh !important;
  max-height: 100svh !important;
}


/* ==========================================================================
   V2.1.0 — CORREÇÃO DE ENQUADRAMENTO DOS CARDS DE CONFIGURAÇÃO (IMAGENS 1 E 2)
   + LOGIN GOOGLE / IOS ACCOUNT + TELA MEET-GEEK WEBRTC
   ========================================================================== */

/* 1. Correção definitiva dos controles que saíam da demarcação em Configurações */
.config-section-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.config-row-item {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.config-row-info {
  flex: 1 1 170px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.config-segmented-control {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  justify-content: stretch !important;
}

.config-segmented-control .segmented-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
  padding: 6px 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.config-row-item .dark-select,
.config-row-item .config-slider-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 2. Barra de Login Google Account e iOS / Apple Account no Lobby */
.lobby-auth-wrapper {
  margin-top: 6px;
  width: 100%;
}

.lobby-auth-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.btn-oauth-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-oauth-google {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

.btn-oauth-google:hover,
.btn-oauth-google:active {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffd166;
}

.btn-oauth-apple {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(232, 158, 115, 0.35);
  color: #f8fafc;
}

.btn-oauth-apple:hover,
.btn-oauth-apple:active {
  background: rgba(232, 158, 115, 0.15);
  border-color: #e89e73;
}

.lobby-auth-connected-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(22, 25, 34, 0.92);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

.auth-connected-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1.5px solid #ffd166;
  flex-shrink: 0;
}

.auth-connected-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.auth-connected-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-connected-name {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffd166;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-provider-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.auth-provider-pill.google-pill {
  background: rgba(52, 152, 219, 0.18);
  color: #74b9ff;
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.auth-provider-pill.apple-pill {
  background: rgba(232, 158, 115, 0.18);
  color: #e89e73;
  border: 1px solid rgba(232, 158, 115, 0.4);
}

.auth-connected-email {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-auth-switch,
.btn-auth-logout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-auth-logout {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.3);
}

.auth-provider-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-provider-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.auth-provider-tab.active {
  background: rgba(232, 158, 115, 0.16);
  border-color: #e89e73;
  color: #ffd166;
}

.auth-accounts-preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-account-quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-account-quick-item:hover {
  border-color: #ffd166;
  background: rgba(255, 209, 102, 0.08);
}

.auth-quick-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1.5px solid #e89e73;
  flex-shrink: 0;
}

.auth-quick-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.auth-quick-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.auth-quick-email {
  font-size: 10.5px;
  color: var(--text-muted);
}

.auth-quick-badge {
  padding: 4px 10px;
  border-radius: 9999px;
  background: #2ecc71;
  color: #09130e;
  font-size: 10.5px;
  font-weight: 800;
}

/* 3. MEET-GEEK: Arquitetura da Vídeo-Chamada (Mestre Widescreen/Split + Grade 2x2) */
.meet-geek-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  flex-shrink: 0;
}

.meet-geek-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meet-geek-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
}

.meet-geek-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 900;
  color: #ffd166;
  letter-spacing: 1px;
  white-space: nowrap;
}

.meet-geek-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-meet-geek-ctrl,
.btn-meet-geek-share,
.btn-meet-geek-stop {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-meet-geek-ctrl.active-on {
  border-color: rgba(46, 204, 113, 0.45);
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
}

.btn-meet-geek-ctrl.active-off {
  border-color: rgba(231, 76, 60, 0.45);
  color: #ff6b81;
  background: rgba(231, 76, 60, 0.1);
}

.btn-meet-geek-share {
  background: linear-gradient(135deg, rgba(232, 158, 115, 0.22), rgba(217, 119, 54, 0.16));
  border-color: #e89e73;
  color: #ffd166;
}

.btn-meet-geek-stop {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
  color: #ff6b81;
}

/* Região Superior do Mestre: Widescreen (1 coluna 100%) vs Split Mode (2 colunas 50/50) */
.meet-geek-master-region {
  display: grid;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}

.meet-geek-master-region.is-widescreen-mode {
  grid-template-columns: 1fr;
}

.meet-geek-master-region.is-split-mode {
  grid-template-columns: repeat(2, 1fr);
}

/* Grade Inferior dos Jogadores */
.meet-geek-players-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.meet-geek-card {
  display: flex;
  flex-direction: column;
  background: #141822;
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, transform 0.15s ease;
}

.meet-geek-card:hover {
  border-color: #e89e73;
}

.meet-geek-card.master-camera-card {
  border-color: rgba(255, 209, 102, 0.65);
  box-shadow: 0 4px 18px rgba(255, 209, 102, 0.1);
}

.meet-geek-card.master-shared-card,
.meet-geek-card.has-shared-image {
  border-color: #e89e73;
  box-shadow: 0 4px 18px rgba(232, 158, 115, 0.16);
}

.meet-geek-media-box {
  position: relative;
  width: 100%;
  background: #0b0e14;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quando o Mestre está sozinho no topo -> Widescreen 16:9 */
.meet-geek-card.widescreen-size .meet-geek-media-box {
  aspect-ratio: 16 / 9;
  max-height: 210px;
}

/* Quando o Mestre divide a tela OU nos cards dos jogadores -> mesmo tamanho padrão 4:3 */
.meet-geek-card.split-size .meet-geek-media-box,
.meet-geek-card.player-camera-card .meet-geek-media-box {
  aspect-ratio: 4 / 3;
  height: 124px;
}

.meet-geek-video-feed,
.meet-geek-avatar-feed,
.meet-geek-shared-img-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meet-geek-avatar-feed.cam-is-off {
  filter: grayscale(45%) brightness(0.65);
}

.meet-geek-status-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.meet-geek-status-pill.pill-on {
  background: rgba(15, 23, 42, 0.78);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.45);
}

.meet-geek-status-pill.pill-off {
  background: rgba(15, 23, 42, 0.82);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.meet-geek-status-pill.pill-share {
  background: rgba(217, 119, 54, 0.9);
  color: #fff;
  border: 1px solid #ffd166;
}

.btn-card-close-share {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 107, 129, 0.5);
  color: #ff6b81;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.meet-geek-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  background: #181c26;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meet-geek-card-name {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-geek-card-mic {
  flex-shrink: 0;
  display: inline-flex;
}

/* Galeria de Presets de Compartilhamento no Modal do Meet-Geek */
.meet-geek-rule-banner {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(232, 158, 115, 0.1);
  border: 1px solid rgba(232, 158, 115, 0.35);
  color: #f1f5f9;
  font-size: 11.5px;
  line-height: 1.4;
}

.meet-geek-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.meet-geek-preset-card {
  display: flex;
  flex-direction: column;
  background: #141822;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: all 0.15s ease;
}

.meet-geek-preset-card:hover {
  border-color: #ffd166;
  transform: translateY(-1px);
}

.meet-geek-preset-thumb {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.meet-geek-preset-meta {
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meet-geek-preset-tag {
  font-size: 9px;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.6px;
}

.meet-geek-preset-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visualizador de Tela Cheia (Sem Opção de Zoom — Clique de Novo para Retornar) */
.meet-geek-fullscreen-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  background: rgba(7, 9, 14, 0.98);
  z-index: 12500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.meet-geek-fs-top-hint {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  z-index: 2;
}

.meet-geek-fs-caption {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: #ffd166;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-geek-fs-return-pill {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  background: rgba(232, 158, 115, 0.25);
  border: 1px solid rgba(232, 158, 115, 0.5);
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

.meet-geek-fs-media {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100svh;
  object-fit: contain;
  pointer-events: none;
}


/* ==========================================================================
   V2.2.0 — TRANSIÇÃO SUTIL DO BANNER SUPERIOR (IMAGEM 2) +
   TELA CLÁSSICA DE LOGIN / CRIAR CONTA + PERFIL E BUSCA POR ID / NICKNAME
   ========================================================================== */

/* 1. Correção da Transição do Banner da Taverna (Sem linha dura e sem cortar a arte) */
.lobby-screen-fullscreen,
.auth-screen-fullscreen {
  background: #0e1117 !important;
}

.lobby-banner-top-wrap {
  width: calc(100% + 28px) !important;
  margin: -16px -14px 4px -14px !important;
  position: relative !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.lobby-banner-top-img {
  width: 100% !important;
  max-height: 202px !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center 16% !important;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 66%,
    rgba(0, 0, 0, 0.90) 73%,
    rgba(0, 0, 0, 0.70) 80%,
    rgba(0, 0, 0, 0.44) 87%,
    rgba(0, 0, 0, 0.18) 93%,
    rgba(0, 0, 0, 0.04) 97.5%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 66%,
    rgba(0, 0, 0, 0.90) 73%,
    rgba(0, 0, 0, 0.70) 80%,
    rgba(0, 0, 0, 0.44) 87%,
    rgba(0, 0, 0, 0.18) 93%,
    rgba(0, 0, 0, 0.04) 97.5%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}

.lobby-banner-fade-overlay {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 65%,
    rgba(14, 17, 23, 0.35) 79%,
    rgba(14, 17, 23, 0.78) 91%,
    #0e1117 100%
  ) !important;
}

/* 2. Tela de Autenticação Obrigatória Google Auth / Apple Sign-In (#view-auth) */
.auth-screen-fullscreen {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.auth-scroll-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 18px;
}

.auth-card-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(25, 30, 41, 0.95) 0%, rgba(18, 22, 31, 0.98) 100%);
  border: 1px solid rgba(232, 158, 115, 0.32);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.auth-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.auth-card-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  color: #ffd166;
  margin: 0;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.auth-card-subtitle {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-error-banner {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.16);
  border: 1px solid rgba(231, 76, 60, 0.45);
  color: #ff6b81;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.auth-oauth-mandatory-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}

.google-gsi-slot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

.btn-oauth-official {
  width: 100%;
  max-width: 300px;
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.btn-oauth-google-official {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-oauth-google-official:hover {
  background: #f8fafc;
  border-color: #ffd166;
}

.btn-oauth-apple-official {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-oauth-apple-official:hover {
  border-color: #e89e73;
  background: #111827;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field-label {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #e89e73;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.auth-input-field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(11, 14, 20, 0.9);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  box-sizing: border-box;
  text-align: left !important;
  outline: none;
  transition: border-color 0.18s ease;
}

.auth-input-field:focus {
  border-color: #ffd166;
}

.auth-input-field.input-immutable-locked {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
  cursor: not-allowed;
}

.btn-auth-primary {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e89e73 0%, #d35400 100%);
  border: 1px solid #ffd166;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(211, 84, 0, 0.35);
}

.auth-avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-avatar-circle-wrap {
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  overflow: hidden;
  border: 2px solid #e89e73;
  flex-shrink: 0;
  cursor: pointer;
}

.auth-avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-avatar-upload-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.btn-change-reg-photo {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(232, 158, 115, 0.16);
  border: 1px solid rgba(232, 158, 115, 0.45);
  color: #ffd166;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.auth-age-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.06);
  border: 1px solid rgba(255, 209, 102, 0.22);
  cursor: pointer;
}

.auth-age-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #e89e73;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-age-text {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.35;
}

.auth-switch-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding-top: 2px;
}

.btn-auth-link {
  background: none;
  border: none;
  color: #ffd166;
  font-weight: 800;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* 3. Card do Usuário Logado no Lobby (Regra #7: Linha Única e Regra #11: Hierarquia Vertical em 3 Linhas) */
.lobby-logged-profile-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(22, 25, 34, 0.92);
  border: 1px solid rgba(232, 158, 115, 0.28);
  border-radius: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Linha 1: Título Principal ocupando sozinho 100% da largura em Linha Única */
.lobby-profile-row-title {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lobby-profile-row-title .lobby-welcome-prefix {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  flex-shrink: 0;
}

.lobby-profile-row-title .lobby-welcome-user-inline {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: #ffd166;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Linha 2: Informações Principais (Avatar + ID + Status Online) */
.lobby-profile-row-meta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lobby-logged-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #e89e73;
  flex-shrink: 0;
}

.lobby-logged-subrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.lobby-id-copy-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: #ffd166;
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.lobby-status-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #2ecc71;
  white-space: nowrap;
}

.status-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #2ecc71;
  box-shadow: 0 0 6px #2ecc71;
  flex-shrink: 0;
}

/* Linha 3: Botões de Ação na Base do Card */
.lobby-profile-row-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-lobby-search-users {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(232, 158, 115, 0.15);
  border: 1px solid rgba(232, 158, 115, 0.4);
  color: #ffd166;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lobby-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.14);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ff6b81;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Estado Vazio quando ainda não há mesas criadas no Lobby */
.lobby-empty-tables-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 36px 20px;
  background: rgba(22, 25, 34, 0.6);
  border: 1px dashed rgba(232, 158, 115, 0.3);
  border-radius: 16px;
  margin: auto 0;
}

.empty-tables-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 800;
  color: #ffd166;
}

.empty-tables-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 280px;
}

.btn-delete-own-table {
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(231, 76, 60, 0.22);
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: #ff6b81;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* 4. Cartões Públicos na Busca de Jogadores (Foto, Nickname, ID e Status) */
.public-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(22, 25, 34, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.public-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1.5px solid #e89e73;
  flex-shrink: 0;
}

.public-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.public-user-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-user-nickname {
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-user-id {
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 800;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
  padding: 1px 6px;
  border-radius: 9999px;
}

.public-user-status-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.public-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
}

.public-status-dot.status-online {
  background: #2ecc71;
  box-shadow: 0 0 6px #2ecc71;
}

.public-status-dot.status-jogando {
  background: #f39c12;
  box-shadow: 0 0 6px #f39c12;
}

.public-status-dot.status-offline {
  background: #64748b;
}

.public-status-text {
  font-size: 10.5px;
  font-weight: 700;
}

.public-status-text.status-online {
  color: #2ecc71;
}

.public-status-text.status-jogando {
  color: #ffd166;
}

.public-status-text.status-offline {
  color: #94a3b8;
}

.btn-add-friend-id {
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(46, 204, 113, 0.16);
  border: 1px solid rgba(46, 204, 113, 0.45);
  color: #2ecc71;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.empty-search-msg {
  padding: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}
