/* The games chooser, a native dialog. It has no padding, so a click on the dialog itself is a
   click outside its sheet. Every emblem box is 256px tall and every image has its size, so
   nothing moves as the files arrive. */
.kc-chooser{box-sizing:border-box;width:min(1120px, 100% - 2 * var(--gutter));max-width:none;max-height:calc(100svh - 32px);margin:auto;padding:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--rule);background:var(--paper);color:var(--ink)}
.kc-chooser::backdrop{background:rgba(31,31,31,.4)}
/* An engine with no <dialog> would print the cards under the footer. */
dialog:not([open]){display:none}
@media (max-width:759px),(max-height:560px){.kc-chooser{width:100%;height:100%;max-height:none;border:0}}
.kc-chooser__head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:0 20px;border-bottom:1px solid var(--rule);background:var(--paper)}
.kc-chooser__head h2{margin:0;font-size:28px;line-height:32px;font-weight:500;letter-spacing:-.04em}
.kc-cards{display:grid;grid-template-columns:minmax(0, 1fr);gap:1px;margin:0;padding:0;list-style:none;background:var(--rule)}
@media (min-width:760px){.kc-cards{grid-template-columns:repeat(2, minmax(0, 1fr))}}
@media (min-width:1180px){.kc-cards{grid-template-columns:repeat(4, minmax(0, 1fr))}}
.kc-cards li{display:flex;background:var(--paper)}

/* A card wears the sketchbook cast's well and square on hover and focus, and its found chip
   when it is the scene in view. Its text slides 18px by trading left and right padding, so the
   text box keeps its width, no line re-wraps and the dialog never moves. */
.kc-card{position:relative;flex:1 1 auto;display:flex;flex-direction:column;gap:4px;padding-bottom:22px;color:var(--ink-2);text-decoration:none;transition:background 180ms cubic-bezier(.4,0,.2,1),color 180ms cubic-bezier(.4,0,.2,1)}
.kc-card > :not(.kc-emblem){padding:0 38px 0 20px;transition:padding 180ms cubic-bezier(.22,1,.36,1)}
.kc-card::before{content:"";position:absolute;left:20px;top:273px;width:8px;height:8px;background:var(--ink);transform:scale(0);transition:transform 180ms cubic-bezier(.22,1,.36,1)}
.kc-card:hover,.kc-card:focus-visible{background:var(--well);color:var(--ink)}
.kc-card:hover > :not(.kc-emblem),.kc-card:focus-visible > :not(.kc-emblem){padding:0 20px 0 38px}
.kc-card:hover::before,.kc-card:focus-visible::before{transform:scale(1)}
.kc-card[aria-current="true"]{color:var(--ink)}
.kc-card[aria-current="true"]::after{content:"";position:absolute;top:15px;right:15px;width:10px;height:10px;background:var(--paint-1);box-shadow:0 0 0 1px #3d6a00}
.kc-card__name{font-size:18px;line-height:24px;font-weight:600;letter-spacing:-.02em}
.kc-card__line{font-size:15px;line-height:22px}
/* A scene heading that a card focuses marks where the next Tab starts; it is not a control, so no ring. */
.kc-scene h2[tabindex="-1"]:focus{outline:none}

/* The emblems. The guardian's first frame at four times; the door's drawn part, centred; the
   tower's three pieces laid from one corner, the roof one level (77 art pixels) up. */
.kc-emblem{position:relative;display:flex;align-items:center;justify-content:center;height:256px;margin-bottom:10px;overflow:hidden}
.kc-emblem img,.kc-emblem svg{display:block;flex:none}
.kc-card[href="#game-poortwachter"] img{width:256px;height:256px;object-fit:cover;object-position:0 0;image-rendering:pixelated}
.kc-card[href="#game-maze"] img{width:256px;height:256px;object-fit:none;object-position:48px -217px}
.kc-card[href="#game-tower"] img{position:absolute;left:calc(50% - 105px);top:12px}
.kc-card[href="#game-tower"] img:last-child{top:-65px}

/* The bar's counter, a button that opens the chooser. */
.kc-bar__count{appearance:none;-webkit-appearance:none;margin:0;border:0;border-right:1px solid var(--rule);border-radius:0;background:none;color:inherit;font:inherit;cursor:pointer}
.kc-bar__count:hover{background:var(--well)}
@media (prefers-reduced-motion:reduce){.kc-card,.kc-card > *,.kc-card::before{transition:none}}
