/* Shared by every page: the footer line and the language picker in the corner. */

/* One column the height of the view: main takes the space the footer leaves, so the
   footer line always sits at the bottom edge, in the same type, on every page. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
main { flex: 1; }
/* Two halves: the promise on the left, name and legal links on the right. Narrow
   screens stack them, centered. */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25em 1.5em;
  padding: 0 1.5em max(1.25em, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-faint);
}
footer p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; text-wrap: balance; }
@media (max-width: 560px) {
  footer { justify-content: center; }
}
footer a { color: inherit; text-underline-offset: 2px; transition: color 0.12s ease; }
@media (hover: hover) {
  footer a:hover { color: var(--ink); }
}
/* Language picker: a native dropdown in the top-right corner, a quiet pill with
   a chevron; the system menu does the rest. */
.languages {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 10;
}
.languages select {
  appearance: none;
  border: 0;
  border-radius: 999px;
  height: 36px;
  padding: 0 34px 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 9px 6px,
    color-mix(in srgb, var(--pill-bg) 70%, transparent);
  cursor: pointer;
}
.languages select:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The parade strip and the playable ball (site/play.js), shared by every page. */
/* The parade: a little crew of glyphs crossing the bottom of the view, each in its
   own gait (rolling, hopping, tumbling, waddling), with a lagger or two. Board-glyph
   size, walking the view's bottom edge behind the footer, never in the way. */
.parade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0; /* on the view's bottom edge, behind the footer line */
  height: calc(var(--walker, 40px) * 3.2); /* room above for the highest hops and sparks */
  overflow-x: clip; /* cut at the view's sides; double jumps may rise above the strip */
  overflow-y: visible;
  pointer-events: none;
  z-index: 0;
}
.walker { position: absolute; bottom: 0; width: var(--walker, 40px); height: var(--walker, 40px); transform-origin: 50% 100%; }
.walker .act, .walker .gait { width: 100%; height: 100%; will-change: transform; }
.walker .act { transform-origin: 50% 100%; } /* squashes from the ground */
/* The light a walker throws on the floor: a soft ellipse in its color, fading and
   shrinking as it leaves the ground and coming back as it lands. */
.walker .glow {
  position: absolute;
  left: -20%;
  bottom: -14%;
  width: 140%;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 55%, transparent), transparent);
  will-change: transform, opacity;
  pointer-events: none;
}
.walker svg { width: 100%; height: 100%; overflow: visible; display: block; }
.player-layer { z-index: 5; }
/* The ball's light on a platform it stands on, inside the element, clipped by its edge. */
.platform-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--walker, 40px);
  height: calc(var(--walker, 40px) * 0.5);
  margin-left: calc(var(--walker, 40px) * -0.5);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 60%, transparent), transparent);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* A glyph's face turns about the middle of its 100-unit box. */
.face { transform-box: view-box; transform-origin: 50px 50px; }

/* Coins (site/play.js): tiny white shapes falling like snow, and the counter beside the
   corner button they fly into. */
.coin-layer { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.coin {
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  will-change: transform;
}
.coin svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (prefers-color-scheme: light) {
  .coin { filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 5px rgba(0, 0, 0, 0.15)); }
}
.coin-counter {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pill-bg) 70%, transparent);
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.coin-icon { width: 12px; height: 12px; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)); }
.coin-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
