/* /wiki "How to play" clips (temp/wiki.php case 'guide', public/js/wiki-guide.js; owner 04.12 20:46).
   One lantern lit in the hold: the card whose clip plays is lit in brass and rises a little, the rest wait in half light
   on their poster. The brass ring of the badge runs once per loop of the clip, like the hand of a ship's clock.
   States: .is-on (playing), .is-on.is-held (paused on its frame), .is-wait (clip still loading); .kb-glive on .kb while a clip plays. */

.kb-gclip{position:relative;cursor:pointer;
  transition:transform .22s cubic-bezier(.2,.7,.3,1),border-color .22s ease,box-shadow .22s ease,background-color .22s ease}
.kb-gcard>.kb-gmedia{position:relative;padding:0;background:#0d0a08}
.kb-gcard>div:not(.kb-gmedia){transition:opacity .24s ease}
.kb-gmedia video{transition:filter .24s ease}

/* the toggle: covers the whole clip, so a tap anywhere on the picture works; the badge sits in the corner the game's
   own prompts leave free (keys top left, mouse top right, ammo bar along the bottom middle) */
.kb .kb-gplay{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;
  background:none;color:inherit;font:inherit;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}
.kb .kb-gplay:focus{outline:none}
.kb .kb-gplay:focus-visible{outline:2px solid var(--brass);outline-offset:-7px;border-radius:9px}
.kb-gbadge{position:absolute;right:10px;bottom:10px;width:44px;height:44px;pointer-events:none;overflow:visible;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.5));transition:opacity .24s ease}
.kb-gdisc{fill:rgba(22,17,13,.8)}
.kb-gtrack{fill:none;stroke:rgba(255,216,160,.34);stroke-width:1.5}
.kb-gring{fill:none;stroke:var(--brass);stroke-width:2.6;stroke-linecap:round;stroke-dasharray:106.81;stroke-dashoffset:106.81;
  opacity:0;transform:rotate(-90deg);transform-box:fill-box;transform-origin:center}
.kb-gi-play,.kb-gi-pause{fill:var(--brass)}
.kb-gplay[aria-pressed=true] .kb-gi-play,.kb-gplay[aria-pressed=false] .kb-gi-pause{display:none}

/* pointed at, before the clip starts: the frame warms */
@media (hover:hover){
  .kb-gclip:hover{border-color:var(--line-2)}
  .kb-gclip:hover .kb-gtrack{stroke:rgba(255,216,160,.6)}
}

/* on: lit in brass, a little higher; the ring shows how far the clip has run */
.kb-gclip.is-on{border-color:rgba(255,216,160,.78);background-color:var(--hull-2);transform:translateY(-3px);
  box-shadow:0 0 0 1px rgba(255,216,160,.3),0 20px 38px -14px rgba(0,0,0,.85),0 0 44px -6px rgba(255,216,160,.24)}
.kb-gclip.is-on .kb-gring{opacity:1}
.kb-gclip.is-on .kb-gtrack{stroke:rgba(255,216,160,.4)}
/* held: still the chosen card, paused on its frame */
.kb-gclip.is-held{transform:none;border-color:rgba(255,216,160,.5);box-shadow:0 0 0 1px rgba(255,216,160,.14)}
/* loading: a short arc turns until the first frames arrive */
.kb-gclip.is-wait .kb-gring{stroke-dasharray:24 83;stroke-dashoffset:0!important;animation:kb-gspin .9s linear infinite}
@keyframes kb-gspin{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}

/* while a clip plays, the others step back into half light */
.kb-glive .kb-gcard:not(.is-on)>div:not(.kb-gmedia){opacity:.74}
.kb-glive .kb-gclip:not(.is-on) video{filter:brightness(.56) saturate(.5)}
.kb-glive .kb-gclip:not(.is-on) .kb-gbadge{opacity:.6}

@media (max-width:640px){
  .kb-gbadge{right:8px;bottom:8px;width:40px;height:40px}
}
@media (prefers-reduced-motion:reduce){
  .kb-gclip.is-on{transform:none}
}
/* owner 04.12 21:06: no indicator on the clip, it distracts; the invisible full-size button stays for clicks, keyboard and screen readers */
.kb .kb-gbadge{display:none}
