/* Keyboard test */
.kb-scroll { overflow-x: auto; padding-bottom: 6px; container-type: inline-size; }
.kb {
  --u: clamp(15px, calc(100cqw / 25.4), 44px);
  --g: calc(var(--u) * 0.1);
  display: flex; gap: calc(var(--u) * 0.5); align-items: flex-start;
  width: max-content; margin: 0 auto;
  font-size: calc(var(--u) * 0.3);
  user-select: none;
}
.blk { display: flex; flex-direction: column; gap: var(--g); }
.row { display: flex; gap: var(--g); height: var(--u); }
.k {
  width: calc(var(--u) * var(--w, 1) + (var(--w, 1) - 1) * var(--g));
  height: var(--u); flex: none;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-bottom-width: 3px;
  border-radius: calc(var(--u) * 0.16);
  font: 600 1em/1 var(--sans); text-align: center; overflow: hidden;
  transition: background .08s, border-color .08s, transform .05s;
}
.k small { font-size: .78em; font-weight: 600; opacity: .85; display: block; line-height: 1.15; }
.k.sp { visibility: hidden; border: 0; background: none; }
.k.tested { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); color: var(--ink); }
.k.down { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(2px); border-bottom-width: 1px; }

.np { display: grid; grid-template-columns: repeat(4, calc(var(--u) * 1)); grid-template-rows: repeat(6, var(--u)); gap: var(--g); }
.np .k { width: auto; height: auto; }
.nav { display: grid; grid-template-columns: repeat(3, calc(var(--u) * 1)); grid-template-rows: repeat(6, var(--u)); gap: var(--g); }
.nav .k { width: auto; height: auto; }

.panel { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.nums { display: flex; flex-wrap: wrap; gap: 14px 30px; font-variant-numeric: tabular-nums; }
.nums div b { display: block; font: 800 1.6rem/1.1 var(--mono); }
.nums div > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.lastline { text-align: center; color: var(--mute); margin: 18px 0 0; }
.lastline b { color: var(--ink); font-family: var(--mono); }
.hint { color: var(--mute); font-size: .9rem; margin: 14px 0 0; text-align: center; }
.focus-note { text-align: center; margin: 0 0 14px; font-weight: 600; }
.kbd-stage { outline: none; }
.start-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; margin: 0 0 18px; }
.start-row .focus-note { margin: 0; }
.kbd-stage:not(.active) .kb { opacity: .55; }
.focus-note .on { display: none; }
.kbd-stage.active .focus-note .on { display: inline; }
.kbd-stage.active .focus-note .off { display: none; }
