._cardWrapper_1tv2q_1 {
  position: absolute;
  width: 100%;
  max-width: min(225px, 80vw); /* responsive width based on viewport */
  z-index: 1; /* base z-index, will be overridden by cardNumber */
}

._cardLabel_1tv2q_8 {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 14px;
  color: #fff;
  z-index: 1;
  font-weight: normal;
  padding: 3px 8px;
  border-radius: 50rem;
  background-color: #111;
  line-height: 1;
  backface-visibility: hidden;
}

._wordCard_1tv2q_23 {
  aspect-ratio: 3/2;
  margin-bottom: 15px;
  border-radius: 5px;
  position: sticky;
  z-index: 5;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  width: 100%;
  max-width: 100%;
}

/* pulse animation for word changes - scale animation with proper timing */
._wordCard_1tv2q_23._pulse_1tv2q_37 {
  transition: none; /* disable transition during pulse to avoid conflicts */
  animation: _pulseScale_1tv2q_1 0.4s ease-in-out;
}

@keyframes _pulseScale_1tv2q_1 {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* pulse animation for flipped cards - maintain rotation while scaling */
._wordCard_1tv2q_23._flipped_1tv2q_55._pulse_1tv2q_37 {
  animation: _pulseScaleFlipped_1tv2q_1 0.4s ease-in-out;
}

@keyframes _pulseScaleFlipped_1tv2q_1 {
  0% {
    transform: rotateY(180deg) scale(1);
  }
  50% {
    transform: rotateY(180deg) scale(1.05);
  }
  100% {
    transform: rotateY(180deg) scale(1);
  }
}

._wordCard_1tv2q_23._flipped_1tv2q_55 {
  transform: rotateY(180deg) !important;
}

._wordCard_1tv2q_23::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
  border-radius: 8px;
  backface-visibility: hidden;
}

._wordDisplay_1tv2q_91 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  backface-visibility: hidden;
}

._dirtyWord_1tv2q_101 {
  font-size: 6rem;
  font-weight: bold;
  margin: 0;
  font-family: "Grandstander", cursive;
  letter-spacing: 0.1em;
}

._cardBack_1tv2q_109 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: 4px;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  display: grid;
  grid-template-columns: 55% 45%;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: clamp(0.7rem, 2vh, 0.9rem);
}

[data-bs-theme="dark"] ._cardBack_1tv2q_109 {
  background-color: #343a40;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

._messageContainer_1tv2q_133 {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

._messageText_1tv2q_143 {
  width: 100%;
  text-align: left;
}

._messageText_1tv2q_143 p {
  margin-bottom: 0.5rem;
}

._messageText_1tv2q_143 p._lhSm_1tv2q_152 {
  line-height: 1.2;
}

._messageText_1tv2q_143 p._mb0_1tv2q_156 {
  margin-bottom: 0;
}

._messageBubble_1tv2q_160 {
  background-color: #eee;
  padding: clamp(5px, 2vh, 15px);
  font-size: clamp(0.5rem, 2.5vw, 1rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: calc(100% - 10px);
  position: relative;
  overflow-wrap: break-word;
  word-break: break-word;
  align-self: flex-start;
}

._messageBubble_1tv2q_160:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 0;
  height: 0;
  border: 20px solid transparent;
  border-top-color: #eee;
  border-bottom: 0;
  border-left: 0;
  margin-left: -10px;
  margin-bottom: -15px;
}

[data-bs-theme="dark"] ._messageBubble_1tv2q_160 {
  background-color: #495057;
}

[data-bs-theme="dark"] ._messageBubble_1tv2q_160::after {
  border-color: #495057 transparent transparent;
}

._senderIdentity_1tv2q_198 {
  font-weight: bold;
  z-index: 2;
  margin: 20px 0 0 10px;
  font-size: clamp(0.5rem, 2.5vw, 1rem);
}

[data-bs-theme="dark"] ._senderIdentity_1tv2q_198 {
  color: #adb5bd;
}

._recipientArea_1tv2q_209 {
  padding: clamp(5px, 2%, 10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

._postageStamp_1tv2q_218 {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(45px, 1vh, 200px);
  aspect-ratio: 0.8 / 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

._postageStamp_1tv2q_218:after {
  content: "PRESORTED FIRST CLASS PERMIT 42069";
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(5px, 0.5vh, 8px);
  text-transform: uppercase;
  font-family: Arial;
  color: #ccc;
  padding: 5px;
  height: 100%;
  width: 100%;
}

._recipientDetails_1tv2q_245 {
  margin-top: clamp(40px, 30%, 60px);
  font-size: clamp(0.5rem, 2.25vw, 0.75rem);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

._recipientDetails_1tv2q_245 strong,
._recipientDetails_1tv2q_245 span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.1em;
  line-height: 1.2;
}

._recipientDetails_1tv2q_245 span:last-child {
  margin-bottom: 0;
}

/* mobile centering for cascade - handled in WordCard.tsx positioning logic */

/* mobile media query for screens less than 768px - increase text sizes and padding */
@media (max-width: 767px) {
  ._cardBack_1tv2q_109 {
    padding: 8px;
  }
  ._messageBubble_1tv2q_160 {
    font-size: 8px;
    padding: 6px;
  }
  ._senderIdentity_1tv2q_198 {
    font-size: 8px;
  }
  ._recipientDetails_1tv2q_245 {
    font-size: 7px;
    margin-top: 10px;
  }
  ._postageStamp_1tv2q_218 {
    width: 30px;
  }
  ._postageStamp_1tv2q_218:after {
    font-size: 4px;
  }

  ._dirtyWord_1tv2q_101 {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  ._cardWrapper_1tv2q_1 {
    max-width: 400px; /* optimal size for desktop */
  }
}

/* new media query for mid-size screens (two-column grid) to shrink fonts */
@media (min-width: 768px) and (max-width: 1020px) {
  ._cardBack_1tv2q_109 {
    font-size: clamp(0.55rem, 1.4vh, 0.75rem);
  }
  ._messageBubble_1tv2q_160 {
    font-size: clamp(0.4rem, 1.6vw, 0.8rem);
    padding: clamp(4px, 1.4vh, 9px);
  }
  ._senderIdentity_1tv2q_198 {
    font-size: clamp(0.4rem, 1.6vw, 0.8rem);
  }
  ._recipientDetails_1tv2q_245 {
    font-size: clamp(0.4rem, 1.6vw, 0.65rem);
  }
}

/* new media query for very wide screens to adjust font sizes */
@media (min-width: 1400px) {
  ._cardBack_1tv2q_109 {
    font-size: clamp(
      0.55rem,
      1.4vh,
      0.75rem
    ); /* further reduced max font size */
  }
  ._messageBubble_1tv2q_160 {
    padding: clamp(4px, 1.5vh, 10px); /* slightly reduce padding */
    font-size: clamp(0.4rem, 1.7vw, 0.8rem); /* further reduced max font size */
  }
  ._messageText_1tv2q_143 p {
    margin-bottom: 0.3rem; /* reduce margin between paragraphs */
  }
}
._cardContainer_xwb2b_1 {
  width: 100%;
  padding: 20px 0;
  position: relative;
  display: flex;
  justify-content: center;
}

._cardsWrapper_xwb2b_9 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  min-height: 635px;
  margin: 0 auto; /* ensure centering */
  padding-bottom: 120px; /* extra padding to push content down */
}

/* mobile-specific centering */
@media (max-width: 767px) {
  ._cardContainer_xwb2b_1 {
    padding: 20px 20px; /* add horizontal padding on mobile */
  }

  ._cardsWrapper_xwb2b_9 {
    min-height: 355px; /* height for 3 cards with 130px spacing + card height */
    padding: 0 20px 100px 20px; /* add bottom padding for mobile */
    align-items: center; /* center the cascade group */
  }
}
#questions h5:nth-of-type(n + 2) {
    margin-top: 3rem;
  }