/* "Watch, then try": the caption panel sits in the open band between the formation and the
   player's zone (world y 430..600; the world is 54 rem tall and centred, so 50% - 5.5 rem is
   world y 430), key caps that light while the autopilot "presses" them, and progress dots. */
.demo { pointer-events: none; padding: 0; }
.demo-cap {
  position: absolute; left: 50%; top: calc(50% - 5.5rem); width: min(66rem, calc(100% - 2rem));
  box-sizing: border-box; transform: translateX(-50%); padding: 1rem 1.8rem 0.9rem; text-align: center;
  background: linear-gradient(180deg, rgba(8, 10, 22, 0.8), rgba(8, 10, 22, 0.66));
  border: 0.12rem solid rgba(120, 220, 255, 0.28); border-radius: 1.1rem;
  box-shadow: 0 0.6rem 2.4rem rgba(0, 0, 0, 0.5), 0 0 2rem rgba(60, 200, 255, 0.12);
  transition: opacity 0.6s ease;
}
.demo-cap.pop { animation: cap-in 0.4s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
.demo-cap.gone { opacity: 0; }
@keyframes cap-in { from { opacity: 0; transform: translate(-50%, -0.8rem) scale(0.97); } }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; }
.demo-name { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.demo-title { margin: 0; font: 900 2.4rem var(--display); font-stretch: condensed; letter-spacing: 0.06em;
  text-transform: uppercase; color: #bff6ff; white-space: nowrap; }
.demo-kicker {
  flex: none; font-size: 1.05rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 0.6rem; background: rgba(70, 200, 255, 0.2); color: #bfe9ff;
  border: 0.1rem solid rgba(110, 210, 255, 0.55);
}
.demo-kicker.try { background: rgba(255, 170, 40, 0.24); color: #ffe2a8; border-color: rgba(255, 190, 70, 0.75); }
.demo-dots { display: flex; gap: 0.45rem; flex: none; }
.demo-dots i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.demo-dots i.past { background: rgba(110, 230, 255, 0.7); }
.demo-dots i.now { background: var(--cyan); box-shadow: 0 0 0.6rem rgba(70, 240, 255, 0.9); transform: scale(1.3); }
.demo-text { margin: 0.6rem 0 0.2rem; font-size: 1.75rem; font-weight: 800; line-height: 1.5; }
.demo-foot { margin: 0.4rem 0 0; font-size: 1.05rem; font-weight: 700; color: var(--ink-dim); white-space: pre; }

.key {
  display: inline-block; min-width: 1.1em; padding: 0.05em 0.45em; margin: 0 0.08em; border-radius: 0.35em;
  font: inherit; font-weight: 900; line-height: 1.25; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  border: 0.1rem solid rgba(255, 255, 255, 0.4); box-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.45);
  transition: background 0.08s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.demo-foot .key { box-shadow: 0 0.12rem 0 rgba(0, 0, 0, 0.45); }
.key.lit {
  color: #04202a; background: linear-gradient(180deg, #e6fdff, var(--cyan)); border-color: #e6fdff;
  transform: translateY(0.15rem); box-shadow: 0 0 1.2rem rgba(70, 240, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .demo-cap.pop, .key { animation: none; transition: none; }
}
