html,
body {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background-color: var(--light-colour);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
}

/* -------------------------------------------------------------------------- */
/*                                    CARDS                                   */
/* -------------------------------------------------------------------------- */

.cardCounter {
  position: absolute;
  bottom: 2.5vmin;
}

.cardCounter p {
  font-size: 2vmin;
}

#cardNum {
  font-weight: 800;
}

.allCards {
  margin: 0 4vmin 0 4vmin;
}

#card-holder {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#dummy-cards {
  display: grid;
  align-items: center;
  justify-content: center;
  position: absolute;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

#dummy-cards .card-item {
  grid-row: 1/1;
  grid-column: 1/1;
  background-color: var(--dark-colour);
  filter: brightness(0.95);
}

#dummy-cards .card-item:nth-child(1) {
  rotate: 3deg;
}

#dummy-cards .card-item:nth-child(2) {
  rotate: -3deg;
}

.card-item {
  aspect-ratio: 3 / 2;
  min-width: 220px;
  min-height: 140px;
  max-height: 80vh;
  max-height: 80svh;
  width: clamp(220px, 80vw, 1000px);
  padding: 1.5vmin;
  background: var(--dark-colour);
  border-radius: 1vmin;
  box-shadow:
    rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
}

.card-item p {
  /* Generous base for classroom-at-distance reading (Aug 2026 text-size
     pass) — fit-text shrinks long items, so the base can afford to be big */
  font-size: 7vmin;
  text-align: center;
  text-wrap: balance;
  color: var(--white-colour);
}

#order-text {
  font-weight: 600;
}

#prev-button,
#next-button {
  width: 30vw;
  height: 100vh;
  height: 100svh;
  background-color: transparent;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 19;
  cursor: pointer;
}

#prev-button {
  left: 0;
  justify-content: flex-start;
}

#next-button {
  right: 0;
}

#prev-button svg,
#next-button svg {
  fill: rgba(0, 0, 0, 0.2);
  width: 7.5vw;
  height: auto;
  aspect-ratio: 1/1;
  margin: 2vw;
}

@media (max-aspect-ratio: 1/1) {
  .card-item {
    aspect-ratio: 2 / 3;
    min-width: 90px;
    min-height: 120px;
    max-height: 85vh;
    max-height: 85svh;
  }
}

.wobble-vertical-left {
  animation: wobble-vertical-left 0.8s linear both;
}
@keyframes wobble-vertical-left {
  0%,
  100% {
    transform: translateY(0) rotate(0);
    transform-origin: 50% 50%;
  }
  15% {
    transform: translateY(-30px) rotate(-6deg);
  }
  30% {
    transform: translateY(15px) rotate(6deg);
  }
  45% {
    transform: translateY(-15px) rotate(-3.6deg);
  }
  60% {
    transform: translateY(9px) rotate(2.4deg);
  }
  75% {
    transform: translateY(-6px) rotate(-1.2deg);
  }
}

.wobble-vertical-right {
  animation: wobble-vertical-right 0.8s linear both;
}
@keyframes wobble-vertical-right {
  0%,
  100% {
    transform: translateY(0) rotate(0);
    transform-origin: 50% 50%;
  }
  15% {
    transform: translateY(-30px) rotate(6deg);
  }
  30% {
    transform: translateY(15px) rotate(-6deg);
  }
  45% {
    transform: translateY(-15px) rotate(3.6deg);
  }
  60% {
    transform: translateY(9px) rotate(-2.4deg);
  }
  75% {
    transform: translateY(-6px) rotate(1.2deg);
  }
}
