/* Rubber-stamp ink on the cards, the stamp in hand, and the accusation slip on the rail. */

.suspect, .motive, .weapon { position: relative; }

.stamp-mark {
  position: absolute;
  top: var(--stamp-top, 25%);
  left: var(--stamp-left, 12%);
  z-index: 3;
  padding: 2px 10px 3px;
  border: 3px solid currentColor;
  border-radius: 3px;
  color: var(--red);
  font-family: var(--font-type);
  font-size: 20px;
  letter-spacing: 0.2em;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.86;
  mix-blend-mode: multiply;
  filter: url(#rough-ink);
  transform: rotate(var(--stamp-rot, -10deg));
  animation: thump 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.stamp-mark.pending { opacity: 0.7; }
/* A LIAR stamp waiting for "what really happened": it pulses until the player answers. */
.stamp-mark.awaiting { animation: awaiting 1.8s ease-in-out infinite; }
@keyframes awaiting { 50% { opacity: 0.45; } }
.pin-suspect:has(.stamp-mark.awaiting) { cursor: help; }
.stamp-mark.spent { opacity: 0.62; }
.stamp-mark.right { color: var(--blue); opacity: 0.9; }
.stamp-number {
  margin-left: 6px;
  font-size: 13px;
  letter-spacing: 0.05em;
}

@keyframes thump {
  0% { transform: rotate(var(--stamp-rot, -10deg)) scale(1.7); opacity: 0; }
  60% { transform: rotate(var(--stamp-rot, -10deg)) scale(0.94); opacity: 0.9; }
  100% { transform: rotate(var(--stamp-rot, -10deg)) scale(1); }
}

/* The stamp in hand follows the pointer. */
.stage.holding { cursor: none; }
.stage.holding .pin-suspect,
.stage.holding .pin-motive,
.stage.holding .pin-weapon { cursor: none; }
.held-stamp {
  position: absolute;
  z-index: 90;
  width: 112px;
  height: 30px;
  margin: -15px 0 0 -56px;
  pointer-events: none;
  transform: rotate(-8deg);
  filter: drop-shadow(4px 10px 8px rgba(0, 0, 0, 0.6));
}
.held-stamp .stamp-face {
  display: grid;
  place-items: center;
  height: 100%;
  border: 2px solid var(--red);
  background: var(--paper);
  color: var(--red);
  font-family: var(--font-type);
  font-size: 15px;
  letter-spacing: 0.18em;
}
.held-stamp[hidden] { display: none; }

.stamp-guilty { cursor: pointer; transition: transform 0.15s; }
.stamp-guilty:hover { transform: translateY(-3px); }
.stamp-guilty.lifted { opacity: 0.25; }

/* The accusation slip on the rail. */
.accusation {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(31, 27, 38, 0.3);
}
.accusation-lines {
  display: grid;
  grid-template-columns: auto 180px;
  gap: 2px 8px;
  margin: 0;
  font-family: var(--font-type);
  font-size: 12px;
}
.accusation-lines dt { color: var(--red); letter-spacing: 0.15em; text-transform: uppercase; }
.accusation-lines dd { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.accuse-button {
  padding: 10px 14px;
  border: 3px solid var(--red);
  border-radius: 3px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-type);
  font-size: 14px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  max-width: 130px;
  cursor: pointer;
}
.accuse-button:hover:not(:disabled) { background: var(--red-dark); }
.accuse-button:disabled {
  background: transparent;
  color: rgba(179, 38, 58, 0.5);
  border-color: rgba(179, 38, 58, 0.35);
  cursor: not-allowed;
}


/* LIAR stamp: purple in hand and while pending; blue if caught, red if not. */
.stamp-liar { cursor: pointer; transition: transform 0.15s; }
.stamp-liar:hover { transform: translateY(-3px); }
.stamp-liar.lifted { opacity: 0.25; }
.stamp-liar.used { opacity: 0.3; cursor: not-allowed; transform: none; }
/* Used, but its question is still waiting: clicking it brings the question back. */
.stamp-liar.used.waiting { opacity: 0.6; cursor: pointer; }
.held-stamp.liar .stamp-face { border-color: var(--purple); color: var(--purple); }
.stamp-mark.liar-mark { color: var(--purple); top: auto; bottom: 34%; }
.stamp-mark.liar-mark.right { color: var(--blue); }
.stamp-mark.liar-mark.wrong { color: var(--red); opacity: 0.8; }
/* The right liar with the wrong story: purple, with a note under the stamp. */
.stamp-mark.liar-mark.partial { color: var(--purple); opacity: 0.9; }
.liar-note {
  display: block;
  margin-top: 2px;
  font-size: 0.42em;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Until a player first picks one up, the stamps glow and the tray label invites them to. */
.stamp.beckon .stamp-face { animation: beckon 1.6s ease-in-out infinite; }
@keyframes beckon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 233, 221, 0); transform: translateY(0); }
  50% { box-shadow: 0 0 0 4px rgba(239, 233, 221, 0.35), 0 0 16px 4px rgba(179, 38, 58, 0.55); transform: translateY(-3px); }
}
.stamp-liar.beckon .stamp-face { animation-delay: 0.8s; }
@media (prefers-reduced-motion: reduce) {
  .stamp.beckon .stamp-face { animation: none; box-shadow: 0 0 0 3px rgba(239, 233, 221, 0.6); }
}
.tray + .rail-label { transition: color 0.2s; }
.stage:has(.stamp.beckon) .tray + .rail-label { color: var(--paper); }

/* The slip's how-to, shown until something is stamped. */
.accusation-howto {
  width: 220px;
  margin: 0;
  font-family: var(--font-type);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
}
.accusation-howto[hidden], .accusation-lines[hidden] { display: none; }
