/* Act two screens: #reveal (story cards), #flip (act two), #share (card + actions), #friend (friend link).
   Owner: the act-two implementer. Build on the theme.css tokens and components; never restyle them here.
   Everything is scoped to an act-two screen (or the receipt sheet), so nothing leaks into act one. */

/* ---------- 5 · reveal: five story cards on the coral field ---------- */
#reveal { cursor: pointer; -webkit-user-select: none; user-select: none; }
#reveal .story-card { gap: var(--m); }
#reveal .story-hint { opacity: .7; text-align: center; }
#reveal .lockup .cap { max-width: 7em; }
#reveal .hero em { white-space: nowrap; }  /* "5 OF 12." stays on one line */
/* Liked people wear a white frame (the poster's white disc), rule-breakers also a black tag with the rule. */
#reveal .face.liked { outline: 4px solid var(--white); outline-offset: 0; }
#reveal .survivors { --size: 36px; }
#reveal .said-grid { --size: 72px; row-gap: 44px; margin-bottom: 12px; }
#reveal .said-grid .face.tag-low .tag { bottom: -38px; rotate: 3deg; }
/* edge columns: the tag hangs inwards so it never crosses the 24px margin */
#reveal .said-grid .face:nth-child(4n + 1) .tag { left: -6px; translate: 0 0; }
#reveal .said-grid .face:nth-child(4n) .tag { left: auto; right: -6px; translate: 0 0; }
#reveal .said-grid .tag { display: block; max-width: 116px; overflow: hidden; text-overflow: ellipsis; line-height: calc(var(--h-tag) - 2 * var(--line)); }
#reveal .verdict-slot { display: flex; justify-content: center; padding: var(--u) 0; }
#reveal .verdict-stamp { max-width: 100%; }
#reveal .pill-trait { background: var(--white); color: var(--ink); }
#reveal .yes-row { display: flex; flex-wrap: wrap; gap: 10px; }
#reveal .story-actions { margin-top: auto; }
#reveal .story-actions .btn { cursor: pointer; }
.arrow::after { content: "→"; }

/* the receipt sheet: the proof behind one face */
.receipt-sheet .sheet-head .hero { line-height: 1; }
.receipt-sheet .photo { aspect-ratio: 4 / 5; max-height: 46dvh; border-radius: var(--r-block); }
.receipt-sheet .ai-tag { rotate: -3deg; }
.receipt-sheet .photo .stamp.caught {
  top: auto; left: auto; right: 16px; bottom: 20px; position: absolute;
  height: var(--h-pill); padding: 0 12px; font-size: var(--t-16);
  background: var(--coral); color: var(--ink); border-color: var(--ink);
}
.receipt-sheet .quote { border-left-color: var(--ink); }
.receipt-sheet mark { background: var(--ink); color: var(--white); }
.receipt-sheet .pill-hot { background: var(--coral); color: var(--ink); border-color: var(--ink); }

/* ---------- 6 · act two on the cream field ---------- */
#flip .lockup { position: relative; }
#flip-ten { position: absolute; right: 0; top: -12px; rotate: 8deg; }
#flip .admirers { --size: 36px; }
#flip #yeses { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
/* Mutual: a lime ring inside an ink ring (lime alone disappears on cream). */
#flip .face.match { outline: var(--line) solid var(--ink); outline-offset: 0; border: 4px solid var(--lime); }
#flip .face.match > .thumb { border-radius: 50%; }
#flip .row > span:first-child { font-weight: 700; }
#flip .seg:lang(ru) .seg-btn { padding: 0 9px; letter-spacing: .02em; }   /* Russian answers run long */
#flip .stepper-age {
  width: 56px; height: var(--h-pill); padding: 0; text-align: center;
  border: var(--line) solid var(--on); border-radius: var(--r-pill); background: var(--paper); color: var(--paper-on);
  font-size: var(--t-16); font-weight: 800;
}
#flip .stepper-age::placeholder { color: var(--paper-on); opacity: .5; }
#flip .stepper-age:focus { outline: 3px solid var(--on); outline-offset: 2px; }
#flip #readback .pill { cursor: pointer; }
#flip .rb-yes { background: var(--paper); }
#flip .rb-no { background: transparent; color: var(--on); }
#flip .rb-unknown { background: transparent; color: var(--on); border-style: dashed; }
#flip .rb-struck { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .45; }
/* the best fix: one lime sticker line */
#flip #best-fix {
  align-self: flex-start; padding: 8px 14px; border-radius: var(--r-box); rotate: -1deg;
  background: var(--lime); color: var(--ink); border: var(--line) solid var(--ink); font-weight: 800;
}
#flip #best-fix[data-fix="age"] { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 7 · share: the canvas is the card ---------- */
#share-card { padding: 0; display: block; }
#share-canvas { display: block; width: 100%; height: 100%; }
#share .share-text { overflow-wrap: anywhere; }   /* the challenge link is one long word */
/* Russian labels ("Поделиться картинкой", "Сразу к карточке") wrap in half a row: stack them, as the pools do. */
#share .btn-row:lang(ru), #reveal .story-actions:lang(ru) { grid-template-columns: 1fr; }
#player-name { min-height: 0; height: var(--h-btn); resize: none; }
#share .h2h { display: flex; flex-direction: column; gap: 12px; }
#share .h2h-table { border-bottom: var(--line) solid var(--on); }
#share .h2h-row { display: grid; grid-template-columns: 1fr 64px 104px; gap: var(--u); align-items: center; min-height: var(--h-chip); border-top: var(--line) solid var(--on); }
#share .h2h-row > :not(:first-child) { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#share .h2h-head { min-height: 28px; border-top: 0; }

/* ---------- 1b · friend link: their result on a paper card, the verdict slapped on its corner ---------- */
#friend-card.friend-card {
  aspect-ratio: auto; max-width: none; margin: 0 0 20px; overflow: visible; gap: var(--u);
  padding: 20px 20px 28px; rotate: -1.5deg;
  background: var(--paper); color: var(--paper-on); border: var(--line) solid var(--ink);
}
#friend-card .friend-leave { max-width: calc(100% - 100px); }
#friend-card .friend-stamp {
  position: absolute; top: auto; right: -12px; bottom: -32px;
  width: 116px; height: 116px; padding: 14px; font-size: 14px; line-height: 16px;
}
