/* Collect Call.
 *
 * Notification-shade: one card at a time, dropped in from the top of a dark
 * phone. The balance is the hero and lives above everything, because the whole
 * game is watching a number you own move in a direction you chose.
 *
 * The card leans on direction as colour: anything that would take money reads
 * magenta on reveal, anything arriving reads volt. Before the call is made the
 * card is deliberately neutral - no tint may leak the answer.
 */

body { overflow: hidden; }

.screen {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(64px, calc(env(safe-area-inset-top) + 56px)) 20px max(20px, env(safe-area-inset-bottom));
}

.screen[hidden] { display: none; }

/* ---------- intro ---------- */

#intro { justify-content: center; text-align: left; max-width: 520px; margin: 0 auto; }

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--dim);
}

.title {
  margin: 0;
  font-size: clamp(50px, 15.5vw, 86px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.title .call {
  display: block;
  color: var(--hot);
}

.pitch {
  margin: 26px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 34ch;
}

.rules {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 15px;
  color: var(--paper);
}

.rules b { font-weight: 700; }
.hot { color: var(--hot); }
.volt { color: var(--volt); }

.big-btn {
  margin-top: 34px;
  padding: 18px 26px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--void);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.14s var(--ease-snap);
}

.big-btn:active { transform: scale(0.97); }

.best { margin: 18px 0 0; font-size: 14px; color: var(--dim); }
.best b { color: var(--gold); font-weight: 700; }

/* ---------- hud: the hero number ---------- */

.hud {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.hud-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.wallet .hud-label { margin-bottom: 4px; }

#balance {
  margin: 0;
  font-size: clamp(38px, 11vw, 52px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--gold);
  transition: color 0.3s;
}

#balance.hit { color: var(--hot); }

.queue { text-align: right; }
.queue span { display: block; }
#queue-count {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* The amount, flying off the balance. Only appears when money truly moves. */
.delta {
  position: relative;
  max-width: 520px;
  width: 100%;
  margin: 6px auto 0;
  height: 22px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
}

.delta.go { animation: fly 1.1s var(--ease-out) forwards; }
.delta.out { color: var(--hot); }
.delta.in { color: var(--volt); }

@keyframes fly {
  0%   { opacity: 0; transform: translateY(-10px); }
  18%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(2px); }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ---------- the notification ---------- */

#shade {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.req {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 18px 20px 22px;
  border-radius: 20px;
  background: linear-gradient(168deg, var(--panel-lift), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.9);
  touch-action: pan-y;
  will-change: transform;
  outline: none;
}

/* Snaps in from above, like a shade pulling down. */
.req.arrive { animation: drop 0.36s var(--ease-snap); }

@keyframes drop {
  0%   { opacity: 0; transform: translateY(-26px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.req-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.req-app {
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.34);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.req-from {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.req-handle {
  margin: 4px 0 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--dim);
  word-break: break-all;
}

/* The handle carries the tell on the cards where the giveaway is who sent it
   rather than what they wrote, so it highlights the same way the note does. */
.req-handle mark {
  background: rgba(255, 45, 120, 0.22);
  color: var(--hot);
  border-radius: 3px;
  padding: 0 3px;
  box-shadow: inset 0 -2px 0 var(--hot);
  font-weight: 700;
}

.req-handle mark.ok {
  background: rgba(0, 229, 192, 0.16);
  color: var(--volt);
  box-shadow: inset 0 -2px 0 var(--volt);
}

.req-amount {
  margin: 16px 0 0;
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.req-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 15px;
  line-height: 1.45;
  color: var(--paper);
}

/* The tell, highlighted only once the truth is out. */
.req-note mark {
  background: rgba(255, 45, 120, 0.22);
  color: var(--hot);
  border-radius: 3px;
  padding: 0 3px;
  box-shadow: inset 0 -2px 0 var(--hot);
  font-weight: 700;
}

.req-note mark.ok {
  background: rgba(0, 229, 192, 0.16);
  color: var(--volt);
  box-shadow: inset 0 -2px 0 var(--volt);
}

.req-dir {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0;
  transition: opacity 0.25s;
}

.req-dir.show { opacity: 1; }
.req-dir.out { color: var(--hot); }
.req-dir.in { color: var(--volt); }

.stamp {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(34px, 11vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  opacity: 0;
  pointer-events: none;
}

.stamp.show { animation: stamp 0.5s var(--ease-snap) forwards; }
.stamp.right { color: var(--volt); }
.stamp.wrong { color: var(--hot); }

@keyframes stamp {
  0%   { opacity: 0; transform: scale(1.7) rotate(-13deg); }
  55%  { opacity: 1; transform: scale(0.94) rotate(-7deg); }
  100% { opacity: 1; transform: scale(1) rotate(-7deg); }
}

/* ---------- verdict drawer ---------- */

.verdict {
  max-width: 520px;
  width: 100%;
  margin: 12px auto 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  animation: rise 0.28s var(--ease-out);
}

/* Hidden by collapsing rather than [hidden]/display:none, so the live region
   stays in the accessibility tree and its text is announced when it changes.
   visibility:hidden keeps it unreachable and unreadable while idle. */
.verdict.idle {
  visibility: hidden;
  height: 0;
  margin: 0 auto;
  padding: 0;
  border-width: 0;
  animation: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.v-head {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v-head.good { color: var(--volt); }
.v-head.bad { color: var(--hot); }

.v-trap {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.v-trap[hidden] { display: none; }

.v-why {
  margin: 7px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- choose ---------- */

.choose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 520px;
  width: 100%;
  margin: 16px auto 0;
}

.choice {
  height: var(--thumb);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  border: 1.5px solid;
  transition: transform 0.12s var(--ease-snap), opacity 0.15s;
}

.choice:active { transform: scale(0.96); }
.choice[disabled] { opacity: 0.4; cursor: default; }

.choice.decline { color: var(--hot);  border-color: rgba(255, 45, 120, 0.45); background: rgba(255, 45, 120, 0.1); }
.choice.approve { color: var(--volt); border-color: rgba(0, 229, 192, 0.4);  background: rgba(0, 229, 192, 0.09); }

.hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--dim);
}

kbd {
  font: inherit;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-lift);
}

/* ---------- debrief ---------- */

#over {
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
  overflow-y: auto;
}

.rule {
  margin: 0;
  padding: 22px 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--hot);
}

.rule p {
  margin: 0;
  font-size: clamp(22px, 6.4vw, 29px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.rule-sub {
  margin-top: 12px !important;
  font-size: 14.5px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  color: var(--dim);
}

.tally {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.tally-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.tally-item p:first-child {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
}

.traps-head {
  margin: 22px 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.traps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.traps li {
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

.traps b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hot);
}

.traps li.miss b { color: var(--gold); }
.traps span { color: var(--dim); }

.clean {
  margin: 20px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--volt);
}

.text-link {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--dim);
  text-decoration: none;
}

.text-link:hover { color: var(--paper); }

.fineprint {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
  opacity: 0.8;
}

/* Folds. The rule keeps the headline; the reasoning and the real-world
   footnote wait behind a tap. Note the specificity here: `.rule p` sets a
   29px display size, so a <p> nested inside a fold within .rule has to be
   pulled back down explicitly. */
.rule-more summary,
.fineprint-more summary {
  display: inline-flex;
  align-items: center;
  /* 44px: the documented minimum tap target. Not the full --thumb height,
     which is sized for primary buttons and would leave a crater in prose. */
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--dim);
  cursor: pointer;
  list-style: none;
}

.rule-more summary::-webkit-details-marker,
.fineprint-more summary::-webkit-details-marker { display: none; }

.rule-more summary::after,
.fineprint-more summary::after { content: " \25BE"; }

.rule-more[open] summary::after,
.fineprint-more[open] summary::after { content: " \25B4"; }

.rule-more summary:hover,
.fineprint-more summary:hover { color: var(--paper); }

.rule .rule-more p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--dim);
}

.fineprint-more { margin-top: 16px; }
.fineprint-more .fineprint { margin: 0; }

@keyframes ss-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* ---------- 12-year-old pass ---------- */

.gold { color: var(--gold); font-weight: 700; }

/* After a few seconds of nothing, the only two useful things on screen
   breathe. It is a nudge, not a tutorial: no new words appear. */
@keyframes nudge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}

.choice.nudge { animation: nudge-pulse 1.5s ease-in-out infinite; }
.choice.decline.nudge { box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.18); }
.choice.approve.nudge { box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.16); }

@media (prefers-reduced-motion: reduce) {
  .choice.nudge { animation: none; }
}

/* The card was floating in the middle of a tall dead gap, with the verdict
   appearing far below it. Pull the card up so card, verdict and buttons read
   as one column under the thumb. */
#shade { place-items: start center; padding-top: 4px; }

/* Bigger thumb targets: these are the whole game. */
.choice { height: max(var(--thumb), 64px); font-size: 19px; }

/* The verdict is the teaching moment - it was smaller than the scam text. */
.v-head { font-size: 17px; line-height: 1.35; }
.v-why  { font-size: 15px; }
