.joke-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.joke-dialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  padding: 24px 18px 18px;
  border: 3px solid #000;
  border-radius: 16px;
  background: #fffdf5;
  box-shadow: 6px 6px 0 #000;
}

.joke-title {
  margin: 0;
  padding-right: 36px;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.15;
}

.joke-body { margin: 0; font-size: 1.05rem; font-weight: 600; }

.joke-actions { display: grid; gap: 10px; margin-top: 6px; }

.joke-button {
  min-height: 52px;
  padding: 0 16px;
  border: 3px solid #000;
  border-radius: 999px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  color: #000;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.joke-button-bump { background: var(--lime); }
.joke-button:active { transform: translate(3px, 3px); box-shadow: none; }

.joke-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 3px solid #000;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.confetti-piece {
  position: fixed;
  left: 50%;
  top: 60%;
  z-index: 1001;
  font-size: 1.6rem;
  pointer-events: none;
  animation: confetti-pop 0.9s ease-out forwards;
}

@keyframes confetti-pop {
  to { transform: translate(var(--x), var(--y)) rotate(360deg); opacity: 0; }
}
