.fichas button,
.fichas input {
  padding: 9px 12px;
  border: 2px solid #3a5470;
  border-radius: 12px;
  background: #1b2f42;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.fichas button {
  font-weight: 700;
  cursor: pointer;
}

.fichas :is(button, input):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.fichas-barra {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fichas-barra input {
  flex: 1;
  min-width: 180px;
}

.fichas-aviso {
  min-height: 1.2em;
  margin: 8px 0;
  color: #ffd54a;
}

.fichas-lista {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #2a4058;
  border-radius: 12px;
}

.fichas-lista button {
  display: grid;
  grid-template-columns: 3em 1fr 5.5em 4.5em 3.5em;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #22384e;
  border-radius: 0;
  background: none;
  font-weight: 400;
  text-align: left;
}

.fichas-lista button:hover,
.fichas-lista button.activo {
  background: #233a52;
}

.fichas-lista .nombre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fichas-vacio {
  padding: 10px;
  color: #9fb4c9;
}

.fichas .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fichas-cartas {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

@media (min-width: 900px) {
  .fichas-cartas.dos {
    grid-template-columns: 1fr 1fr;
  }
}

.ficha {
  padding: 14px;
  border: 2px solid #ffd54a;
  border-radius: 14px;
  background: #182a3b;
}

.ficha h4 {
  margin: 16px 0 8px;
  color: #9fb4c9;
  font-size: 15px;
}

.ficha-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ficha-nombre {
  margin: 6px 0 4px;
  color: #ffd54a;
  font-size: 20px;
}

.ficha-datos {
  margin: 2px 0;
  color: #cfe3ff;
  font-size: 14px;
}

.ficha-mejor {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.coleccion {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
}

.pez {
  position: relative;
  padding: 5px 3px;
  border: 2px solid var(--r, #2a4058);
  border-radius: 10px;
  background: #12202e;
  font-size: 11px;
  text-align: center;
}

.pez.falta {
  border-color: #2a4058;
  color: #6f849a;
}

.pez canvas {
  display: block;
  margin: 0 auto;
}

.pez .n {
  position: absolute;
  top: 2px;
  right: 5px;
  color: var(--r);
  font-weight: 800;
}

.misterio {
  height: 48px;
  font-size: 22px;
  line-height: 48px;
}

.logros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}

.logro {
  padding: 6px 10px;
  border-radius: 10px;
  background: #233a52;
  font-size: 13px;
}

.logro.solo {
  box-shadow: inset 0 0 0 2px #ffd54a;
}

.logro.bloqueado {
  background: #19283a;
  color: #6f849a;
  filter: grayscale(1);
}

#stats {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: auto;
  padding: 16px;
  background: rgba(5, 10, 18, 0.88);
}

#stats[hidden] {
  display: none;
}

#stats .stats-caja {
  max-width: 1000px;
  margin: 0 auto;
}

#stats .stats-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#stats h2 {
  margin: 0 0 12px;
}

.ver-stats {
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid #ffd54a;
  border-radius: 10px;
  background: rgba(255, 213, 74, 0.12);
  color: #ffd54a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
