/* Brain Dash — /games/brain-dash/. Kit tokens only (design-system.css);
   bright tokens are fills, text uses ink or the -ink siblings. Buttons reuse
   .hub-btn from kids-hub.css; the canvas draws with the same kit hex values
   because a canvas cannot read custom properties. */

.bd-wrap { max-width: 1040px; margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-8); color: var(--ink); }
.bd-head { margin-bottom: var(--s-4); }
.bd-title { font-family: var(--font-display); font-weight: var(--w-display); font-size: clamp(32px, 5vw, 48px); line-height: 1.05; margin: 0; color: var(--ink); }
.bd-sub { margin: var(--s-2) 0 0; font-size: 18px; color: var(--ink-soft); }

.bd-stage {
  position: relative; width: 100%; height: min(78vh, 600px); min-height: 340px;
  border: var(--line-ink); border-radius: var(--r-lg); overflow: hidden; background: var(--sky-tint);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.bd-stage canvas { position: absolute; inset: 0; display: block; }

.bd-panel {
  position: absolute; inset: 0; display: flex; overflow-y: auto; padding: var(--s-4);
  background: rgba(42, 27, 51, 0.32); touch-action: pan-y;
}
.bd-panel[hidden] { display: none; }
.bd-card {
  margin: auto; width: 100%; max-width: 520px; background: var(--paper-2); border: var(--line-ink);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.bd-card--center { text-align: center; }
.bd-card h2 { font-family: var(--font-display); font-weight: var(--w-display); font-size: 32px; line-height: 1.1; margin: 0 0 var(--s-2); color: var(--ink); }
.bd-label { font-weight: 700; font-size: 15px; color: var(--ink-soft); margin: var(--s-4) 0 var(--s-2); }
.bd-label:first-child { margin-top: 0; }
.bd-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: var(--s-2); }
.bd-choices--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd-chip {
  min-height: var(--tap-min); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 2px solid var(--rule-color);
  background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: 17px; line-height: 1.2;
  text-align: left; cursor: pointer;
}
.bd-chip small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.bd-chip[aria-pressed="true"] { border-color: var(--tangerine); background: var(--tangerine-tint); color: var(--tangerine-ink); }
.bd-chip:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 2px; }
.bd-toggles { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.bd-toggles .bd-chip { flex: 1 1 160px; }
.bd-play { width: 100%; margin-top: var(--s-4); font-size: 20px; }
.bd-best { margin: var(--s-3) 0 0; text-align: center; color: var(--ink-soft); font-weight: 700; }

.bd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-4) 0; }
.bd-stat { background: var(--paper-3); border-radius: var(--r-md); padding: var(--s-2) var(--s-1); }
.bd-stat b { display: block; font-family: var(--font-display); font-weight: var(--w-display); font-size: 28px; line-height: 1.1; color: var(--ink); }
.bd-stat span { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.bd-newbest { color: var(--mint-ink); font-weight: 700; margin: 0; }
.bd-practice { text-align: left; background: var(--sun-tint); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-2); }
.bd-practice ul { margin: var(--s-1) 0 0; padding-left: 20px; font-size: 18px; font-weight: 700; }
.bd-actions { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }

.bd-hud { position: absolute; right: var(--s-2); bottom: var(--s-2); display: flex; gap: var(--s-2); }
.bd-hud[hidden] { display: none; }
.bd-icon-btn {
  width: var(--tap-min); height: var(--tap-min); border-radius: var(--r-pill); border: 2px solid var(--ink);
  background: var(--paper-2); color: var(--ink); font-size: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.bd-icon-btn:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 2px; }

.bd-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s-5); margin-top: var(--s-6); }
.bd-info h2 { font-family: var(--font-display); font-weight: var(--w-display); font-size: 24px; line-height: 1.15; margin: 0 0 var(--s-2); color: var(--ink); }
.bd-info p, .bd-info li { font-size: 17px; line-height: 1.55; }
.bd-info ul { padding-left: 20px; margin: 0; }
.bd-lanes { list-style: none; padding: 0 !important; display: grid; gap: var(--s-2); margin: var(--s-2) 0 !important; }
.bd-lanes li { display: flex; align-items: center; gap: var(--s-2); }
.bd-dot { width: 18px; height: 18px; border-radius: var(--r-pill); flex: none; }
.bd-info a { color: var(--sky-ink); font-weight: 700; }

@media (max-width: 600px) {
  .bd-stage { height: min(72vh, 520px); }
  .bd-card { padding: var(--s-4); }
}
