/* Pop Brutal: flat bright blocks, thick black outlines and hard offset shadows
   on a dotted cream background. */
:root {
  --bg: #fff5df;
  --dots: #e7d9b8;
  --ink: #111;
  --paper: #fff;
  --text: #111;
  --muted: #5f5645;
  --panel: #fffaf0;
  --panel-strong: #fff;
  --line: #111;
  --accent: #ffd23f;
  --blue: #3d5afe;
  --good: #00c896;
  --good-ink: #007a53;
  --bad: #ff4d3d;
  --bad-ink: #c8261a;

  /* Answer colors — A, B, C, D */
  --c0: #ff5a36;
  --c1: #4d7cff;
  --c2: #ffd23f;
  --c3: #00c896;

  /* The shared frame (header chips, player cards, phone header). A story theme
     (public/themes/*.css) swaps these so the frame still reads on its background. */
  --frame-shadow: var(--ink); /* hard shadow color */
  --frame-ring: 0 0 0 0 transparent; /* extra outline ring, as a box-shadow */
  --frame-text: var(--ink); /* text that sits straight on the background */

  --display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
  color: var(--text);
  font-family: var(--body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* The old blurred backdrop is gone; the dotted body background replaces it. */
.backdrop {
  display: none;
}

.logo {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  background: var(--ink);
  color: var(--accent);
  padding: 0.18em 0.42em 0.2em;
  transform: rotate(-2deg);
}
.logo span {
  margin-left: 0.28em;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pop {
  animation: pop-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.fade {
  animation: fade-up 0.5s ease both;
}
/* The logo keeps its tilt when it pops in. */
.logo.pop {
  animation-name: logo-pop;
}
@keyframes logo-pop {
  from {
    opacity: 0;
    transform: rotate(-2deg) scale(0.85) translateY(12px);
  }
  to {
    opacity: 1;
    transform: rotate(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

/* Icons (see common.js → icon()) */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
  vertical-align: -0.125em;
}
.avatar {
  color: var(--ink);
  border: var(--av-border, 2.5px) solid var(--ink);
  overflow: hidden;
  /* One full-size cell so the icon's 66% size and centering are exact. */
  grid-template: 100% / 100%;
  place-items: center;
}
.avatar .icon {
  width: 66%;
  height: 66%;
}
.avatar img.pic,
img.pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Picture trivia (kids mode): shared by TV and phone ---------- */
.art {
  display: grid;
  place-items: center;
}
.art-icon .icon {
  width: 100%;
  height: 100%;
  /* A hard ink shadow keeps pale colors (yellow, pink) readable on white. */
  filter: drop-shadow(0.06em 0.06em 0 var(--ink));
}
.art-swatch {
  aspect-ratio: 1;
  border: var(--bw, 2.5px) solid var(--ink);
  box-shadow: 0.08em 0.08em 0 var(--ink);
}
.art-count {
  gap: 0.08em;
}
.art-count b {
  font: 1em/1 var(--display);
}
.art-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.05em;
  max-width: 1.06em; /* rows of five, like counting on your fingers */
}
/* The number already says it; no need for a label too. */
.art-count + .label,
.art-count + .txt {
  display: none;
}
.art-dots i {
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  background: var(--ink);
}
