/* The chrome every hero shares: the back link, the Play button and the loop
   credit. Each hero sets --kit-fg, --kit-bg, --kit-accent and --kit-font to
   make it its own; the hero itself owns everything else on the page. */

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  background: var(--kit-bg, #000);
  color: var(--kit-fg, #fff);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { overflow-x: hidden; }

.kit-hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}

.kit-hero > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kit-bar {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font: 700 11px/1.2 var(--kit-font, "JetBrains Mono", ui-monospace, Consolas, monospace);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}

.kit-bar > * { pointer-events: auto; }

.kit-back {
  color: var(--kit-fg, #fff);
  text-decoration: none;
  opacity: 0.75;
  padding: 10px 0;
}

.kit-back:hover,
.kit-back:focus-visible { opacity: 1; }

.kit-play {
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--kit-bg, #000);
  background: var(--kit-accent, #ff6a2b);
  border: 1px solid var(--kit-accent, #ff6a2b);
  cursor: pointer;
}

.kit-play[aria-pressed="true"] {
  background: transparent;
  color: var(--kit-accent, #ff6a2b);
}

.kit-credit {
  position: absolute;
  z-index: 50;
  right: 16px;
  bottom: 10px;
  margin: 0;
  font: 400 10px/1.4 var(--kit-font, "JetBrains Mono", ui-monospace, Consolas, monospace);
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.kit-credit a { color: inherit; }

@media (min-width: 768px) {
  .kit-bar { padding: 18px 28px; }
  .kit-credit { right: 28px; }
}

/* Inside the gallery's live preview: the picture only. */
.kit-preview .kit-bar,
.kit-preview .kit-credit { display: none; }
