/*BALAN v0.6.4 DX- styles.css - Hoja de Estilos Unificado*/

:root {
  /* Variables de entorno de la Mesa de Juego */
  --bg: #004d4d;
  --accent: #00c8ff;
  --danger: #a83232;

  /* Paleta cromática unificada de Palos y Botones*/
  --espadas: #0092ff;
  --treboles: #439f7a;
  --corazones: #fe4c40;
  --diamantes: #ff8e01;
}

/*Configuracion de Base y de Fondos*/
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 14px;
  overflow: hidden;
  font-family: 'Times New Roman', Times, serif;
}

/*Fondo de index*/
body.fmenu {
  background-image: url('Images/fbalan1.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.fmenu.aviva-pastoral-activa {
  background-image: url('Images/fbalan2.png');
}

body.fmenu.aviva-pastoral-activa #pantallacarga {
  background-image: url('Images/fbalan0go.png');
}

body.aviva-pastoral-activa button {
  background-image: radial-gradient(ellipse at 15% 15%,
    #fe4c40 0%, #fe4c40 16.67%,
    #ee4137 16.67%, #ee4137 33.33%,
    #de352e 33.33%, #de352e 50%,
    #cd2a25 50%, #cd2a25 66.67%,
    #bd1e1c 66.67%, #bd1e1c 83.33%,
    #ad1313 83.33%, #ad1313 100%) !important;
}

/*Fondo de game.html*/
body.fgame {
  background-image: url('Images/fgbalan.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.fgame.game-over-state {
  background-image: url('Images/fgbover.png');
}

/*Pantalla de carga*/
#pantallacarga {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('Images/fbalan0.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: #ffffff;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.logocarga {
  max-width: 500px;
  height: auto;
  margin-bottom: 30px;
  display: block;
}

#texto-carga {
  font-size: 1rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#pantallacarga progress {
  width: 300px;
  height: 20px;
  display: block;
}

#mensaje-inicio {
  margin-top: 30px;
  font-size: 0.8rem;
  color: #ffffff;
  display: none;
  animation: parpadeoCargaGame 0.8s infinite steps(2);
  text-align: center;
  line-height: 1.6;
}

@keyframes parpadeoCargaGame {
  to { opacity: 0; }
}

/* 3. INTERFAZ GRÁFICA DEL MENÚ DE INICIO (index.html) - ELÁSTICA */
#tu-menu-establecido {
  display: none;
}

.menu-container {
  height: 100vh;
  padding: 30px;
  box-sizing: border-box;
  width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  gap: 15px;
}

.title-area {
  margin-bottom: 10px;
}

.title-area h1 {
  margin: 0;
  font-size: 48px;
}

.title-area p {
  margin-top: 5px;
  font-size: 18px;
  color: #ffffff;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.botonredondo, .menu-button {
  position: relative;
  width: 220px;
  height: 90px;
  border-radius: 50%;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 4;
  font-weight: normal;
  color: #ffffff;
  text-shadow: none;
  transition: none !important;
  font-family: var(--fuente-boton-dinamica, "Times New Roman", Times, serif);
}

.botonredondo:hover, .menu-button:hover {
  filter: brightness(1.1) contrast(1.20);
}

.botonredondo:active, .menu-button:active {
  filter: brightness(0.85) contrast(1.15);
}

.botonredondo[disabled], .menu-button[disabled] {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #eeeeee 0%,  #eeeeee 20%, 
    #999999 20%, #999999 60%, 
    #555555 60%, #555555 100%
  ) !important;
  filter: opacity(0.5);
  cursor: not-allowed;
}

/* ─── PINTURAS CROMÁTICAS EXCLUSIVAS DE TU LABORATORIO ─── */
.bazul, #playBtn {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #0092ff 0%,     #0092ff 16.67%,
    #0b88f9 16.67%, #0b88f9 33.33%,
    #157ef4 33.33%, #157ef4 50.00%,
    #2074ee 50.00%, #2074ee 66.67%,
    #2a6ae9 66.67%, #2a6ae9 83.33%,
    #3560e3 83.33%, #3560e3 100%
  );
}

.brojo {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #fe4c40 0%,     #fe4c40 16.67%,
    #ee4137 16.67%, #ee4137 33.33%,
    #de352e 33.33%, #de352e 50.00%,
    #cd2a25 50.00%, #cd2a25 66.67%,
    #bd1e1c 66.67%, #bd1e1c 83.33%,
    #ad1313 83.33%, #ad1313 100%
  );
}

.bamarillo, #settingsBtn {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #ff8e01 0%,     #ff8e01 16.67%,
    #ff8304 16.67%, #ff8304 33.33%,
    #ff7807 33.33%, #ff7807 50.00%,
    #ff6c0b 50.00%, #ff6c0b 66.67%,
    #ff610e 66.67%, #ff610e 83.33%,
    #ff5611 83.33%, #ff5611 100%
  );
}

.berde, #creditsBtn {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #34bd85 0%,     #34bd85 16.67%,
    #37b282 16.67%, #37b282 33.33%,
    #3aa77e 33.33%, #3aa77e 50.00%,
    #3d9c7b 50.00%, #3d9c7b 66.67%,
    #409177 66.67%, #409177 83.33%,
    #438674 83.33%, #438674 100%
  );
}

.bgris {
  background-image: radial-gradient(ellipse at 15% 15%, 
    #b9c2d3 0%,     #b9c2d3 16.67%,
    #9da7b5 16.67%, #9da7b5 33.33%,
    #828c97 33.33%, #828c97 50.00%,
    #667078 50.00%, #667078 66.67%,
    #4b555a 66.67%, #4b555a 83.33%,
    #2f3a3c 83.33%, #2f3a3c 100%
  );
}

.cuadro-marcador-retro {
  position: relative;
  border-radius: 8px;
  padding: 15px;
  box-sizing: border-box;
  color: #ffffff;
  text-shadow: none;
  background-color: #2f3a3c !important;
    box-shadow: 
    inset 5px 5px 0px 0px #1d2b2c,
    1px 1px 0px 0px #3b5055 !important;
  transition: none !important;
}

.cuadro-marcador-retro select {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-weight: normal;
}

.cuadro-marcador-retro select option {
  background-color: #1d2b2c !important;
  color: #ffffff !important;
  font-family: inherit;
  font-weight: normal;
}

.cuadro-relieve-salido {
  background-color: #2f3a3c !important;
  box-sizing: border-box;
  border-radius: 12px;
  color: #ffffff;
  text-shadow: none;
    box-shadow: 
    inset 1px 1px 0px 0px #708387,
    1px 1px 0px 0px #1d2b2c,
    2px 2px 0px 0px #1d2b2c,
    3px 3px 0px 0px #1d2b2c,
    4px 4px 0px 0px #1d2b2c,
    5px 5px 0px 0px #1d2b2c !important;
}

.footer {
  color: #ffffff;
  margin-top: 20px;
  font-size: 13px;
}

.content-panel {
  position: absolute;
  top: 40px;
  left: 400px;
  right: 40px;
  bottom: 40px;
  overflow: visible !important; 
  background: transparent !important;
  border: none !important;
}

.panel-bienvenida-limpio {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.content-box {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  padding-right: 25px;
  box-sizing: border-box;
  color: #ffffff;
  text-shadow: none;
  background: transparent;
  box-shadow: none;
  border: none;
  transition: none !important;
}

.cuadro-marcador-retro h2, .content-box h2, .cuadro-relieve-salido h2 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-menu {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.volume-control {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.volume-control input[type="range"] {
  cursor: pointer;
  width: 200px;
}

.card-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  grid-template-areas: "title title" "fields preview";
  align-items: center;
  gap: 12px 20px;
  width: min(680px, 100%);
  margin: 12px 0 8px;
  padding: 14px;
  color: #ffffff;
  background: transparent;
  border-radius: 12px;
}

.card-settings strong {
  grid-area: title;
  font-size: 16px;
}

.card-settings-fields {
  grid-area: fields;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
}

.card-setting-row > label:first-child,
.card-size-row > span {
  flex: 0 0 116px;
}

.card-setting-row > label[for="tamanoFuenteCartas"],
.card-setting-row > label[for="tamanoPaloCarta"] {
  flex-basis: 190px;
}

.card-setting-row label[for="anchoCarta"],
.card-setting-row label[for="altoCarta"] {
  flex: 0 0 auto;
}

.card-setting-select,
.card-setting-number {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  padding: 0 8px;
}

.card-setting-select {
  flex: 1 1 auto;
  max-width: 250px;
}

.card-setting-number {
  flex: 1 1 70px;
  max-width: 96px;
}

.card-setting-select select,
.card-setting-number input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  font: inherit;
}

.card-setting-select select {
  cursor: pointer;
}

.card-setting-number input {
  font-size: 14px;
}

.card-bold-button {
  flex: 0 0 48px;
  width: 48px;
  height: 40px;
  font-size: 12px;
}

.card-preview-wrap {
  grid-area: preview;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(112, 131, 135, 0.45);
  border-radius: 8px;
}

.muestra-carta {
  flex: 0 0 auto;
  cursor: default;
  transform: none !important;
  transition: width .12s ease, height .12s ease, font-size .12s ease;
}

.card-settings-apply {
  width: min(680px, 100%);
  margin: 0 0 20px;
}

@media (max-width: 600px) {
  .card-settings {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "fields" "preview";
  }

  .card-preview-wrap {
    min-height: 130px;
  }

  .card-setting-row > label[for="tamanoFuenteCartas"],
  .card-setting-row > label[for="tamanoPaloCarta"] {
    flex-basis: 190px;
  }
}

/* Keep controls visually consistent with the other retro settings fields. */
.card-settings select,
.card-settings input {
  min-width: 0;
  box-sizing: border-box;
  color: #ffffff;
}

.app {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 10px;
  gap: 20px;
  box-sizing: border-box;
}
.panel {
  width: 240px;
  padding: 20px 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-sizing: border-box;
  flex-shrink: 0;
  background-color: #2f3a3c !important;
  box-shadow: 
    inset 1px 1px 0px 0px #708387,
    1px 1px 0px 0px #1d2b2c,
    2px 2px 0px 0px #1d2b2c,
    3px 3px 0px 0px #1d2b2c,
    4px 4px 0px 0px #1d2b2c,
    5px 5px 0px 0px #1d2b2c !important;
}

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

.visor-estatico-hueco {
  background-color: #2f3a3c;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 1.05rem;
  color: #ffffff !important; /* Unificado en blanco puro */
  text-shadow: none;
  box-shadow: 
    inset 4px 4px 0px 0px #1d2b2c,
    1px 1px 0px 0px #3b5055;
  transition: none !important;
}
.visor-chico { width: 100px; height: 36px; font-size: 0.9rem; }
.visor-ancho { width: 210px; height: 38px; }
.visor-principal { width: 210px; height: 50px; font-size: 1.4rem; }
.limits-headings {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: normal;
}
.limits-headings > div {
  width: 100px;
  text-align: center;
}
.hand-headings {
  color: #ffffff;
  font-size: 0.82rem;
}
.hand-headings > div { text-align: center; }
.hand-headings > div:first-child { width: 135px; }
.hand-headings > div:last-child { width: 67px; }
.hand-name-box { width: 135px; height: 38px; }
.hand-level-box { width: 67px; height: 38px; }
.tokens-display {
  justify-content: center;
  margin: 0;
  color: #ffffff;
}
.tokens-display > span { width: 82px; text-align: right; }
.tokens-display .visor-chico { width: 100px; }
#addCardBtn[hidden] { display: none !important; }
.score-label {
  width: 100%;
  color: #ffffff;
  text-align: center;
  font-size: 0.85rem;
}
.visor-incrustado-9c {
  width: 95px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 1.1rem;
  color: #ffffff !important;
  text-shadow: none;
  box-shadow: 1px 1px 0px 0px #1d2b2c;
  transition: none !important;
}

.x-symbol {
  font-weight: normal;
  font-size: 18px;
  color: #ffffff !important;
  text-shadow: 1px 1px 1px #1d2b2c;
  padding: 0;
}

.t-azul { color: #49b7ff !important; text-shadow: 1px 1px 1px rgba(0,0,0,0.8); }
.t-rojo { color: #ff7777 !important; text-shadow: 1px 1px 1px rgba(0,0,0,0.8); }
.t-amarillo { color: #ffe27a !important; text-shadow: 1px 1px 1px rgba(0,0,0,0.8); }
.small { font-size: 12px; }
.result-current { opacity: 0; transition: opacity .15s ease; }

.result-current {
  opacity: 0;
  transition: opacity .15s ease;
}

.board {
  flex: 1;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  min-width: 0;
}

.level-complete-panel {
  width: min(100%, 760px);
  margin: 28px auto;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.level-complete-panel h2,
.level-complete-panel h3,
.level-complete-panel p {
  margin: 0;
}

.level-complete-panel hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 10px 0;
}

.level-complete-panel .botonredondo {
  align-self: center;
  width: 220px;
  height: 72px;
  margin-top: 12px;
  font-size: 1rem;
}

.level-complete-panel[hidden],
#gameplayArea[hidden],
.store-panel[hidden],
.game-over-panel[hidden] {
  display: none !important;
}

.game-over-panel h2 { text-align: center; }
.game-over-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.game-over-actions .botonredondo {
  width: min(100%, 270px);
  min-height: 62px;
  height: auto;
  padding: 12px 18px;
  font-size: 0.9rem;
}

.store-panel {
  width: min(100%, 900px);
  margin: 20px auto;
  padding: 24px;
}

.store-panel h2 { text-align: center; margin: 0 0 20px; }
.store-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.store-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.store-actions .botonredondo {
  width: 100%;
  min-height: 54px;
  height: auto;
  padding: 10px 16px;
  font-size: 0.9rem;
}
.store-cost { margin: 0 0 10px; text-align: center; }
.store-actions #storeDescription {
  min-height: 78px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  line-height: 1.45;
}
.store-actions #nextRoundBtn { margin-top: auto; }
.upgrade-offers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 220px;
}
.upgrade-card {
  width: 148px;
  height: 148px;
  padding: 8px;
  display: grid;
  grid-template-rows: 25px minmax(0, 1fr) 25px;
  justify-items: center;
  align-items: center;
  color: #111;
  background: #ececec;
  border: 0;
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: none !important;
  outline: none;
}
.upgrade-card:hover { transform: none; filter: none; }
.upgrade-card.selected {
  transform: translateY(-12px);
  border: 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}
.upgrade-card-name {
  width: 100%;
  font-size: 0.88rem;
  font-weight: bold;
  text-align: center;
  line-height: 1.15;
}
.upgrade-card-symbol {
  color: #439f7a;
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1;
}
.upgrade-card-symbol-bottom { transform: none; }
.upgrade-offers-empty {
  width: 100%;
  text-align: center;
  opacity: 0.8;
}

.played-area {
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}

.hand {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.card {
  position: relative;
  width: 76px;
  height: 112px;
  background: #ececec;
  color: #111;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
  transition: transform .12s ease, opacity .15s;
}

.card .suit {
  font-size: 1.2em;
}

.espadas { color: var(--espadas); }
.treboles { color: var(--treboles); }
.corazones { color: var(--corazones); }
.diamantes { color: var(--diamantes); }

.card.selected {
  transform: translateY(-12px);
}

.order-badge {
  position: absolute;
  top: -10px;
  left: 4px;
  background: #1d2b2c;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid #708387;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.2);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.boton-tablero-ovalado {
  position: relative;
  height: 48px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
  transition: none !important;
}
.boton-tablero-ovalado:hover { filter: brightness(1.2) contrast(1.35); }
.boton-tablero-ovalado:active { filter: brightness(0.85) contrast(1.15); }

.w-x { width: 48px; }
.w-jugar { width: 95px; }
.w-descartar { width: 110px; }
.w-carta { width: 90px; }
.w-categoria { width: 110px; }
.w-baraja { width: 90px; }

.info {
  margin-top: 8px;
  color: #b9c2d3;
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-back.open {
  display: flex;
}

.modal {
  background: #2f3a3c;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 680px;
  color: #ffffff;
  font-size: 13px;
  box-sizing: border-box;
  box-shadow: 
    inset 5px 5px 0px 0px #1d2b2c,
    1px 1px 0px 0px #3b5055;
}

.deck-modal {
  width: min(96vw, 980px);
  max-width: 980px;
  max-height: 92vh;
  padding: 24px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deck-title { margin: 0; text-align: center; }

.toggles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}
.deck-modal .toggles .botonredondo,
.deck-modal > #closeModal {
  width: min(100%, 210px);
  height: 58px;
  padding: 8px 14px;
  font-size: 0.9rem;
}
.deck-modal .deck-view-active { outline: 2px solid #ffffff; outline-offset: 2px; }
#deckView {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(60vh, 470px);
  padding: 8px 6px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.deck-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 490px;
}
.deck-suit-label { font-weight: bold; text-align: center; }
.deck-cards { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 5px; }

.deck-card {
  min-width: 0;
  height: 58px;
  padding: 3px 2px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 5px;
  background: #ececec;
  color: #111;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  font-size: 0.68rem;
  line-height: 1;
}
.deck-card-suit { font-size: 1.15rem; line-height: 1; }
.deck-card.espadas { color: var(--espadas); }
.deck-card.corazones { color: var(--corazones); }
.deck-card.treboles { color: var(--treboles); }
.deck-card.diamantes { color: var(--diamantes); }
.deck-legend { display: flex; justify-content: center; gap: 20px; margin: 0; opacity: 0.9; font-size: 0.82rem; }
.deck-legend-hand { color: #49b7ff; }

.deck-card.in-hand {
  outline: 2px solid #49b7ff;
  outline-offset: 1px;
}

.deck-card.discarded {
  opacity: 0.3;
}

@media (max-width: 800px) {
  .app {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  html, body {
    overflow: auto;
  }
  .app {
    flex-direction: column;
  }
  .panel {
    width: 100%;
  }
  .board {
    width: 100%;
  }
  .level-complete-panel {
    margin: 12px auto;
    padding: 20px 16px;
  }
  .deck-modal { padding: 18px 14px; }
  .deck-modal .toggles { gap: 8px; }
  .deck-modal .toggles .botonredondo,
  .deck-modal > #closeModal { width: min(100%, 190px); height: 52px; }
  .deck-legend { flex-wrap: wrap; gap: 4px 14px; }
  .store-panel { padding: 18px 14px; }
  .store-layout { grid-template-columns: 1fr; gap: 18px; }
  .store-actions { order: 2; }
  .upgrade-offers { order: 1; gap: 10px; }
  .upgrade-card { width: 128px; height: 128px; padding: 7px; }
  .upgrade-card-name { font-size: 0.76rem; }
}

/* Ajustes para menú, configuraciones y partida en teléfonos. */
@media (max-width: 760px) {
  html, body { min-height: 100%; }

  body.fmenu {
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background-attachment: scroll;
  }

  #tu-menu-establecido {
    position: relative;
    min-height: 100dvh;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }

  .menu-container {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: max(20px, env(safe-area-inset-top)) 18px 12px;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .title-area { margin: 0; width: 100%; }
  .logo-menu { width: min(76vw, 300px); max-width: 100%; margin: 0 auto 8px; }
  .title-area p { margin: 0; }
  .menu-buttons { width: 100%; align-items: center; gap: 10px; }
  .menu-buttons > button {
    width: min(86vw, 260px);
    height: 62px;
    min-height: 48px;
  }
  .footer { margin-top: 4px; text-align: center; }

  .content-panel {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 900px;
    margin: 4px auto 16px;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .content-box {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 12px 4px;
  }
  #contentBox input,
  #contentBox select,
  #contentBox textarea,
  #contentBox button { max-width: 100%; box-sizing: border-box; }

  .modalfuentesback {
    align-items: center;
    overflow-y: auto;
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
  .modalfuentes {
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 24px);
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .pestañasfuentes { flex-wrap: wrap; justify-content: center; }
  .pestañasfuentes > button { flex: 1 1 92px; min-height: 44px; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .menu-container { padding-top: 12px; }
  .logo-menu { width: min(42vw, 220px); }
  .menu-buttons { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .menu-buttons > button { width: min(29vw, 190px); height: 54px; }
}

@media (pointer: coarse) {
  button, input, select, textarea { touch-action: manipulation; }
}

.modalfuentesback {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: none !important; /* Exigencia estricta del contrato */
}

.modalfuentesback.open {
  display: flex;
}

.modalfuentes {
  width: 420px;
  padding: 25px;
  border-radius: 8px;
  font-size: 13px;
  transition: none !important;
}

.pestañasfuentes {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 15px 0;
}

.btnpestaña {
  border-radius: 4px !important; /* Rígido, menos circular para pestañas */
}

.btnpestaña.activa {
  filter: brightness(1.2) contrast(1.35);
  box-shadow: inset 3px 3px 0px 0px #1d2b2c !important; /* Apariencia de presionada */
}

.seccionfuente {
  background-color: #1d2b2c;
  padding: 15px;
  border-radius: 6px;
  box-shadow: inset 4px 4px 0px 0px #0e1516;
  min-height: 100px;
  box-sizing: border-box;
}

.campofuentetexto {
  width: 100%;
  background-color: #1d2b2c;
  border: none;
  outline: none;
  padding: 10px;
  box-sizing: border-box;
  color: #ffffff;
  font-weight: normal;
  border-radius: 4px;
  box-shadow: inset 3px 3px 0px 0px #0e1516;
  font-family: inherit;
}

.campofuentetexto:focus {
  box-shadow: 
    inset 3px 3px 0px 0px #0e1516,
    0px 0px 0px 2px #ff8e01; /* Foco color naranja Halloween */
}
body,
body * {
  -webkit-text-stroke: 0 transparent !important;
  text-stroke: 0 transparent !important;
}
/* fin del styles.css */
