/* osama.si: a deck of playing cards on felt. Tokens and rules are described in docs/design.md.
   Order: tokens, the page and its header, the deck, then the screens that scroll (the pick, the reveal,
   the standings, the about screen), the host's panel, reduced motion. */

@font-face {
  font-family: 'Besley';
  src: url('/fonts/besley-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Besley';
  src: url('/fonts/besley-latin-ext.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Inks: the palette of the brief, nothing else. */
  --felt: #14513b;
  --felt-shadow: #0c3325;
  --paper: #fbf7ec;
  --ink: #000;
  --red: #d4202c;
  --blue: #233c9b;
  --yellow: #f4b81a;

  /* The same inks, thinned. Contrast: paper-soft on felt 5.5, ink-soft on paper 6.5. */
  --paper-soft: rgb(251 247 236 / 0.74);
  --ink-soft: rgb(0 0 0 / 0.64);
  --shade: 4 22 15; /* what a card throws on the felt, as an rgb triplet */
  --paper-line: rgb(251 247 236 / 0.26); /* a line printed on the felt */
  --paper-mark: rgb(251 247 236 / 0.46); /* a line that is read: the marks of the race (3 to 1 on felt) */
  --sheet-line: rgb(0 0 0 / 0.16); /* a ruled line on paper */
  /* Paper under one and under two other sheets: 7.5% and 15% of the felt shadow, like the lower cards of the stack. */
  --paper-under: #e9e8dd;
  --paper-under-2: #d7dace;

  --serif: 'Besley', Rockwell, Georgia, serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Type scale for everything that is not printed on a card. */
  --text-s: 0.8125rem;
  --text-m: 0.9375rem;
  --text-l: 1.0625rem;
  --title-s: 1.25rem;
  --title-l: 1.75rem;

  --gutter: 16px;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
  scroll-padding-bottom: 6rem; /* what takes the focus is not left under the confirmation of the pick */
}

body {
  margin: 0;
  background: var(--felt) url('/assets/felt.webp') 0 0 / 192px 192px;
  color: var(--paper);
  font: 400 var(--text-m) / 1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  display: flex;
  flex-direction: column;
  max-width: 27rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 8px var(--gutter) 14px;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* The header: the wordmark and the three screens, printed on the felt. On the deck the first of them
   shows the counter in place of its name. */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px 2px;
}

.mark {
  color: inherit;
  font: 700 1.4375rem / 1 var(--serif);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: baseline;
  margin-right: -8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--paper-soft);
  font: 500 var(--text-m) / 1 var(--sans);
  text-decoration: none;
  touch-action: manipulation;
}

.nav-link[aria-current='page'] {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 7px;
}

.nav-link.has-count {
  text-decoration: none;
}

.nav-link:focus-visible,
.mark:focus-visible {
  outline-offset: -2px;
  border-radius: 6px;
}

/* The word stays for a screen reader while the counter stands in for it. */
.has-count .nav-word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.counter {
  font: 500 var(--text-m) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}

/* The number rolls into place when it changes; a transform needs a box of its own. */
.counter-now {
  display: inline-block;
}

.stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

/* ---------- The deck ---------- */

.deck {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

/* The table takes whatever height is left; the card is the largest 5:7 box that fits it.
   The basis is 0, not the 0% of `flex: 1`: with a percentage basis under a page that only has a
   min-height, Chromium 151 measures 100cqh inside this container as 0 and the card gets no size. */
.table {
  position: relative;
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-height: 300px;
  container-type: size;
}

.stack {
  position: relative;
  width: min(100cqw, (100cqh - 28px) * 5 / 7);
  aspect-ratio: 5 / 7;
  margin-bottom: 28px; /* room for the edges of the cards underneath */
  container-type: inline-size;
}

/* Everything printed on a card is sized in cqw, a hundredth of the card's width, so the card
   keeps its proportions at any size, like a printed object. */
.card {
  position: absolute;
  inset: 0;
  will-change: transform;
  /* The card is dragged with a finger or the mouse: no scrolling, no text selection while it moves. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.card {
  cursor: grab;
}

.card.is-held {
  cursor: grabbing;
}

/* A card on its way out is already judged: the hand reaches the next one through it. */
.card.is-leaving {
  pointer-events: none;
}

.card-shadow,
.card-lift,
.card-sheet,
.card-paper,
.card-print,
.card-shade,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 4.6cqw;
}

/* Two shadows, drawn once: at rest and lifted. Only the opacity of the second one is animated. */
.card-shadow {
  box-shadow:
    0 1px 1px rgb(var(--shade) / 0.5),
    0 3px 7px -1px rgb(var(--shade) / 0.38),
    0 12px 22px -8px rgb(var(--shade) / 0.36);
}

.card-lift {
  opacity: 0;
  box-shadow:
    0 6px 10px -2px rgb(var(--shade) / 0.3),
    0 26px 40px -10px rgb(var(--shade) / 0.5),
    0 48px 70px -24px rgb(var(--shade) / 0.42);
  will-change: opacity;
}

.card-paper {
  background: var(--paper);
}

.card-print {
  color: var(--ink);
}

.index {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3cqw;
  width: 9cqw;
}

.index-top {
  top: 4.4cqw;
  left: 4.4cqw;
}

.index-bottom {
  right: 4.4cqw;
  bottom: 4.4cqw;
  rotate: 180deg;
}

.rank {
  font: 800 10.6cqw / 0.82 var(--serif);
}

.pip {
  width: 6cqw;
  height: 6cqw;
  fill: currentColor;
}

.task {
  position: absolute;
  top: 4.7cqw;
  right: 7cqw;
  left: 17cqw;
}

.task p {
  margin: 0;
}

.task-label {
  font: 650 max(12px, 3.6cqw) / 1.25 var(--sans);
}

.task-body {
  color: var(--ink-soft);
  font: 400 max(12.5px, 3.85cqw) / 1.27 var(--sans);
  overflow-wrap: anywhere;
}

/* The joke sits in the middle of the card, between the assignment and the lower index. */
.joke-box {
  position: absolute;
  top: var(--joke-top, 22cqw);
  right: 7cqw;
  bottom: 19cqw;
  left: 7cqw;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.joke {
  width: 100%;
  font: 500 var(--fs) / var(--lh) var(--serif);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* A line break in a joke is a new line of an ad: set apart, so it does not read as a wrap. */
.joke span {
  display: block;
}

.joke span + span {
  margin-top: 0.4em;
}

/* The joke's size steps, largest first. The script takes the first one that fits with air to spare. */
.joke[data-size='0'] { --fs: max(15px, 8cqw); --lh: 1.23; }
.joke[data-size='1'] { --fs: max(15px, 7.3cqw); --lh: 1.25; }
.joke[data-size='2'] { --fs: max(15px, 6.6cqw); --lh: 1.27; }
.joke[data-size='3'] { --fs: max(15px, 6cqw); --lh: 1.29; }
.joke[data-size='4'] { --fs: max(15px, 5.5cqw); --lh: 1.3; }
.joke[data-size='5'] { --fs: max(14.5px, 5cqw); --lh: 1.32; }
.joke[data-size='6'] { --fs: max(14px, 4.6cqw); --lh: 1.33; }
.joke[data-size='7'] { --fs: max(13px, 4.2cqw); --lh: 1.33; }

/* A card whose author gave no joke: the lines left blank, and the host's note in the host's typeface. */
.card.is-refused .joke {
  color: var(--ink-soft);
  font: 500 max(14px, 4.7cqw) / 1.35 var(--sans);
}

.card.is-refused .joke span {
  margin: 0;
}

.card.is-refused .joke .blank {
  margin-bottom: 7.4cqw;
  border-bottom: max(1.5px, 0.45cqw) solid var(--sheet-line);
}

.card.is-refused .joke .blank:nth-child(3) {
  width: 56%;
}

.card.is-refused .joke .note + .note {
  margin-top: 0.35em;
  color: var(--ink);
  font-weight: 650;
}

/* The three verdicts are ink: they lie between the paper and the print, so the text shows through them
   the way it shows through a rubber stamp. The script drives opacity and scale. */
.stamp {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, scale;
}

.stamp-ha,
.stamp-meh {
  top: 21cqw;
  padding: 1.6cqw 3.4cqw 0.5cqw;
  border: 1.3cqw solid currentColor;
  border-radius: 2.6cqw;
  font: 900 16cqw / 1 var(--serif);
  letter-spacing: 0.02em;
}

.stamp-ha {
  left: 9cqw;
  color: var(--red);
  rotate: -10deg;
}

.stamp-meh {
  right: 9cqw;
  color: var(--blue);
  rotate: 10deg;
}

/* The crown is the third ink, yellow: the sign itself, large. It falls on the card from above,
   so nothing clips it. */
.stamp-crown {
  top: 27cqw; /* under the assignment; deck.js keeps this part of the card on screen while it is crowned */
  left: 50%;
  width: 52cqw;
  margin-left: -26cqw;
  fill: var(--yellow);
  rotate: -5deg;
}

/* A card lower in the stack lies in the shade of the cards above it. */
.card-shade {
  background: var(--felt-shadow);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* The back of the card, shown while it is dealt. Paper until the picture arrives. */
.card-back {
  display: none;
  background: var(--paper) url('/assets/card-back.webp') center / 100% 100%;
}

.card.is-face-down .card-back {
  display: block;
}

/* A slip of paper on the table: the host's short notes. */
.slip {
  position: absolute;
  z-index: 60; /* above every card, the leaving ones too */
  bottom: 34px;
  left: 50%;
  width: max-content;
  max-width: 92%;
  margin: 0;
  padding: 9px 14px 8px;
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 1px 1px rgb(var(--shade) / 0.5), 0 5px 10px -2px rgb(var(--shade) / 0.45);
  color: var(--ink);
  font: 500 var(--text-s) / 1.3 var(--sans);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  translate: -50% 10px;
  rotate: -1.2deg;
  transition: opacity 0.16s linear, translate 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.slip.is-on {
  opacity: 1;
  translate: -50% 0;
}

/* The three verdicts again, printed on the felt like the markings of a card table: no shadows of their own. */
.actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.act {
  position: relative;
  min-height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--paper);
  border-radius: 27px;
  background: none;
  color: var(--paper);
  font: 600 var(--text-l) / 1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.12s linear, color 0.12s linear, scale 0.12s ease-out;
}

/* Pressed, or the card has been dragged far enough to count: the marking fills with paper. */
.act:active,
.act.is-armed {
  background: var(--paper);
  color: var(--felt);
}

.act:active {
  scale: 0.97;
}

.act-crown {
  display: grid;
  place-items: center;
  width: 58px;
  min-height: 58px;
  padding: 0;
  border-color: var(--yellow);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
}

.act-crown svg {
  width: 30px;
  margin-bottom: 1px;
  fill: currentColor;
}

.act-crown:active,
.act-crown.is-armed {
  border-color: var(--paper);
  background: var(--yellow);
  color: var(--ink);
  scale: 1.07;
}

/* A spent crown stays focusable: pressing it explains why nothing happens. */
.act-crown[aria-disabled='true'] {
  border-color: var(--paper-soft);
  background: none;
  color: var(--paper-soft);
}

.act-crown[aria-disabled='true']:active {
  scale: 1;
}

.act:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.hint {
  margin: 12px 0 0;
  color: var(--paper-soft);
  font-size: var(--text-s);
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

/* The arrow keys are for a keyboard: say so only where there is likely to be one. */
.hint-keys {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .hint-keys {
    display: inline;
  }
}

/* Short screens: the card needs the room more than the hint does. */
@media (max-height: 700px) {
  .hint {
    display: none;
  }

  .act {
    min-height: 50px;
  }

  .act-crown {
    width: 54px;
    min-height: 54px;
  }
}

@media (min-width: 390px) {
  :root {
    --gutter: 20px;
  }
}

/* A phone held sideways (no taller than 500 px, and at least 7:4 and 560 px wide): under the header and above the
   buttons there is no height left for a card that can be read. So the card takes the whole height at the left, and
   the header and the three verdicts stand beside it in a column as wide as the upright page. Only while the deck
   is on: the other screens scroll and keep their one column. The width of the card follows from the height of the
   window: the page's own 8 and 14 px and the 28 px of edges under the card come off, and the card is 5:7. */
@media (min-aspect-ratio: 7/4) and (max-height: 500px) and (min-width: 560px) {
  .page:has(#deck:not([hidden])) {
    --card: calc((100vh - 50px) * 5 / 7);
    position: relative;
    max-width: calc(27rem + var(--card) + 24px);
    padding-left: calc(var(--gutter) + var(--card) + 24px);
  }

  @supports (height: 100dvh) {
    .page:has(#deck:not([hidden])) {
      --card: calc((100dvh - 50px) * 5 / 7);
    }
  }

  .page:has(#deck:not([hidden])) .table {
    position: absolute;
    z-index: 1; /* a card thrown to the right passes over the header and the buttons */
    top: 8px;
    bottom: 14px;
    left: var(--gutter);
    width: var(--card);
    min-height: 0;
  }

  /* The buttons stand level with the middle of the card. */
  .page:has(#deck:not([hidden])) .deck {
    justify-content: center;
    padding-bottom: 78px;
  }
}


/* ---------- The screens that scroll ---------- */

/* What lies on the felt besides cards is printed on it: headings, running text, lines.
   Paper is for cards and for the sheets of the score pad. */
.screen {
  padding: 10px 0 26px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
}

.screen h1 {
  margin-bottom: 10px;
  font-size: var(--title-l);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* A heading that takes the focus when its screen opens (so that a screen reader starts there) shows no ring:
   nothing can be done with it. */
.screen h1:focus {
  outline: none;
}

.screen h2 {
  margin: 38px 0 10px;
  font-size: var(--title-s);
  line-height: 1.2;
}

.screen > p,
.cascade > p {
  margin: 0 0 12px;
  text-wrap: pretty;
}

.screen > .lead,
.cascade > .lead {
  margin-bottom: 18px;
  font-size: var(--text-l);
  line-height: 1.45;
}

/* What went wrong, in the one ink that shows on felt besides paper. Empty, it takes no room. */
.screen .notice {
  margin: 12px 0 0;
  color: var(--yellow);
}

.screen .notice:empty {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid var(--paper);
  border-radius: 26px;
  background: none;
  color: var(--paper);
  font: 600 var(--text-l) / 1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.12s linear, color 0.12s linear, scale 0.12s ease-out;
}

.btn:active {
  background: var(--paper);
  color: var(--felt);
  scale: 0.98;
}

.btn-primary,
.btn-primary:active {
  background: var(--paper);
  color: var(--felt);
}

.btn-crown,
.btn-crown:active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

/* Nothing to confirm yet: hollow, like the spent crown of the deck. */
.btn-crown:disabled {
  border-color: var(--paper-soft);
  background: none;
  color: var(--paper-soft);
  cursor: not-allowed;
  scale: 1;
}

.wide {
  display: flex;
  width: 100%;
}

.screen > .btn,
.cascade > .btn {
  margin-top: 32px;
}

/* A house sign: #sign-<key> of index.html. Each is one ink of the palette inside a black line. */
.sign {
  flex: none;
  width: 22px;
  height: 22px;
}

.sign-line {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ink-yellow { fill: var(--yellow); }
.ink-blue { fill: var(--blue); }
.ink-red { fill: var(--red); }
.ink-black { fill: var(--ink); }
.ink-paper { fill: var(--paper); }
.ink-none { fill: none; }

/* On felt a sign rides a small card of its own: the inks need paper under them. */
.token {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 42px;
  border-radius: 3.5px;
  background: var(--paper);
  box-shadow: 0 1px 1px rgb(var(--shade) / 0.5), 0 3px 6px -1px rgb(var(--shade) / 0.42);
}

.token .sign {
  width: 20px;
  height: 20px;
}

/* A sheet of the score pad: paper with ruled lines. It lies flat, like the host's slip. */
.sheet {
  position: relative;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 1px 1px rgb(var(--shade) / 0.5), 0 5px 10px -2px rgb(var(--shade) / 0.45);
  color: var(--ink);
}

/* Two lines of a name: the model, and under it the company. */
.who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.model {
  font: 650 var(--text-m) / 1.2 var(--sans);
  overflow-wrap: anywhere;
}

.company {
  color: var(--paper-soft);
  font-size: var(--text-s);
  line-height: 1.3;
}

.sheet .company,
.entry-company {
  color: var(--ink-soft);
}

/* A joke card laid face up in a list: a card in everything but its height. The index stands at the left,
   as in the corner of a card: the rank and, under it, the round or the house. */
.jcards,
.choices {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.jcard {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 12px;
  padding: 16px 16px 16px 12px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow:
    0 1px 1px rgb(var(--shade) / 0.5),
    0 3px 7px -1px rgb(var(--shade) / 0.38),
    0 12px 22px -8px rgb(var(--shade) / 0.36);
  color: var(--ink);
}

.jcard-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.jcard-index .rank {
  font: 800 1.75rem / 0.82 var(--serif);
}

.jcard-index .pip,
.jcard-index .sign {
  width: 17px;
  height: 17px;
}

.jcard-text {
  margin: 0;
  font: 500 1.125rem / 1.36 var(--serif);
  overflow-wrap: anywhere;
  white-space: pre-line;
  text-wrap: pretty;
}

.jcard .jcard-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font: 600 var(--text-s) / 1.2 var(--sans);
}

.jcard-kicker .pip {
  width: 12px;
  height: 12px;
}

.jcard .jcard-by {
  margin: 10px 0 0;
}

.jcard-by strong,
.entry-by strong {
  font-weight: 650;
}

.jcard .jcard-stats {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-s);
}

/* ---------- The final pick ---------- */

.choice {
  overflow: hidden; /* the crown is ink on this card: it ends where the card ends */
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* Yellow does not show on paper (1.7 to 1), so on paper the focus ring is ink. */
.choice-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.choice input:focus-visible + .choice-ring {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

/* The crown is the same yellow ink as on the deck, under the print. It falls on the card that is tapped. */
.choice-crown {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 96px;
  height: 82px;
  margin-top: -41px;
  fill: var(--yellow);
  opacity: 0;
  pointer-events: none;
  rotate: -5deg;
  scale: 1.9;
  transition: opacity 0.1s linear, scale 0.2s cubic-bezier(0.6, 0, 1, 0.5);
}

.choice.is-picked .choice-crown {
  opacity: 1;
  scale: 1;
}

.choice .jcard-index,
.choice .jcard-text {
  position: relative;
  pointer-events: none;
}

/* The confirmation stays within reach however long the list is: a strip of the same felt, under a printed line.
   It ends the screen, so the screen adds no room of its own below it. */
#pick {
  padding-bottom: 0;
}

.confirm {
  position: sticky;
  z-index: 5;
  bottom: 0;
  margin: 20px calc(-1 * var(--gutter)) -14px;
  padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1.5px solid var(--paper-line);
  background: var(--felt) url('/assets/felt.webp') 0 0 / 192px 192px;
}

/* ---------- The reveal ---------- */

.hero {
  display: grid;
  justify-items: center;
  padding-top: 4px;
}

/* The same card as on the deck, a little smaller where the screen is short, so that what follows shows under it. */
.hero-card {
  position: relative;
  width: min(100%, max(13rem, (100vh - 16rem) * 5 / 7));
  width: min(100%, max(13rem, (100dvh - 16rem) * 5 / 7));
  aspect-ratio: 5 / 7;
  container-type: inline-size;
}

.hero-turn {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 4.6cqw;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

/* A court card: the other face of the crowned card, and the five cards of the about screen. */
.king {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4.6cqw;
  color: var(--ink);
  visibility: hidden;
}

.card.is-king .king,
.king-card .king {
  visibility: visible;
}

.king-paper {
  position: absolute;
  inset: 0;
  background: var(--paper);
}

.king-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.king .pip {
  width: 7cqw;
  height: 7cqw;
}

.king-name {
  position: absolute;
  top: 4.9cqw;
  right: 6cqw;
  left: 17cqw;
}

.king-name p {
  margin: 0;
}

.king-model {
  font: 650 max(12px, 4.3cqw) / 1.2 var(--sans);
}

.king-company {
  padding-top: 0.5cqw;
  color: var(--ink-soft);
  font: 400 max(12px, 3.85cqw) / 1.25 var(--sans);
}

.king-name-turned {
  top: auto;
  right: 17cqw;
  bottom: 4.9cqw;
  left: 6cqw;
  rotate: 180deg;
}

.king-card {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 4.6% / 3.3%;
  box-shadow:
    0 1px 1px rgb(var(--shade) / 0.5),
    0 3px 7px -1px rgb(var(--shade) / 0.38),
    0 12px 22px -8px rgb(var(--shade) / 0.36);
  container-type: inline-size;
}

/* Who it was: said under the card once it has turned. */
.screen .payoff {
  margin: 22px 0 0;
  font: inherit;
  letter-spacing: 0;
  text-align: center;
}

.payoff-pre,
.payoff-name,
.payoff-by {
  display: block;
}

.payoff-pre {
  color: var(--paper-soft);
}

.payoff-name {
  margin-top: 3px;
  font: 700 var(--title-l) / 1.14 var(--serif);
  letter-spacing: -0.01em;
}

.payoff-by {
  margin-top: 4px;
  color: var(--paper-soft);
  font-size: var(--text-l);
}

.screen .hero-hint {
  margin: 14px 0 0;
  color: var(--paper-soft);
  font-size: var(--text-s);
  text-align: center;
}

/* Without a crowned card the screen opens like any other: a heading at the left. */
.hero[hidden] + .payoff {
  margin: 0 0 10px;
  font: 700 var(--title-l) / 1.14 var(--serif);
  letter-spacing: -0.01em;
  text-align: left;
}

/* The visitor's laughs: one row per king, printed on the felt beside his sign. */
.tally {
  margin: 0;
  padding: 0;
  border-bottom: 1.5px solid var(--paper-line);
  list-style: none;
}

.tally-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 12px;
  min-height: 62px;
  padding: 8px 0;
  border-top: 1.5px solid var(--paper-line);
}

/* One pip per joke the king wrote, in the order of the rounds: filled where the visitor laughed. */
.laughs {
  display: flex;
  gap: 6px;
}

.laugh {
  width: 15px;
  height: 15px;
  fill: var(--paper);
}

.laugh.is-meh {
  fill: none;
  stroke: var(--paper-soft);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.tally-count {
  min-width: 3.5rem;
  color: var(--paper-soft);
  font-size: var(--text-s);
  text-align: right;
  white-space: nowrap;
}

.tally-count b {
  margin-right: 3px;
  color: var(--paper);
  font: 700 1.5rem / 1 var(--serif);
}

/* The record of the deck: every joke with its author, round by round, on one sheet. */
.record {
  padding: 2px 16px 4px;
}

/* A round opens as a card does: the pip, the name of the round and, under it, the assignment. */
.round-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  padding: 16px 0 10px;
  border-bottom: 1.5px solid var(--ink);
  font: 650 var(--text-m) / 1.3 var(--sans);
}

.round-head .pip {
  grid-row: 1 / 3;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  fill: currentColor;
}

.round-task {
  grid-column: 2;
  color: var(--ink-soft);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  position: relative;
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--sheet-line);
}

.round:last-child .entry:last-child {
  border-bottom: 0;
}

.entry p {
  position: relative; /* over the crown, where there is one */
  margin: 0;
}

.entry .entry-text {
  margin-bottom: 10px;
  font: 500 var(--text-l) / 1.4 var(--serif);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.entry-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  line-height: 1.3;
}

.entry-by .sign {
  width: 20px;
  height: 20px;
}

.entry .entry-stats {
  margin-top: 3px;
  padding-left: 27px;
  color: var(--ink-soft);
  font-size: var(--text-s);
}

/* No joke to print: the host's note, in the host's typeface. */
.jcard .is-refused,
.entry .is-refused {
  color: var(--ink-soft);
  font: 500 var(--text-m) / 1.4 var(--sans);
}

/* The visitor's own verdict on a joke: the stamp of the deck, small. */
.verdict {
  margin-left: auto;
  padding: 3px 5px 1px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font: 900 0.75rem / 1 var(--serif);
  letter-spacing: 0.03em;
  rotate: -5deg;
}

.verdict.is-ha {
  color: var(--red);
}

.verdict.is-meh {
  color: var(--blue);
  rotate: 4deg;
}

/* The crowned joke carries the crown as it did on the deck: yellow ink under the print. */
.entry-crown {
  position: absolute;
  top: 8px;
  right: -4px;
  width: 92px;
  height: 79px;
  fill: var(--yellow);
  rotate: -5deg;
}

.screen .foot {
  margin: 16px 0 0;
  color: var(--paper-soft);
  font-size: var(--text-s);
  text-align: center;
}

/* The scene. The crowned card comes back and the line under it begins; the card turns and the name is
   stamped under it; then what follows arrives in order. Print only appears; paper moves: the signs of the
   visitor's laughs are dealt like cards, and the record is laid on the table. */
.is-staged .payoff span,
.is-staged .hero-hint,
.is-staged .cascade > *,
.is-staged .tally-row {
  opacity: 0;
}

.is-staged.is-landed .payoff-pre {
  opacity: 1;
  transition: opacity 0.3s linear 0.1s;
}

.is-staged .payoff-name {
  scale: 1.12;
}

.is-staged.is-told .payoff-name {
  opacity: 1;
  scale: 1;
  transition: opacity 0.14s linear, scale 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.is-staged.is-told .payoff-by {
  opacity: 1;
  transition: opacity 0.24s linear 0.14s;
}

.is-staged .cascade > .sheet {
  rotate: 1.2deg;
  translate: 0 26px;
}

.is-staged .tally-row .token {
  rotate: 16deg;
  translate: 30px -22px;
}

.is-staged .fan .king-card {
  opacity: 0;
  rotate: calc(var(--i) * 4deg + 14deg);
  translate: 36px -30px;
}

.is-staged.is-told .hero-hint,
.is-staged.is-told .cascade > *,
.is-staged.is-told .tally-row {
  opacity: 1;
  transition: opacity 0.24s linear var(--wait, 0s);
}

.is-staged.is-told .cascade > .sheet {
  rotate: 0deg;
  translate: none;
  transition:
    opacity 0.2s linear var(--wait, 0s),
    rotate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.12) var(--wait, 0s),
    translate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.12) var(--wait, 0s);
}

.is-staged.is-told .tally-row .token {
  rotate: 0deg;
  translate: none;
  transition: rotate 0.46s cubic-bezier(0.2, 0.9, 0.3, 1.15) var(--wait, 0s), translate 0.46s cubic-bezier(0.2, 0.9, 0.3, 1.15) var(--wait, 0s);
}

.is-staged.is-told .fan .king-card {
  opacity: 1;
  rotate: calc(var(--i) * 4deg);
  translate: none;
  transition:
    opacity 0.14s linear var(--wait, 0s),
    rotate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.12) var(--wait, 0s),
    translate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.12) var(--wait, 0s);
}

.is-staged .hero-hint { --wait: 1.1s; }
.is-staged .cascade > :nth-child(1) { --wait: 0.22s; }
.is-staged .cascade > :nth-child(2) { --wait: 0.3s; }
.is-staged .cascade > :nth-child(3) { --wait: 0.38s; }
.is-staged .cascade > :nth-child(n + 4) { --wait: 0.85s; }
.is-staged .tally-row,
.is-staged .tally-row .token { --wait: calc(0.4s + var(--i) * 0.075s); }
.is-staged .fan .king-card { --wait: calc(0.1s + (var(--i) + 2) * 0.09s); }

/* ---------- The standings ---------- */

/* A score pad with three index tabs. The sheet on top is the period shown; the edges of the sheets under it
   show below, as the edges of the cards do under the top card of the deck. */
.pad {
  position: relative;
  isolation: isolate;
  margin: 6px 0 10px;
}

.pad::before,
.pad::after {
  content: '';
  position: absolute;
  height: 14px;
  border-radius: 3px;
}

.pad::before {
  z-index: -1;
  right: 4px;
  bottom: -4px;
  left: 4px;
  background: var(--paper-under);
}

.pad::after {
  z-index: -2;
  right: 8px;
  bottom: -8px;
  left: 8px;
  background: var(--paper-under-2);
  box-shadow: 0 1px 1px rgb(var(--shade) / 0.5), 0 5px 10px -2px rgb(var(--shade) / 0.45);
}

.tabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 8px;
}

.tab {
  flex: 0 1 6.25rem;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: var(--paper-under-2);
  color: var(--ink-soft);
  font: 600 var(--text-m) / 1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}

.tab[aria-pressed='true'] {
  min-height: 49px;
  background: var(--paper);
  color: var(--ink);
}

.tab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

.score {
  padding: 0 14px 12px;
}

/* Columns: the index (place over sign, as in the corner of a card), the name, the score, the laugh rate, the crowns. */
.score-head,
.score-row {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr) 3.3rem 2.7rem 2.1rem;
  align-items: center;
  column-gap: 8px;
}

.score-head {
  padding: 14px 0 9px;
  color: var(--ink-soft);
  font: 600 var(--text-s) / 1 var(--sans);
  text-align: right;
}

.score-dates {
  grid-column: 1 / 3;
  font-weight: 500;
  text-align: left;
}

.head-crown {
  display: block;
  width: 17px;
  height: 14.6px;
  margin-left: auto;
  fill: currentColor;
}

.score-row {
  min-height: 62px;
  padding: 8px 0;
  border-top: 1px solid var(--sheet-line);
  background: var(--paper); /* a row on its way to a new place passes over the others */
}

.score-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.place {
  font: 800 1.1875rem / 0.85 var(--serif);
}

.place:empty {
  display: none;
}

/* The leader wears the crown where the others have a number. */
.place-crown {
  display: none;
  width: 27px;
  height: auto;
}

.is-leader .place-crown {
  display: block;
}

.is-leader .place {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Besley's tabular zero does not take the weight (it stays thin beside bold figures), so the score keeps
   the proportional figures and is set flush right. */
.score-num {
  font: 700 1.75rem / 1 var(--serif);
  text-align: right;
}

.score-rate,
.score-crowns {
  font: 500 var(--text-m) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.is-empty .score-num {
  grid-column: 3 / 6;
  color: var(--ink-soft);
  font: 400 var(--text-s) / 1.2 var(--sans);
}

.is-empty .score-rate,
.is-empty .score-crowns {
  display: none;
}

.screen .sheet-note {
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid var(--sheet-line);
  color: var(--ink-soft);
  font-size: var(--text-s);
  line-height: 1.45;
}

/* A clerk's stamp on the sheet while the count is young. */
.early {
  display: inline-block;
  margin: 0 5px 2px 0;
  padding: 4px 6px 2px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  font: 800 0.6875rem / 1 var(--serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: -3deg;
}

/* A narrow phone: the name of a model gets a few more px before it has to wrap. */
@media (max-width: 374px) {
  .score {
    padding-right: 12px;
    padding-left: 12px;
  }

  .score-head,
  .score-row {
    column-gap: 6px;
  }

  .score-row .model {
    font-size: 0.875rem;
  }
}

/* Room for the five rows before they arrive, so that what lies below the pad does not jump. */
.board {
  min-height: 310px;
}

/* While the first numbers are on their way the pad is not shown half empty. */
.is-loading .pad,
.is-loading .race {
  visibility: hidden;
}

/* The race: five lanes printed on the felt, from not funny to superintelligence. Each king has his own
   lane and his token stands on the mark of his score. Three marks cross the lanes: the start, the middle
   and the finish, which is a double line. */
.race {
  margin-top: 34px;
}

.race-ends {
  display: flex;
  justify-content: space-between;
  color: var(--paper-soft);
  font-size: var(--text-s);
}

.track {
  --lane: 48px;
  --half: 15px; /* half a token: the marks are where the middle of a token stands */
  position: relative;
  min-height: calc(5 * var(--lane)); /* room for the five before they arrive */
  margin-top: 18px;
}

.track::before,
.track::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.track::before {
  right: var(--half);
  left: var(--half);
  border-right: 5.5px double var(--paper-mark);
  border-left: 1.5px solid var(--paper-mark);
}

.track::after {
  left: 50%;
  margin-left: -0.75px;
  border-left: 1.5px solid var(--paper-mark);
}

.lane {
  position: relative;
  height: var(--lane);
}

.lane::before {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--half);
  left: var(--half);
  margin-top: -0.75px;
  border-top: 1.5px solid var(--paper-line);
}

/* Only his place along the lane changes: standings.js moves the token with a transform. */
.lane .token {
  position: absolute;
  top: calc((var(--lane) - 42px) / 2);
  left: 0;
  will-change: transform;
}

.lane .token.is-leader {
  z-index: 1; /* his crown lies over the lane above */
}

/* Nobody has voted on this king yet: his token waits at the start, in the shade, like a card low in the stack. */
.token.is-out::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--felt-shadow);
  opacity: 0.2;
}

.token-crown {
  display: none;
  position: absolute;
  top: -14px;
  left: 50%;
  width: 24px;
  height: auto;
  margin-left: -12px;
  rotate: -7deg;
}

.token.is-leader .token-crown {
  display: block;
}

.race-scale {
  position: relative;
  height: 1.2rem;
  margin-top: 7px;
  color: var(--paper-soft);
  font: 500 var(--text-s) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}

.race-scale span {
  position: absolute;
  top: 0;
  translate: -50% 0;
}

.race-scale span:nth-child(1) { left: 15px; }
.race-scale span:nth-child(2) { left: 50%; }
.race-scale span:nth-child(3) { left: calc(100% - 15px); }

/* ---------- The about screen: the rules of the table, printed on the felt ---------- */

.about h1 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 8.2vw, 2.125rem);
}

.steps {
  margin: 0;
  padding: 0;
  border-bottom: 1.5px solid var(--paper-line);
  counter-reset: step;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 60px;
  padding: 12px 0 13px 46px;
  border-top: 1.5px solid var(--paper-line);
  counter-increment: step;
  text-wrap: pretty;
}

/* The number of a step is set like the rank of a card. */
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 13px;
  left: 4px;
  font: 800 2rem / 0.9 var(--serif);
}

.steps strong {
  display: block;
  margin-bottom: 2px;
  font: 700 var(--text-l) / 1.3 var(--serif);
}

/* The formula, set as a fraction. */
.screen .formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  margin: 4px 0 16px;
  font: 500 1.1875rem / 1.2 var(--serif);
}

.fraction {
  display: inline-grid;
  text-align: center;
}

.fraction-top {
  padding: 0 4px 5px;
  border-bottom: 1.5px solid var(--paper);
}

.fraction-bottom {
  padding-top: 5px;
}

/* The five court cards spread on the felt, as a dealer spreads a deck: each shows its corner and its king.
   On the about screen, and in the reveal of a visitor who crowned nobody. */
.fan {
  position: relative;
  height: 0;
  margin: 24px 0 26px;
  padding-bottom: 49%;
}

.fan .king-card {
  position: absolute;
  top: calc(6% + var(--i) * var(--i) * 1.7%);
  left: calc(35.5% + var(--i) * 16.6%);
  width: 29%;
  rotate: calc(var(--i) * 4deg);
}

.fan .king-name {
  display: none;
}

.five,
.files {
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 1.5px solid var(--paper-line);
  list-style: none;
}

.five-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 62px;
  padding: 8px 0;
  border-top: 1.5px solid var(--paper-line);
}

.five-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

.model-id {
  color: var(--paper-soft);
  font-size: var(--text-s);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* The prompt texts: one line each, the whole line is the link. */
.file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 6px 0;
  border-top: 1.5px solid var(--paper-line);
  color: var(--paper);
  text-decoration: none;
}

.file-what {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.file-name {
  flex: none;
  color: var(--paper-soft);
  font-size: var(--text-s);
}

.file:focus-visible {
  outline-offset: 0;
}

/* The coin lies on the felt like the cards do. */
.coin {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 14px 0 16px;
}

.coin-art {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 1px 1px rgb(var(--shade) / 0.55), 0 4px 8px -1px rgb(var(--shade) / 0.42), 0 10px 18px -8px rgb(var(--shade) / 0.36);
}

.screen .coin-name {
  margin: 0 0 8px;
  font: 800 1.75rem / 1 var(--serif);
  letter-spacing: 0.02em;
}

.screen .coin-status {
  margin: 0;
}

/* Not launched: stamped, in the paper ink of the felt. */
.coin-stamp {
  display: inline-block;
  padding: 5px 8px 3px;
  border: 1.5px solid var(--paper);
  border-radius: 3px;
  font: 800 0.8125rem / 1 var(--serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: -3deg;
}

.coin-label {
  display: block;
  color: var(--paper-soft);
  font-size: var(--text-s);
}

.coin-mint {
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

/* ---------- The host: the joker's card, when there is no joke to show ---------- */

.panel {
  margin: auto 0;
  padding: 12px 0 28px;
  text-align: center;
}

.host {
  display: block;
  width: min(52%, 13rem);
  height: auto;
  margin: 0 auto 28px;
  border-radius: 4.6% / 3.3%;
  box-shadow:
    0 1px 1px rgb(var(--shade) / 0.5),
    0 3px 7px -1px rgb(var(--shade) / 0.38),
    0 12px 22px -8px rgb(var(--shade) / 0.36);
  rotate: -3deg;
}

.panel-title {
  margin: 0 0 8px;
  font: 700 var(--title-s) / 1.25 var(--serif);
}

.panel-note {
  max-width: 19rem;
  margin: 0 auto 20px;
  color: var(--paper-soft);
  text-wrap: balance;
}

.panel .btn {
  min-width: 10rem;
  margin: 4px 4px 0;
}

/* ---------- Reduced motion: nothing flies, turns or bounces; things fade ---------- */

@media (prefers-reduced-motion: reduce) {
  .act,
  .btn,
  .slip {
    transition-duration: 0.01s;
  }

  .slip {
    translate: -50% 0;
  }

  .choice-crown {
    scale: 1;
    transition: opacity 0.16s linear;
  }

  /* The card does not turn: the king fades in over the joke. */
  .card .king {
    opacity: 0;
    transition: opacity 0.2s linear, visibility 0s linear 0.2s;
  }

  .card.is-king .king {
    opacity: 1;
    transition: opacity 0.2s linear;
  }

  .is-staged .cascade > .sheet,
  .is-staged .tally-row .token,
  .is-staged.is-told .cascade > .sheet,
  .is-staged.is-told .tally-row .token {
    rotate: 0deg;
    translate: none;
    transition: opacity 0.2s linear;
  }

  .is-staged.is-told .cascade > * {
    transition: opacity 0.2s linear;
  }

  .is-staged .fan .king-card,
  .is-staged.is-told .fan .king-card {
    rotate: calc(var(--i) * 4deg);
    translate: none;
    transition: opacity 0.2s linear;
  }

  .is-staged .payoff-name,
  .is-staged.is-told .payoff-name {
    scale: 1;
  }

  .is-staged.is-told .payoff span,
  .is-staged.is-told .hero-hint,
  .is-staged.is-told .tally-row {
    transition: opacity 0.2s linear;
  }
}
