/* ===== מקלדת עברית של המשחק (נפתחת בשדות טקסט בטלפון/טאבלט) ===== */
#kb {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 70; direction: ltr;
  padding: 8px 12px 12px; background: var(--sh-purple-d, #7A2F71);
  border-top: var(--bw, 3px) solid var(--ink, #1d1a2b); box-shadow: 0 -4px 0 var(--rim, #fff), 0 -10px 24px rgba(0,0,0,.25);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  animation: kbUp .22s ease-out;
}
#kb[hidden] { display: none; }
@keyframes kbUp { from { transform: translateY(100%); } }
.kb-top { display: flex; justify-content: center; margin-bottom: 8px; }
.kb-preview {
  direction: rtl; min-width: 46%; max-width: 92%; min-height: 38px; padding: 2px 18px;
  background: var(--paper, #fffdf5); color: var(--ink, #1d1a2b); border: var(--bw, 3px) solid var(--ink, #1d1a2b); border-radius: 14px;
  font: 800 25px/1.35 var(--f); text-align: right; white-space: nowrap; overflow: hidden; box-shadow: var(--sticker-sm);
}
.kb-preview.empty span { opacity: .45; }
.kb-caret { display: inline-block; width: 3px; height: 1.05em; margin: 0 2px; vertical-align: -.18em; background: var(--sh-pink, #E8285E); animation: kbBlink 1s steps(1) infinite; }
@keyframes kbBlink { 50% { opacity: 0; } }
.kb-rows { display: flex; flex-direction: column; gap: 7px; }
.kb-row { display: flex; justify-content: center; gap: 7px; }
.kb-k {
  --u: calc((100% - 9 * 7px) / 10);
  flex: 0 0 auto; width: var(--u); max-width: 96px; height: 46px; padding: 0;
  border: var(--bw, 3px) solid var(--ink, #1d1a2b); border-radius: 12px; background: #fff; color: var(--ink, #1d1a2b);
  font: 800 25px/1 var(--f); box-shadow: 0 4px 0 var(--ink, #1d1a2b); cursor: pointer;
}
.kb-k.down { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink, #1d1a2b); background: var(--sh-yellow-l, #FFD466); }
.kb-mode, .kb-del { width: calc(var(--u) * 1.5); max-width: none; background: var(--sh-teal-l, #22BFD4); color: #fff; text-shadow: var(--outline); }
.kb-space { width: calc(var(--u) * 4.4); max-width: none; font-size: 20px; }
.kb-done { width: calc(var(--u) * 2.2); max-width: none; background: var(--sh-lime, #B9CB31); font-size: 22px; }
/* השדה שמקלידים אליו מסומן, והחלון עולה למעלה כדי שיישאר מעל המקלדת */
.kb-focus { outline: 4px solid var(--sh-yellow, #FDB515) !important; outline-offset: 2px; }
#game.kb-open #modal { place-items: start center; padding-top: 6px; }
#screen { transition: translate .2s ease-out; }
