/* The shell every page wears: the strip over the door, and the column under it.
 *
 * Both views are the club now, so what used to be the home page's own chrome is
 * the site's. This sheet loads on every page, above whichever placement sheet
 * the view wears — club.css for the front and a player, race.css for a race —
 * and it is what keeps the two from each owning a copy of the same header.
 * Every colour, size and face is a token from design/tokens.css. */

* { box-sizing: border-box; }

/* The attribute wins over any display the components set, or a hidden
   scoreboard is a visible one. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  overflow-x: hidden;
}

/* The strips bleed to the window; everything between them sits in this column,
   which stretches so the footer closes the window on a short page. */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hall {
  position: relative;
  max-width: var(--space-content-column);
  margin: 0 auto;
  padding: var(--space-gutter-max) var(--space-gutter-min);
  flex: 1;
  width: 100%;
}

.failed { padding: var(--space-gutter-max); color: var(--orange-inked); }

/* ── The strip over the door: the mark left, the player right ──────────── */

.signage { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.club-brand { display: flex; align-items: center; gap: 12px; }
.site-nav { display: flex; align-items: center; gap: var(--space-gutter-min); }

/* The mark is the Pollen microduck page's own: the duck head, then MICRODUCK in
   its yellow and ARENA in its orange, stacked. No chromatic aberration on it —
   the treatment belongs on a cover, and here the mark shares a strip with a
   handle and a picture, where the two ghosts read as a printing fault. */
.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.wordmark span { display: block; }
.wordmark a { color: inherit; text-decoration: none; }
.signage-end .mono-label a { color: inherit; }
.wordmark__solid { color: var(--yellow); }
.wordmark__arena { color: var(--orange); }

.duckhead { width: 46px; height: auto; flex: none; }

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  border: 2px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--type-sticker-family);
  font-size: 1rem;
  letter-spacing: var(--type-sticker-tracking);
  text-transform: uppercase;
}
.profile-chip:hover { background: var(--deep-ink); }

/* The stand-in, while /api/me is in flight: the same plate, a duck on beige,
   at the size the real one will be so nothing moves when it lands. */
.profile-chip--waiting {
  background: var(--warm-paper);
  border-color: var(--warm-paper);
  padding: 4px;
}
.profile-chip--waiting .duckhead { width: 32px; }

/* The points as plain figures here, in the chip's own face beside the handle,
   rather than as split-flap tiles. The tiles are a device for a stage; on a
   16px strip they read as a second widget bolted to the first.
   The STRUCTURE stays — run.js replaces this .flip's children with tiles to
   roll the total up when a result is revealed, and the class is what it finds
   — so this is the look coming off, not the machinery. Giving the digits back
   their tile is the two declarations below, inverted. Only the resting seam
   goes: a rolling tile's ::after is its bottom flap, and the reveal waits on
   that flap's animationend to credit the next receipt. */
.profile-chip { position: relative; }
.profile-chip .flip { gap: 0; font-size: 1rem; }
.profile-chip .flip-digit { width: auto; height: auto; background: transparent; }
.profile-chip .flip-digit:not(.flip-roll)::after { display: none; }
.profile-chip .chip-points::before { content: "✦"; color: var(--yellow); padding-right: 4px; }
/* When it receives points it jolts as the CRT does, not as a cell does. */
.profile-chip.jolt { --impact-distance: var(--impact-verdict); }

.wordmark a:focus-visible, .profile-chip:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* The Hub's picture when it has one, a duck on lavender when it does not. */
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 2px solid var(--ink);
  /* Beige, not a colour: a Hub picture may carry its own transparency, and
     what shows through should be the page's own paper rather than a lavender
     plate that looks like a badge standing for something. */
  background: var(--warm-paper);
  font-size: 22px;
  line-height: 1;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .signage { padding: 14px var(--space-gutter-min); gap: var(--space-gutter-min); }
  .duckhead { width: 34px; }
  .signage-end { grid-template-columns: 1fr; }
  .signage-end .signage-stickers { margin-left: 0; flex-wrap: wrap; }
}
