/* The "Made with Kuickr" pill (architecture link-distribution/06 §5).
   A row in the page's own flow: it is never positioned over the page, so it
   cannot cover content, an in-frame control or a reader bar. Tokens only; the
   fallbacks are system colours for surfaces that load no token sheet. */
.kk-made-with {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: var(--kk-s-3, 12px) var(--kk-s-4, 16px) calc(var(--kk-s-3, 12px) + env(safe-area-inset-bottom, 0px));
}

/* This sheet is linked only by a surface that draws the pill, so the row is the
   page's last one and owns the end-of-page band. Without this the article keeps
   its own reserve (72px, 96px on a phone) AND the row adds its padding, which
   left the pill sitting in ~104px of empty paper (~128px on a phone). */
.kk-readwrap { padding-bottom: var(--kk-s-3, 12px); }

/* A phone docks the reader's side panel to the bottom edge. The article above no
   longer reserves room for its rail, so the pill's row keeps that clearance —
   below the pill, where it reads as the panel's space and not as a gap. */
@media (max-width: 560px) {
  .kk-shell:not(.kk-mode-full) .kk-made-with {
    padding-bottom: calc(var(--kk-s-8, 72px) + env(safe-area-inset-bottom, 0px));
  }
}

.kk-made-with-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px 4px 7px;
  border: 1px solid var(--kk-border, GrayText);
  border-radius: var(--kk-r-pill, 999px);
  background: var(--kk-card, Canvas);
  color: var(--kk-text-soft, CanvasText);
  font: 500 12px/1.2 var(--kk-font-ui, system-ui, sans-serif);
  text-decoration: none;
  white-space: nowrap;
}

.kk-made-with-pill:hover,
.kk-made-with-pill:focus-visible {
  border-color: var(--kk-muted, GrayText);
  color: var(--kk-ink, CanvasText);
}

.kk-made-with-pill img { flex: none; border-radius: var(--kk-r-xs, 4px); }

/* Pro's smaller pill (package attribution `subtle`). */
.kk-made-with-pill.is-subtle {
  gap: var(--kk-s-1, 4px);
  padding: 3px var(--kk-s-2, 8px) 3px 6px;
  border-color: var(--kk-line, GrayText);
  font-size: 11px;
}

/* The full view: the frame or text fills the screen and the row follows it. Above
   phone width the full view keeps no room under the page for its floating bar, so
   the row brings its own; on a phone the shell already reserves it. */
@media (min-width: 641px) {
  .kk-mode-full .kk-made-with {
    padding-bottom: calc(var(--kk-s-8, 72px) + var(--kk-s-3, 12px) + env(safe-area-inset-bottom, 0px));
  }
}

/* The game landing is always dark and paints its own surface. */
.kk-play .kk-made-with { justify-content: flex-start; padding: var(--kk-s-3, 12px) 0 0; }
.kk-play .kk-made-with-pill {
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 7%, transparent);
  color: inherit;
}
