/* zayablo — слепой тест на цитатах, /tinder.
   The shell (topbar, poll widget, turnstile host) comes from styles.css; this
   file is the test itself: the card stack, the throw, the reveal, the result.

   The card is deliberately bare — a quote and nothing else. Anything on it
   (a tag, a colour, a date) would leak who said it before the person answers,
   and the whole point is that they do not know. */

html, body { height: 100%; }
body[data-screen="deck"] { overflow: hidden; overscroll-behavior: none; }

.deck {
  position: fixed; inset: 53px 0 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  gap: 10px;
}

/* your own tally, quiet, out of the way */
.deck-score {
  align-self: flex-end;
  font-size: 13px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.deck-score b { color: var(--text); }

/* the stack ------------------------------------------------------------- */
.deck-stage {
  position: relative; width: 100%; max-width: 430px;
  flex: 1 1 auto; min-height: 240px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.deck-empty {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px; text-align: center;
}

/* Each card sits in a slot that fills the stage and centres it. The card keeps
   its own height, so a short line stays a short card — and the drag transform
   on the card never fights a centring transform */
.swipe-slot { position: absolute; inset: 0; display: flex; align-items: center; }
.swipe-card {
  position: relative;
  width: 100%; max-height: 100%; min-height: 72%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 30px 24px;
  border-radius: 6px;
  background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  overflow: hidden;
  cursor: grab;
  will-change: transform;
}
.swipe-card.grabbing { cursor: grabbing; }
/* Cards below the top one only give the stack depth — no events reach them */
.swipe-card.under { pointer-events: none; }
/* Три оттенка по кругу, чтобы стопка читалась как стопка. Тон идёт по позиции
   в колоде, а не по стороне — иначе цвет выдавал бы автора до вскрытия */
.swipe-card.tone-1 { background: #171519; }
.swipe-card.tone-2 { background: #14171a; }
.swipe-card.tone-3 { background: #191614; }

.swipe-text {
  margin: 0; overflow-y: auto;
  font-size: clamp(21px, 6.2vw, 30px); line-height: 1.26; letter-spacing: -.025em;
  font-weight: 700; overflow-wrap: break-word;
}
.swipe-card.long .swipe-text { font-size: clamp(17px, 4.6vw, 22px); line-height: 1.34; font-weight: 600; }

/* the verdict stamps that fade in as the card is dragged */
.swipe-stamp {
  position: absolute; top: 18px;
  padding: 5px 12px 6px; border-radius: 3px;
  font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
}
/* The stamp sits on the side the card is moving away from, so it stays on
   screen while the card leaves it */
.swipe-stamp.yes { left: 16px; transform: rotate(-9deg); background: var(--red); color: #fff; }
.swipe-stamp.no { right: 16px; transform: rotate(9deg); background: #6b6b74; color: #fff; }

/* buttons ---------------------------------------------------------------- */
.deck-actions { display: flex; gap: 10px; width: 100%; max-width: 430px; }
.deck-btn {
  flex: 1 1 0; padding: 16px 12px; border-radius: 3px; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 800; letter-spacing: -.01em;
}
.deck-btn.no { border: 1px solid rgba(255,255,255,.28); background: transparent; color: var(--text); }
.deck-btn.yes { border: 0; background: var(--red); color: #fff; }
.deck-btn:active { transform: translateY(1px); }
.deck-btn[disabled] { opacity: .45; }
.deck-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

/* вскрытие --------------------------------------------------------------- */
/* The punchline of the whole thing: the person has already committed, and only
   then learns whose words they judged. It takes the entire screen so nothing
   competes with the name */
.reveal {
  position: fixed; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 22px calc(30px + env(safe-area-inset-bottom));
  background: var(--ink);
  cursor: pointer;
  animation: reveal-bg .18s ease both;
}
.reveal[hidden] { display: none; }
@keyframes reveal-bg { from { opacity: 0; } to { opacity: 1; } }
.reveal-in { width: 100%; max-width: 430px; }

.reveal-mine {
  margin: 0 0 22px; padding: 4px 11px 5px;
  display: inline-block; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  background: rgba(255,255,255,.08); color: var(--muted);
}
.reveal-mine.yes { background: color-mix(in srgb, var(--red) 22%, transparent); color: #ff8a80; }

.reveal-kicker {
  margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted);
  animation: reveal-rise .3s .04s cubic-bezier(.2,.7,.2,1) both;
}
.reveal-name {
  margin: 0 0 10px;
  font-size: clamp(32px, 10vw, 50px); line-height: .98; letter-spacing: -.04em; font-weight: 800;
  animation: reveal-rise .34s .08s cubic-bezier(.2,.7,.2,1) both;
}
.reveal-role {
  margin: 0 0 22px; font-size: 15px; line-height: 1.35; color: #b8b4ac;
  animation: reveal-rise .34s .14s cubic-bezier(.2,.7,.2,1) both;
}
.reveal-role .reveal-year { color: var(--muted); }
@keyframes reveal-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.reveal-share {
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: 17px; font-weight: 700; color: var(--muted);
  animation: reveal-pop .3s .22s cubic-bezier(.2,.9,.3,1.2) both;
}
.reveal-share b { color: var(--text); }
.reveal-share .rv-pct {
  display: block; margin-top: 2px;
  font-size: clamp(38px, 12vw, 58px); line-height: 1; letter-spacing: -.04em;
  font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums;
}
@keyframes reveal-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.reveal-proof {
  display: inline-block; margin: 20px 0 0;
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.24);
}
.reveal-proof[hidden] { display: none; }

/* Тонкая полоса внизу: видно, что вскрытие само уйдёт, и сколько осталось */
.reveal-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); }
.reveal-bar-fill { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: left center; }
.reveal-bar-fill.run { animation: reveal-drain linear forwards; }
@keyframes reveal-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* итог ------------------------------------------------------------------- */
.pause {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0; overflow-y: auto;
  background: var(--ink);
  animation: pause-in .25s ease both;
}
.pause[hidden] { display: none; }
@keyframes pause-in { from { opacity: 0; } to { opacity: 1; } }
.pause-in { width: 100%; max-width: 460px; padding: 30px 20px 40px; }
.tally-kicker {
  margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.pause-h {
  margin: 0 0 14px;
  font-size: clamp(28px, 8vw, 40px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800;
}
.pause-p { margin: 0 0 10px; font-size: 17px; line-height: 1.4; color: #b8b4ac; }
.pause-p b { color: var(--text); font-weight: 800; }
.pause-p.punch {
  margin-top: 16px; padding-left: 12px; border-left: 3px solid var(--red);
  color: var(--text); font-weight: 700;
}
.pause .votebox.inline { margin: 24px 0 0; }
.pause .cta { margin-top: 18px; }
.pause-wall {
  display: block; margin: 16px 0 0; text-align: center;
  color: var(--muted); font-size: 14px; font-weight: 700;
}

@media (min-width: 700px) {
  .deck { inset: 57px 0 0; padding: 18px 20px 22px; }
  .deck-stage { min-height: 300px; }
}
