/*
 * ===================================================================
 * i̅n̅t̅u̅i̅ — Estilos da Interface Refatorada com CSS Custom Properties
 * ===================================================================
 */

:root {
  /* ── Temas e Cores ── */
  --theme-bg: url("./temas/mesa_myst.webp");
  --table-brightness: 100%;
  --card-opacity: 1;
  --card-back-img: url("./icones/verso_intui.webp");

  /* ── Dimensões ── */
  --card-width: 240px;
  --card-height: 430px;

  /* ── Fontes ── */
  --font-title: "IMFellEnglish-Regular", Georgia, serif;
  --font-body: "Lato-Regular", Helvetica, sans-serif;
}

@font-face {
  font-family: "IMFellEnglish-Regular";
  src: url("fonts/IMFellEnglish-Regular.ttf");
  font-display: swap;
}

@font-face {
  font-family: "Lato-Regular";
  src: url("fonts/Lato-Regular.ttf");
  font-display: swap;
}

/* ── Reset Mínimo e Fundo ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: #1a0e07;
  user-select: none;
}

/* ── Desabilita o drag ghost nativo do navegador para a interface principal ── */
img,
svg,
a,
button,
tarot-card,
tarot-deck,
.carta-disposta,
.item-sala,
.item-participante,
.painel-mp-drawer,
.toolbar-container,
.player-musica,
.opcao-embaralhamento,
settings-toolbar,
music-player,
shuffle-confirm,
info-modal,
login-modal {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ── Mantém o drag ghost nativo habilitado para as cartas do catálogo de cartas (card-catalog) ── */
card-catalog img,
card-catalog .itemMenuzao img,
.menuzao-overlay img,
.menuzao-overlay .itemMenuzao img {
  -webkit-user-drag: auto !important;
  user-drag: auto !important;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #1a0e07;
}

#backgroundimagem {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--table-brightness));
  transition: filter 0.3s ease;
}

#mesa {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0px;
  height: 0px;
  z-index: 50;
  pointer-events: auto;
  transform-origin: 0 0;
  transition: transform 0.15s ease-out;
}

#moldura {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

/* ── Baralho das Cartas (tarot-deck) ── */
tarot-deck#baralho {
  position: absolute;
  z-index: 20;
  cursor: grab;
  touch-action: none;
  transition: filter 0.25s ease;
}

tarot-deck#baralho[data-disposicao="monte"] {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

tarot-deck#baralho:active {
  cursor: grabbing;
}

.divcartas {
  position: absolute;
  cursor: pointer;
  user-select: none;
}

.divcartas img.cartas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.divcartas img.cartas:hover {
  filter: brightness(1.15);
}

.divcartas img.cartas.arcano-menor-clareado,
.cartaEmbInt img.imagemEmbInt.arcano-menor-clareado {
  filter: brightness(1.35);
}

.divcartas img.cartas.arcano-menor-clareado:hover,
.cartaEmbInt img.imagemEmbInt.arcano-menor-clareado:hover {
  filter: brightness(1.5);
}

.divcartas img.cartas.tiradas,
.divcartas img.cartas[data-retirada="true"] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── Cartas Sorteadas (tarot-card) ── */
tarot-card {
  opacity: var(--card-opacity);
  transition: opacity 0.3s ease;
  width: var(--card-width);
  height: var(--card-height);
  z-index: 100;
  pointer-events: auto;
}

tarot-card img.imagem-carta {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.6));
}

tarot-card img.estado2 {
  transform: rotate(180deg);
}

/* Alça de rotação flutuante sobre a carta */
tarot-card .alca-rotacao {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 10, 5, 0.85);
  border: 1.5px solid #ff9d00;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px rgba(255, 255, 255, 0.2);
  color: #ff9d00;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 160;
  user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

tarot-card .alca-rotacao:active,
tarot-card .alca-rotacao.arrastando {
  cursor: grabbing;
  background: #ff9d00;
  color: #1a0e07;
  transform: translateX(-50%) scale(1.15);
}

tarot-card .alca-rotacao svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Toolbars da carta ao passar o mouse */
tarot-card .cabecalhodascartas {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 20px;
  padding: 4px 8px;
  gap: 8px;
  z-index: 150;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}

tarot-card .rodapedascartas {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 20px;
  padding: 4px 8px;
  gap: 8px;
  z-index: 150;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
}

tarot-card .cabecalhodascartas img,
tarot-card .rodapedascartas img {
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

tarot-card .cabecalhodascartas img:hover,
tarot-card .rodapedascartas img:hover {
  transform: scale(1.2);
}

/* Palavras-chave */
.palavrasChaveFundo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 10, 5, 0.92);
  border: 1px solid #ff9d00;
  border-radius: 8px;
  padding: 10px 14px;
  color: #f2e3c6;
  width: 220px;
  z-index: 160;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.palavrasChave h2 {
  font-family: var(--font-title);
  font-size: 16px;
  color: #ff9d00;
  text-align: center;
  margin-bottom: 6px;
}

.palavrasChave ul {
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* ── Overlays (Texto Explicativo & Menuzão) ── */
.overlay,
.menuzao-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: rgba(12, 6, 3, 0.96);
  overflow-y: auto;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
  color: #e8d7be;
}

.overlay {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 40px 30px 40px 30px;
  gap: 25px;
}

/* ── Estilização sutil da Barra de Rolagem (Scrollbar Marrom) ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 8, 4, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #5c3a21;
  border-radius: 4px;
  border: 1px solid rgba(255, 157, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: #8c5732;
  border-color: rgba(255, 157, 0, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #5c3a21 rgba(15, 8, 4, 0.5);
}

.overlay .closebtn,
.menuzao-overlay .closebtn-menuzao {
  position: fixed;
  top: 20px;
  right: 25px;
  z-index: 210;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.overlay .closebtn img,
.menuzao-overlay .closebtn-menuzao img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.textoPrincipal {
  flex: 2 1 0%;
  min-width: 0;
  max-width: 1150px;
  margin: 0;
}

.textoPrincipal h1 {
  font-family: var(--font-title);
  font-size: 38px;
  color: #ffb74d;
  margin-bottom: 20px;
}

.textoPrincipal p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: #d1c4e9;
}

.colunaDireita {
  position: static;
  flex: 1 1 200px;
  max-width: 320px;
  min-width: 160px;
  margin-top: 20px;
}

.colunaDireita img {
  width: 100%;
  max-width: 220px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

/* ── Menuzão Grid ── */
.conteudoMenuzao {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.conteudoMenuzao h1 {
  font-family: var(--font-title);
  font-size: 36px;
  color: #ff9d00;
  text-align: center;
  margin-bottom: 40px;
}

.secaoNaipe h2 {
  font-family: var(--font-title);
  font-size: 24px;
  color: #ffa726;
  border-bottom: 1px solid #4a2c00;
  padding-bottom: 8px;
  margin: 30px 0 15px 0;
}

.gridMenuzao {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 15px;
}

.itemMenuzao {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.itemMenuzao:hover {
  transform: scale(1.08);
}

.itemMenuzao img {
  width: 90px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.itemMenuzao span {
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
  color: #c7b299;
}

.rodape-catalogo {
  margin-top: 50px;
  padding: 24px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 157, 0, 0.2);
}

.rodape-catalogo p {
  font-size: 14px;
  color: #a8947d;
  font-family: var(--font-body);
}

.rodape-catalogo a {
  color: #ff9d00;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.rodape-catalogo a:hover {
  color: #ffb74d;
  text-decoration: underline;
}

/* ── Barra de Ferramentas (settings-toolbar) ── */
settings-toolbar {
  position: fixed;
  top: 15px;
  left: 20px;
  z-index: 10000;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

settings-toolbar:hover,
settings-toolbar:focus-within {
  opacity: 1;
}

.toolbar-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  /* Mantém a altura constante para evitar que o hambúrguer se mova verticalmente */
}

.menu-hamburger {
  width: 38px;
  height: 38px;
  cursor: pointer;
  background: rgba(15, 8, 4, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 157, 0, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.menu-hamburger:hover {
  transform: scale(1.1);
  border-color: #ff9d00;
}

/* ── Botão de Cadeado para Travar/Fixar o Menu ── */
.btn-lock-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(15, 8, 4, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  padding: 0;
  margin-left: 2px;
}

.btn-lock-menu.visible {
  display: inline-flex;
}

.btn-lock-menu .lock-svg {
  width: 16px;
  height: 16px;
  stroke: #d1c4e9;
  /* Cinza claro suave */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
  transition: stroke 0.2s ease, filter 0.2s ease;
}

.btn-lock-menu:hover {
  transform: scale(1.12);
  border-color: rgba(255, 157, 0, 0.5);
}

/* Estado Travado (Ativado) */
.btn-lock-menu.locked {
  border-color: #ff9d00;
  background: rgba(45, 24, 10, 0.9);
}

.btn-lock-menu.locked .lock-svg {
  stroke: #ff9d00;
  /* Amarelo dourado */
  filter: drop-shadow(0 0 5px rgba(255, 157, 0, 0.6));
}

.toolbar-container {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  /* Margem equivalente à largura de meio ícone (16px de meio ícone de 32px) */
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9500;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.toolbar-container.wrapped {
  flex-direction: column;
  gap: 8px;
}

.toolbar-container.wrapped .toolbar-row {
  gap: 12px;
}

.menu-segmento {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 8, 4, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 157, 0, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ── Estilos da Nova Sessão de Zoom do Menu ── */
.menu-segmento-zoom {
  gap: 8px;
}

.zoom-icone-label {
  font-size: 14px;
  user-select: none;
  cursor: default;
}

.zoom-valor-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #ffb74d;
  min-width: 34px;
  text-align: center;
  user-select: none;
}

/* Slider de Zoom Temático: trilha marrom clara e seletor amarelo mostarda */
.slider-zoom-custom {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 90px;
  height: 18px;
  background: transparent;
  cursor: pointer;
  outline: none;
  margin: 0;
  padding: 0;
}

/* Trilha em Webkit */
.slider-zoom-custom::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: #8c5732;
  /* Marrom claro */
  border: 1px solid rgba(255, 157, 0, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Trilha em Firefox */
.slider-zoom-custom::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #8c5732;
  /* Marrom claro */
  border: 1px solid rgba(255, 157, 0, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Seletor (Thumb) em Webkit - Amarelo Mostarda */
.slider-zoom-custom::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e5a93c;
  /* Amarelo Mostarda */
  border: 1.5px solid #ffcb6b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  margin-top: -4px;
  /* Centraliza verticalmente na trilha de 6px */
  transition: transform 0.15s ease, background 0.15s ease;
}

.slider-zoom-custom::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #ffb834;
}

/* Seletor (Thumb) em Firefox - Amarelo Mostarda */
.slider-zoom-custom::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e5a93c;
  /* Amarelo Mostarda */
  border: 1.5px solid #ffcb6b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, background 0.15s ease;
}

.slider-zoom-custom::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #ffb834;
}

.toolbar-container.collapsed {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.btn-tool {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: block;
  align-self: center;
  margin: 0;
}

.btn-tool:hover {
  transform: scale(1.15);
}

/* ── Campo de Expressão de Corte (Círculo Expansível por Clique) ── */
.corte-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 29px;
  height: 29px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #ff9d00;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  user-select: none;
  box-sizing: border-box;
}

/* Expansão acionada apenas por clique/foco ou quando há texto digitado */
.corte-wrapper:focus-within,
.corte-wrapper.has-text {
  width: 200px;
  box-shadow: 0 0 10px rgba(255, 157, 0, 0.4);
}

.corte-icone {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  color: #ff9d00;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.corte-wrapper:focus-within .corte-icone,
.corte-wrapper.has-text .corte-icone {
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
}

#textInput {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: #ffe0b2;
  padding: 0 12px;
  font-size: 12px;
  outline: none;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease 0.1s;
}

#textInput::placeholder {
  color: rgba(255, 224, 178, 0.6);
}

.corte-wrapper:focus-within #textInput,
.corte-wrapper.has-text #textInput {
  opacity: 1;
  cursor: text;
}


.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}


.dropdown-content {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 8, 4, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #ff9d00;
  border-radius: 12px;
  padding: 12px;
  z-index: 10000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Botão e Lista de Idioma ── */
.btn-idioma-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: #ff9d00;
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  user-select: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-idioma-indicator:hover {
  transform: scale(1.15);
  background: rgba(255, 157, 0, 0.15);
}

.dropdown-idioma-lista {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  min-width: 130px;
}

.item-idioma {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #f5e6d3;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.item-idioma:hover {
  background: rgba(255, 157, 0, 0.2);
  color: #ff9d00;
}

.item-idioma.ativo {
  background: rgba(255, 157, 0, 0.35);
  color: #ffe699;
  font-weight: bold;
}

.dropdown-grid {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

.dropdownTemas-grid {
  grid-template-columns: repeat(5, 1fr);
}

.dropdownVersos-grid {
  grid-template-columns: repeat(5, 1fr);
}

.dropdownBaralhos-grid {
  grid-template-columns: repeat(3, 1fr);
}

.dropdownDisposicoes-grid {
  grid-template-columns: 1fr;
}

.item-dropdown-thumb {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 157, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Dimensões específicas para cada menu */
.dropdownTemas-grid .item-dropdown-thumb {
  width: 68px;
  height: 40px;
  /* Formato paisagem */
}

.dropdownBaralhos-grid .item-dropdown-thumb,
.dropdownVersos-grid .item-dropdown-thumb {
  width: 68px;
  height: 120px;
  /* Formato vertical (carta) */
}

.dropdownDisposicoes-grid .item-dropdown-thumb {
  width: 68px;
  height: 68px;
  /* Dobro do tamanho */
}

.item-dropdown-thumb:hover {
  transform: scale(1.1);
  border-color: #ff9d00;
  box-shadow: 0 0 10px rgba(255, 157, 0, 0.6);
}

.item-dropdown-thumb.disabled {
  opacity: 0.35;
  filter: grayscale(100%);
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.15);
}

.item-dropdown-thumb.disabled:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

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

.item-dropdown-thumb[data-layout="monte"] img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* ── Player de Música (Topo Direito Expansível) ── */
music-player {
  position: fixed;
  top: 21px;
  right: 20px;
  z-index: 10000;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

music-player:hover,
music-player:focus-within {
  opacity: 1;
}

.music-player-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 20px;
  padding: 0 8px;
  background: rgba(15, 8, 4, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 157, 0, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

music-player:hover .music-player-wrapper {
  width: auto;
  height: 38px;
  border-radius: 20px;
  padding: 5px 12px;
  justify-content: flex-end;
}

.music-player-items {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

music-player:hover .music-player-items {
  max-width: 320px;
  opacity: 1;
  pointer-events: auto;
  margin-right: 6px;
}

.icone-player {
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.icone-player:hover {
  transform: scale(1.15);
}

.volume-trigger {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#volume {
  width: 70px;
  accent-color: #ff9d00;
  cursor: pointer;
}

/* ── Modais de Confirmação e Info ── */
.confirmacao-overlay,
.modal-info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 25000;
}

.confirmacao-box {
  background: #190f07;
  border: 2px solid #ff9d00;
  border-radius: 12px;
  padding: 28px 30px;
  width: 480px;
  max-width: 90vw;
  color: #f5e6d3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
}

.mensagem-confirmacao {
  text-align: center;
  font-size: 14px;
  color: #f5e6d3;
  margin: 8px 0 4px 0;
  line-height: 1.5;
}

.botoes-confirmacao {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.btn-confirmar,
.btn-mp-primary {
  background: #ff9d00;
  color: #000;
  font-weight: bold;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-cancelar,
.btn-mp-secundary {
  background: #3a2512;
  color: #fff;
  border: 1px solid #ff9d00;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
}

/* ── Botão e Modal de Informação (A Física e a Metafísica) ── */
.btn-info-shuffle {
  background: rgba(255, 157, 0, 0.15);
  color: #ff9d00;
  border: 1px solid #ff9d00;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: 13px;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  align-self: center;
}

.btn-info-shuffle:hover {
  background: #ff9d00;
  color: #190f07;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
}

.modal-info-metafisica-box {
  background: #190f07;
  border: 2px solid #ff9d00;
  border-radius: 12px;
  padding: 28px 30px;
  width: 480px;
  max-width: 90vw;
  color: #f5e6d3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  position: relative;
  box-sizing: border-box;
  animation: fadeIn 0.2s ease;
  display: flex;
  flex-direction: column;
}

.fechar-info-modal {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 24px;
  color: #ff9d00;
  cursor: pointer;
  line-height: 1;
  font-weight: bold;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.fechar-info-modal:hover {
  color: #fff;
  transform: scale(1.15);
}

.info-metafisica-titulo {
  font-size: 13px;
  color: #ff9d00;
  margin: 0 0 14px 0;
  padding-right: 24px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 157, 0, 0.3);
  padding-bottom: 10px;
}

.info-metafisica-conteudo {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  font-size: 16px;
  line-height: 1.45;
  color: #f5e6d3;
}

.info-metafisica-conteudo h3 {
  font-size: 16px;
  color: #ff9d00;
  margin: 12px 0 4px 0;
  font-weight: bold;
}

.info-metafisica-conteudo h3:first-child {
  margin-top: 0;
}

.info-metafisica-conteudo p {
  margin: 0 0 8px 0;
  color: #f5e6d3;
  font-size: 16px;
  font-weight: normal;
}

.info-metafisica-conteudo::-webkit-scrollbar {
  width: 6px;
}

.info-metafisica-conteudo::-webkit-scrollbar-track {
  background: rgba(15, 8, 4, 0.6);
  border-radius: 3px;
}

.info-metafisica-conteudo::-webkit-scrollbar-thumb {
  background: #5c3a21;
  border-radius: 3px;
  border: 1px solid rgba(255, 157, 0, 0.3);
}

.info-metafisica-conteudo::-webkit-scrollbar-thumb:hover {
  background: #8c5732;
}

/* ── Opções de Embaralhamento (menu redesenhado) ── */
.opcao-embaralhamento {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.opcao-embaralhamento-titulo {
  font-size: 13px;
  font-weight: 600;
  color: #ff9d00;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 157, 0, 0.25);
}

.opcao-embaralhamento-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 15px;
  color: #f5e6d3;
  user-select: none;
}

.opcao-embaralhamento-label:hover {
  background: rgba(255, 157, 0, 0.08);
}

.opcao-embaralhamento-label input[type="radio"],
.opcao-embaralhamento-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ff9d00;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.opcao-embaralhamento-label input[type="radio"] {
  border-radius: 50%;
}

.opcao-embaralhamento-label input[type="checkbox"] {
  border-radius: 4px;
}

.opcao-embaralhamento-label input[type="radio"]:checked {
  border-color: #ff9d00;
  background: #ff9d00;
  box-shadow: inset 0 0 0 3px #190f07;
}

.opcao-embaralhamento-label input[type="checkbox"]:checked {
  border-color: #ff9d00;
  background: #ff9d00;
}

.opcao-embaralhamento-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: bold;
  color: #190f07;
  line-height: 1;
}

.opcao-embaralhamento-divisor {
  height: 1px;
  background: rgba(255, 157, 0, 0.15);
  margin: 6px 12px;
}

.opcao-embaralhamento .disabled-selection {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Cursores Remotos (Multiplayer) ── */
.virtual-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 250;
  transition: left 0.05s linear, top 0.05s linear;
}

.virtual-cursor-label {
  position: absolute;
  top: 16px;
  left: 10px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
}

/* ── Embaralhamento Interativo ── */
#embaralhamentoInterativo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  backdrop-filter: none;
  z-index: 25000;
}


/* ── Efeito Visual Mandala Vetorial SVG Pós-Embaralhamento ── */
#efeitoMandala {
  display: none;
  width: 550px;
  height: 550px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.mandala-svg {
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* Camada externa gira no sentido horário (mesmo sentido do leque circular) */
.mandala-camada-externa {
  transform-origin: 250px 250px;
  animation: girarMandalaHorario 3.5s linear infinite;
  will-change: transform;
}

/* Camada interna gira em contra-rotação suave para profundidade mística */
.mandala-camada-interna {
  transform-origin: 250px 250px;
  animation: girarMandalaAntiHorario 7s linear infinite;
  will-change: transform;
}

@keyframes girarMandalaHorario {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes girarMandalaAntiHorario {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

.cartaEmbInt {
  width: 104px;
  height: 186px;
  /* Aumentado em 130% */
  cursor: grab;
  user-select: none;
}

.imagemEmbInt {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ── Painel Lateral Multiplayer (Drawer) ── */
.painel-mp-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: rgba(25, 15, 7, 0.95);
  backdrop-filter: blur(10px);
  border-left: 2px solid #ff9d00;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f5e6d3;
}

.painel-mp-drawer.aberto {
  right: 0;
}

.painel-mp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 157, 0, 0.3);
}

.painel-mp-header h2 {
  font-family: var(--font-title);
  color: #ff9d00;
  font-size: 18px;
  margin: 0;
}

.fechar-drawer {
  font-size: 24px;
  color: #ff9d00;
  cursor: pointer;
  line-height: 1;
}

.fechar-drawer:hover {
  color: #fff;
}

.painel-mp-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bloco-mp {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 157, 0, 0.2);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bloco-mp h3 {
  font-size: 14px;
  color: #ff9d00;
  margin-bottom: 4px;
}

.bloco-mp input[type="text"],
.bloco-mp input[type="password"] {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 4px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.bloco-mp input:focus {
  border-color: #ff9d00;
}

.btn-mp-danger {
  background: #a31c1c;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.lista-salas,
.lista-participantes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.txt-vazio {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.item-sala {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 157, 0, 0.08);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── Chat Flutuante ── */
.chat-floating-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  height: 380px;
  background: rgba(25, 15, 7, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #ff9d00;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
  z-index: 210;
  flex-direction: column;
  color: #f5e6d3;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 157, 0, 0.3);
}

.chat-header h3 {
  font-size: 14px;
  color: #ff9d00;
  margin: 0;
}

.fechar-chat {
  font-size: 20px;
  color: #ff9d00;
  cursor: pointer;
}

.chat-mensagens-box {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.msg-chat {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
  border-radius: 4px;
  word-break: break-word;
}

.msg-chat-nome {
  color: #ff9d00;
  font-weight: bold;
}

.msg-chat-time {
  font-size: 10px;
  color: #888;
  float: right;
  margin-top: 2px;
}

.msg-sistema {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
  text-align: center;
  margin: 2px 0;
}

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid rgba(255, 157, 0, 0.2);
}

.chat-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 4px;
  padding: 6px 8px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

/* ── Modal de Autenticação (Login) ── */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 25000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease-out;
}

.login-modal-box {
  background: linear-gradient(135deg, rgba(28, 20, 16, 0.95), rgba(15, 10, 8, 0.98));
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 157, 0, 0.15);
  width: 90%;
  max-width: 420px;
  overflow: hidden;
  color: #f5e6d3;
  font-family: inherit;
}

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 157, 0, 0.25);
}

.login-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #ff9d00;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.login-modal-close {
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.login-modal-close:hover {
  color: #ff9d00;
}

.login-modal-body {
  padding: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 0.85rem;
  color: #d1c2b0;
  font-weight: 500;
}

.login-field input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 157, 0, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-field input:focus {
  border-color: #ff9d00;
  box-shadow: 0 0 8px rgba(255, 157, 0, 0.3);
}

.login-btn-primary {
  margin-top: 8px;
  background: linear-gradient(135deg, #ff9d00, #e67e00);
  border: none;
  border-radius: 6px;
  color: #111;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.1s ease;
}

.login-btn-primary:hover {
  filter: brightness(1.15);
}

.login-btn-primary:active {
  transform: scale(0.98);
}

.login-btn-secondary {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px solid rgba(255, 80, 80, 0.6);
  border-radius: 6px;
  color: #ff6b6b;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-btn-secondary:hover {
  background: rgba(255, 80, 80, 0.15);
}

.login-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.login-link {
  color: #ffb84d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-link:hover {
  color: #fff;
  text-decoration: underline;
}

.login-separator {
  color: #666;
}

.login-feedback {
  font-size: 0.85rem;
  text-align: center;
  min-height: 18px;
}

.login-feedback.error {
  color: #ff6b6b;
}

.login-feedback.success {
  color: #4cd964;
}

.login-info-text {
  font-size: 0.95rem;
  color: #f5e6d3;
  margin-bottom: 10px;

  line-height: 1.4;
}

.login-info-subtext {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;

  margin-bottom: 12px;
}

.login-profile-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 157, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.login-profile-name {
  font-size: 1.1rem;
  color: #ff9d00;
  margin: 0 0 4px 0;
}

.login-profile-email {
  font-size: 0.85rem;
  color: #ccc;
  margin: 0;
}

/* ━━━ Estilos da Modal de Histórico de Consultas ━━━ */
.history-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 25000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease-out;
}

.history-modal-box {
  background: linear-gradient(135deg, rgba(28, 20, 16, 0.96), rgba(15, 10, 8, 0.98));
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 157, 0, 0.15);
  width: 92%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f5e6d3;
  font-family: inherit;
}

.history-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 157, 0, 0.25);
}

.history-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #ff9d00;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.history-modal-close {
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.history-modal-close:hover {
  color: #ff9d00;
}

.history-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.history-loading,
.history-empty {
  text-align: center;
  padding: 30px 15px;
  color: #d1c2b0;
}

.history-empty small {
  display: block;
  margin-top: 8px;
  color: #998877;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-card-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 157, 0, 0.2);
  border-radius: 8px;
  padding: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.history-card-item:hover {
  border-color: rgba(255, 157, 0, 0.45);
  background: rgba(0, 0, 0, 0.5);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px stroke rgba(255, 255, 255, 0.08);
}

.history-card-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffe699;
}

.history-badge-mp {
  background: rgba(255, 157, 0, 0.18);
  color: #ffb834;
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: bold;
}

.history-badge-single {
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
}

.history-card-details {
  font-size: 0.85rem;
  color: #d1c2b0;
  line-height: 1.5;
  margin-bottom: 12px;
}

.history-card-details p {
  margin: 2px 0;
}

.history-card-participantes {
  color: #ffb834;
}

.history-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-history-abrir {
  background: linear-gradient(135deg, #ff9d00, #d47a00);
  color: #120a04;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

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

.btn-limpar-historico {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

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

.btn-history-excluir {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 50, 50, 0.2);
  border: 1px solid rgba(200, 50, 50, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.btn-history-excluir:hover {
  background: rgba(200, 50, 50, 0.45);
  border-color: rgba(255, 80, 80, 0.6);
  transform: scale(1.05);
}

.icone-lixeira {
  width: 18px;
  height: 18px;
}

/* ━━━ Estilos para a Disposição em Monte ━━━ */
#baralho[data-disposicao="monte"] .divcartas .cartas:not(.tiradas) {
  box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.25), 1px 2px 5px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
}

/* ━━━ Indicadores de Borda (Off-Screen) ━━━ */
#offscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5000;
}

.offscreen-indicator {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: opacity 0.2s ease, transform 0.05s linear;
  user-select: none;
}

.offscreen-thumb-wrapper {
  width: 38px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #ffb834;
  box-shadow: 0 0 10px rgba(255, 184, 52, 0.4), inset 0 0 4px rgba(0, 0, 0, 0.5);
  background-color: #1c1007;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.offscreen-indicator:hover .offscreen-thumb-wrapper {
  transform: scale(1.15);
  border-color: #ffe699;
  box-shadow: 0 0 15px rgba(255, 230, 153, 0.8), inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.offscreen-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.offscreen-arrow {
  width: 18px;
  height: 18px;
  color: #ffb834;
  margin-top: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: transform 0.1s linear, color 0.2s ease;
}

.offscreen-indicator:hover .offscreen-arrow {
  color: #ffe699;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT MULTIPLAYER — Modal Flutuante Arrastável
   position: fixed → nunca segue pan/zoom da mesa
   ═══════════════════════════════════════════════════════════════ */

.chat-floating-panel {
  position: fixed;
  z-index: 9500;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-height: 480px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  background: #3b1f0c;
  border: 1px solid rgba(255, 180, 80, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 180, 80, 0.08);
  overflow: hidden;
  font-family: var(--font-body, 'Lato-Regular', Helvetica, sans-serif);
  user-select: none;
  transition: box-shadow 0.2s ease;
}

.chat-floating-panel:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 180, 80, 0.18);
}

/* Cabeçalho — área de drag */
.chat-header {
  cursor: grab;
  background: linear-gradient(135deg, #2a1508 0%, #3b1f0c 100%);
  padding: 10px 14px 10px 14px;
  border-bottom: 1px solid rgba(255, 180, 80, 0.18);
  flex-shrink: 0;
}

.chat-header:active {
  cursor: grabbing;
}

.chat-header-title {
  color: #f5e6d3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: capitalize;
  line-height: 1.3;
}

.chat-header-sub {
  color: rgba(245, 230, 211, 0.5);
  font-size: 10px;
  margin-top: 2px;
  line-height: 1.2;
}

.fechar-chat {
  cursor: pointer;
  color: rgba(245, 230, 211, 0.6);
  font-size: 18px;
  line-height: 1;
  transition: color 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
  user-select: none;
  padding: 2px;
}

.fechar-chat:hover {
  color: #f5e6d3;
}

/* Área de mensagens */
.chat-mensagens-box {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  scroll-behavior: smooth;
}

.chat-mensagens-box::-webkit-scrollbar {
  width: 4px;
}

.chat-mensagens-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.chat-mensagens-box::-webkit-scrollbar-thumb {
  background: rgba(255, 180, 80, 0.25);
  border-radius: 2px;
}

/* Mensagem de usuário */
.msg-chat {
  font-size: 13px;
  line-height: 1.45;
  color: #f5deb3;
  word-break: break-word;
  user-select: text;
}

.msg-chat-nome {
  font-weight: 700;
  /* cor definida via style inline por JS */
}

.msg-chat-texto {
  color: #f5deb3;
}

.msg-chat-time {
  font-size: 10px;
  color: rgba(245, 222, 179, 0.38);
  font-family: monospace;
  margin-right: 2px;
  flex-shrink: 0;
}

/* Mensagem de sistema (entrou/saiu) */
.msg-sistema {
  font-size: 11px;
  color: rgba(245, 222, 179, 0.35);
  text-align: center;
  font-style: italic;
  padding: 2px 0;
  border-top: 1px solid rgba(255, 180, 80, 0.06);
  border-bottom: 1px solid rgba(255, 180, 80, 0.06);
  margin: 2px 0;
}

/* Variante: desconexão da sala — destaque visível */
.msg-sistema.msg-desconexao {
  color: rgba(255, 180, 80, 0.7);
  border-top-color: rgba(255, 180, 80, 0.2);
  border-bottom-color: rgba(255, 180, 80, 0.2);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.3px;
}

.msg-sistema-time {
  font-family: monospace;
  font-size: 10px;
  opacity: 0.6;
  font-style: normal;
}

/* Área de input */
.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 180, 80, 0.12);
  background: #2a1508;
  flex-shrink: 0;
}

.chat-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 180, 80, 0.2);
  border-radius: 6px;
  color: #f5deb3;
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-body, 'Lato-Regular', Helvetica, sans-serif);
  outline: none;
  transition: border-color 0.2s ease;
  user-select: text;
}

.chat-input-row input:focus {
  border-color: rgba(255, 180, 80, 0.5);
  background: rgba(255, 255, 255, 0.09);
}

.chat-input-row input::placeholder {
  color: rgba(245, 222, 179, 0.3);
}

.chat-input-row .btn-mp-primary {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* ── Widget Flutuante de Zoom e Recentralização (Canto Inferior Direito) ── */
zoom-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

zoom-widget:hover,
zoom-widget:focus-within {
  opacity: 1;
}

.zoom-widget-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 8, 4, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 157, 0, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 157, 0, 0.1);
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  color: #ffb74d;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zoom-widget-wrapper:hover {
  border-color: rgba(255, 184, 52, 0.6);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 157, 0, 0.25);
}

.zoom-widget-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 184, 52, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: #ffcb6b;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  padding: 0;
  line-height: 1;
}

.zoom-widget-btn:hover {
  background: rgba(255, 184, 52, 0.25);
  color: #ffffff;
  border-color: #ffb834;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 184, 52, 0.4);
}

.zoom-widget-btn:active {
  transform: scale(0.92);
  background: rgba(255, 184, 52, 0.4);
}

.zoom-widget-value {
  font-size: 13px;
  font-weight: 700;
  color: #ffb74d;
  min-width: 44px;
  text-align: center;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 12px;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}

.zoom-widget-value:hover {
  color: #ffffff;
  background: rgba(255, 184, 52, 0.15);
  text-shadow: 0 0 6px rgba(255, 184, 52, 0.5);
}

.zoom-widget-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 157, 0, 0.3);
  margin: 0 3px;
}

.zoom-widget-btn.recentralize-btn {
  font-size: 12px;
}

.recentralize-svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.zoom-widget-btn.recentralize-btn:hover .recentralize-svg {
  transform: rotate(90deg);
}