/* Mystery Bag shared styles.
   Layout: one calm slate page; the bag (fabric indigo) and the four counters are the only strong colour. */
:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --ink: #1c2230;
  --muted: #5b6475;
  --line: #d5dbe4;
  --fabric: #3d3a7d;
  --fabric-dark: #2a2759;
  --focus: #1b6fd1;
  --red: #d63b2f;
  --blue: #2563c9;
  --green: #23935a;
  --yellow: #f2bf26;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
.tnum { font-variant-numeric: tabular-nums; }

button, select, input { font: inherit; color: inherit; }
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  transition: background .15s, transform .08s, box-shadow .15s;
}
button:hover { background: #f4f6fa; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.primary {
  background: var(--fabric);
  border-color: var(--fabric);
  color: #fff;
  box-shadow: 0 2px 0 var(--fabric-dark);
}
button.primary:hover { background: #4a4693; }
button.danger { color: #a3241b; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* A counter: a glossy plastic disc. Letter for colour-blind readers. */
.counter {
  --c: var(--red);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.55) 0 14%, rgba(255,255,255,0) 32%),
    radial-gradient(circle at 50% 50%, var(--c) 0 62%, color-mix(in srgb, var(--c) 72%, #000) 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.25);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--display);
  user-select: none;
}
.counter.R { --c: var(--red); }
.counter.B { --c: var(--blue); }
.counter.G { --c: var(--green); }
.counter.Y { --c: var(--yellow); color: #4a3800; }

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