.playfield {
  user-select: none;
  margin: auto;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 14% 1fr 14%;
  gap: 1rem;
  flex: 1;
  justify-content: center;
  align-items: center;
  height: 0;
  overflow: hidden;
  transform: translateY(-100vh);
  transition: all 0.5s ease-in-out;
  aspect-ratio: 1;
  max-height: 93vh;
  max-width: 93vw;
}
.itson {
  transform: translateY(0);
  height: auto;
  overflow: visible;
}
.itson + .story {
  display: none;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.grid img {
  transform: rotateY(0deg) scale(1);
  transition: transform 0.5s ease-in-out;
}
.grid img:hover:not([data-card-id]) {
  transform: scale(1.05);
}
input {
  flex: 1;
}
.oppo,
.player {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}
.oppo img,
.player img {
  animation: slideIn 0.5s ease-in normal;
}
@keyframes slideIn {
  0% {
    animation-timing-function: ease-in;
    opacity: 0;
    transform: translateY(-100vh);
  }
  100% {
    animation-timing-function: ease-out;
    transform: translateY(0);
  }
}
.oppo:after,
.player:after {
  content: attr(data-wins);
  text-align: center;
  background: black;
  color: white;
  padding: 0.6rem;
  border-radius: 10%;
  display: inline-block;
  font-weight: bold;
}
.oppo img,
img[data-owner="oppo"] {
  filter: hue-rotate(85deg);
}
img {
  width: 100%;
  height: auto;
}
.active img {
  transition: transform 0.2s ease-in-out;
}
.active img:hover:not([data-card-id="-1"]),
.active img.active:not([data-card-id="-1"]) {
  transform: scale(1.1);
}
.winning img {
}
.active {
  pointer-events: initial;
  opacity: 1;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background: rgb(254, 244, 184);
  background: radial-gradient(circle, rgba(254, 244, 184, 1) 0%, rgba(255, 252, 212, 1) 67%, rgba(207, 169, 88, 1) 100%);
}
.settings {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 96vw;
  max-width: 1200px;
  margin-bottom: 1rem;
}
.settings label input {
  display: block;
}
.settings div {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.settings select {
  padding: 0.5rem;
}

.story {
  display: grid;
  grid-template-columns: 1fr minmax(100px, 14%);
  margin: auto;
  width: 96vw;
  max-width: 1200px;
  background: rgba(0, 0, 0, 0.1);
}
.story .deck {
  flex: 1;
  padding: 1rem;
  margin-bottom: auto;
}
.story .deck:before {
  content: "Deck "  attr(data-progress) ;
  display: block;;
}
.story .hand:before {
  content: "Hand";
  width: 100%;
  display: block;
  text-align: center;
}
.story img {
  width: 50px;
  line-height: 0;
  margin: 0.2rem;
  opacity: 0.6;
  transition: all 100ms ease-in;
}
.story .deck img:hover {
  opacity: 1;
  transform: scale(2);
  position: relative;
  z-index: 1;
}

.story .deck img:active,
.story .deck img.active {
  transform: scale(1);
  transition-duration: 50ms;
  opacity: 0.1;
}
.story button {
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 2rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.hand {
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(163, 42, 42, 0.7);
}
.hand img {
  width: 15vw;
  max-width: 93px;
  opacity: 1;
}
.winbig img {
  width: 15vw;
  opacity: 1;
}

.cards {
  display: flex;
  flex-direction: column;
}
.winnings {
  display: none;
}
.justwin {
  flex: 1;
  text-align: center;
}
.winbig {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  background: rgba(254, 244, 184, 0.4);
  padding: 1rem;
}
.justwin {
  padding: 1rem;
}
.justwin {
  padding: 1rem;
}
.losings {
  display: none;
  padding: 1rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
