
.kh { position: absolute; z-index: 6; left: 50%; top: max(150px, 24%); transform: translateX(-50%); 
  width: min(340px, calc(100% - 32px)); pointer-events: none; }
.kh.hidden { display: none; }
.kh-card {
  pointer-events: none; padding: 14px 16px 12px; border-radius: 16px; border: 1px solid var(--hn-gold, rgba(201, 162, 74, .85));
  background: linear-gradient(180deg, rgba(36, 46, 68, .86), rgba(16, 22, 36, .9)); color: var(--hn-ink, #fbf1d6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
  font: 500 13.5px/1.35 var(--hn-sans, system-ui, sans-serif); word-break: keep-all; animation: khIn .35s ease-out;
}
@keyframes khIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kh-card { animation: none; } }
.kh-t { display: block; margin: 0 0 8px; font: 700 13px/1.2 var(--hn-sans, system-ui, sans-serif); letter-spacing: .08em; color: #f0d890; }
.kh-row { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.kh-keys { flex: 0 0 104px; display: flex; justify-content: center; align-items: center; }
.kh-lb { color: var(--hn-ink, #fbf1d6); }
.kh-k {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; margin: 1px;
  border-radius: 6px; border: 1px solid rgba(240, 216, 144, .7); border-bottom-width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); color: #fff6dc;
  font: 700 11.5px/1 var(--hn-sans, system-ui, sans-serif);
}
.kh-k.wide { min-width: 64px; }
.kh-k.sm { min-width: 18px; height: 18px; padding: 0 4px; font-size: 10px; border-bottom-width: 2px; }

.kh-wasd { display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: 26px 26px; gap: 2px; }
.kh-wasd .w { grid-column: 2; grid-row: 1; }
.kh-wasd .a { grid-column: 1; grid-row: 2; } .kh-wasd .s { grid-column: 2; grid-row: 2; } .kh-wasd .d { grid-column: 3; grid-row: 2; }
.kh-ico { width: 26px; height: 26px; color: #f0d890; }
.kh-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .7);
  background: rgba(255, 255, 255, .07); font: 600 12px/1 var(--hn-sans, system-ui, sans-serif); white-space: nowrap;
}
.kh-chip.round { width: 40px; height: 40px; justify-content: center; padding: 0; background: linear-gradient(180deg, rgba(243, 220, 156, .95), rgba(201, 162, 74, .95)); color: #2b2008; }
.kh-live { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(240, 216, 144, .22); }
.kh-live .kh-lb { margin-left: 4px; font-size: 12.5px; color: var(--hn-ink-soft, #c9bf9c); }
.kh-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.kh-foot small { color: var(--hn-ink-soft, #c9bf9c); font-size: 11.5px; }
.kh-ok {
  pointer-events: auto; min-height: 36px; padding: 0 18px; border-radius: 999px; border: 1px solid #f0d890; cursor: pointer;
  background: linear-gradient(180deg, #f3dc9c, #c9a24a); color: #2b2008; font: 700 13px/1 var(--hn-sans, system-ui, sans-serif);
}
.kh.phone .kh-foot { justify-content: center; }
.kh.phone .kh-ok { min-height: 42px; padding: 0 28px; }
.kh-ok:focus-visible, .kh-q:focus-visible, .s3-snd:focus-visible { outline: 2px solid #f0d890; outline-offset: 2px; }

.kh-q { min-width: 38px; padding: 0 10px !important; font-weight: 700; }
.s3-snd { min-width: 40px; padding: 0 9px !important; display: inline-flex; align-items: center; justify-content: center; }
.s3-snd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s3-snd.off { opacity: .8; }
@media (max-width: 420px) {
  .kh { top: calc(max(6px, env(safe-area-inset-top)) + 104px); }
  .kh-keys { flex-basis: 88px; }
}
