.game-ui {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(0.5rem, 1.5vh, 1rem);
  height: 100%;
  padding-block: clamp(0.5rem, 1.5vh, 1rem);
}

.slide-2-layout .text-box {
  width: clamp(18rem, 34%, 26rem);
  max-width: 42%;
  min-width: 0;
  overflow: hidden;
}

.game-ui .card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.35rem, 0.8vw, 0.75rem);
  flex: 1 1 10rem;
  min-height: 5rem;
}

.game-ui .card-btn {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
}

.game-ui .remove-card-btn {
  padding: 0.5rem 1rem;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--rule);
  font: inherit;
  cursor: pointer;
}

.game-ui .remove-card-btn:hover,
.game-ui .remove-card-btn:focus-visible {
  color: var(--background);
  background: var(--foreground);
}

.game-ui .card {
  position: relative;
  height: 100%;
  max-height: min(24vh, 14rem);
  max-width: calc(100% - 5.25rem);
  aspect-ratio: 2 / 3;
  border: 5px solid #a62e96;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-ui .card-number {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.45rem;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 0.75rem;
  line-height: 1;
  pointer-events: none;
}

.game-ui .card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-ui .sliders-container {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.15vh, 0.85rem);
}

.game-ui .slider-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.15rem, 0.5vh, 0.35rem);
}

.game-ui .slider-group label {
  font-size: clamp(0.62rem, 0.65vw, 0.78rem);
}

.game-ui .slider-with-labels {
  display: grid;
  grid-template-columns: minmax(4.8rem, 1fr) minmax(5rem, 1.6fr) minmax(4.8rem, 1fr);
  align-items: center;
  gap: clamp(0.25rem, 0.5vw, 0.5rem);
  width: 100%;
}

.game-ui .slider-with-labels span {
  font-size: clamp(0.58rem, 0.65vw, 0.75rem);
  font-weight: bold;
  min-width: 0;
  white-space: nowrap;
}

.game-ui .slider-with-labels .left-label {
  text-align: right;
}

.game-ui .slider-with-labels .right-label {
  text-align: left;
}

.game-ui .slider-with-labels input {
  width: 100%;
  min-width: 0;
  accent-color: #a62e96; /* matching the painting brush purple */
}

.game-ui .slider-value {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--rule, #333);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  font-size: 0.7rem;
  margin-top: 0.1rem;
}

.game-ui .plot-container {
  display: flex;
  justify-content: center;
}

.game-ui .plot-btn {
  padding: 0.35rem 1.25rem;
  font-size: clamp(0.72rem, 0.85vw, 0.9rem);
  cursor: pointer;
}

@media (max-width: 800px) {
  .slide-2-layout .text-box {
    width: 46%;
    max-width: 46%;
    padding-inline: 0.75rem;
  }

  .game-ui .slider-with-labels {
    grid-template-columns: minmax(4.5rem, 1fr) minmax(4rem, 1.4fr) minmax(4.5rem, 1fr);
  }
}