/* A card named in an achievement's description (components/isback-ach-text.js): as a card's name
   in a tutorial's pop-up (is-back/gameplay/tutorial.css .tut-card) — bold, coloured by the card's
   type, a little box lit on hover; the card shows on hover (a tap on a phone). */
.rk-card-ref {
  --lc: #fff;
  color: var(--lc); font-weight: 800; cursor: help;
  /* (Its little box reaches past the name: the words around it keep their places.) */
  display: inline-block; margin: 1px -3px; padding: 0 3px; line-height: 1.3; border-radius: 5px;
  transition: background-color .15s, text-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.rk-card-ref:hover { background-color: color-mix(in srgb, var(--lc) 16%, transparent); text-shadow: 0 0 10px color-mix(in srgb, var(--lc) 80%, transparent); }
.rk-card-ref.t-rock     { --lc: var(--rock-b, #3fb950); }
.rk-card-ref.t-paper    { --lc: var(--paper-b, #58a6ff); }
.rk-card-ref.t-scissors { --lc: var(--scissors-b, #f0883e); }
.rk-card-ref.t-gun      { --lc: var(--gun-b, #e3b341); }

/* Hovered with a mouse: the card's picture beside the pointer. */
.rk-card-ref-tip {
  position: fixed; z-index: 100001; display: none; pointer-events: none;
  width: 240px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6));
}
/* The card's picture with its print bleed cropped, as the card view shows it (isback-card-view.css). */
.rk-card-ref-face { position: relative; overflow: hidden; aspect-ratio: 1086 / 1512; border-radius: min(45px, 12%) / min(45px, 8.62%); background: #111; }
.rk-card-ref-face img { position: absolute; top: -1.323%; left: -1.842%; width: 103.684%; height: 102.646%; display: block; }
.rk-card-ref-tip .rk-card-ref-face { width: 100%; }

/* Tapped on a phone: the card big over everything (a card view too); a tap closes it. */
.rk-card-ref-peek {
  position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,.78); opacity: 0; transition: opacity .18s;
}
.rk-card-ref-peek[hidden] { display: none; }
.rk-card-ref-peek.show { opacity: 1; }
.rk-card-ref-peek figure { margin: 0; text-align: center; transform: scale(.94); transition: transform .22s cubic-bezier(.2,.9,.3,1.2); }
.rk-card-ref-peek.show figure { transform: none; }
.rk-card-ref-peek .rk-card-ref-face { width: min(78vw, 380px, calc(70vh * 1086 / 1512)); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.rk-card-ref-peek figcaption { margin-top: 12px; font-size: 16px; font-weight: 700; color: #e6edf3; }
@media (prefers-reduced-motion: reduce) { .rk-card-ref-peek, .rk-card-ref-peek figure { transition: none; } }
