/* Экранная клавиатура ReStar POS: светлое стекло, тёплые акценты, подсказки над клавишами. */
.vkb { position: fixed; bottom: 14px; left: 12px; z-index: 80; padding: 12px 12px 14px; border-radius: 12px; color: #1f2328; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(250, 245, 240, .78) 100%);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 40px 90px -30px rgba(31, 20, 10, .55), 0 10px 30px -18px rgba(247, 103, 7, .35), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(0, 0, 0, .04); }
@supports (backdrop-filter: blur(1px)) {
  .vkb { background: linear-gradient(180deg, rgba(255, 255, 255, .58) 0%, rgba(255, 246, 238, .5) 100%); backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8); }
}
.vkb::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 60% at 15% -10%, rgba(255, 169, 77, .22), transparent 60%), radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, .7), transparent 55%); }
.vkb.in { animation: vkbIn .32s cubic-bezier(.2, 1.25, .35, 1); }
@keyframes vkbIn { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
.vkb > * { position: relative; }

/* подсказки */
.vkb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 52px; }
.vkb.no-sug .vkb-top { min-height: 0; margin-bottom: 6px; justify-content: flex-end; }
.vkb-sug { flex: 1; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); padding: 2px; }
.vkb-sug::-webkit-scrollbar { display: none; }
.vkb-lbl { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: #9c4a0c; background: rgba(255, 146, 43, .14); border-radius: 999px; padding: 6px 11px; text-transform: none; }
.vkb-lbl i { font-size: 15px; }
.vkb-empty { color: #868e96; font-size: 13.5px; padding: 0 6px; white-space: nowrap; }
.sug { flex-shrink: 0; display: flex; align-items: center; gap: 9px; height: 48px; padding: 4px 14px 4px 4px; border-radius: 12px; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .45), inset 0 1px 0 #fff; transition: transform .08s, background .15s; max-width: 280px; }
.sug:active { transform: scale(.96); background: #fff4e6; }
.sug .si { position: relative; overflow: hidden; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; background: linear-gradient(160deg, #fff3e0, #ffe8cc); display: flex; align-items: center; justify-content: center; color: #f59f00; font-size: 18px; }
.sug .si img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sug .st { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.sug .sn { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; color: #212529; }
.sug .sn mark { background: none; color: #e8590c; }
.sug .sp { font-size: 12px; color: #868e96; }
.sug.cat .si { background: rgba(255, 146, 43, .16); }
.vkb-hide { flex-shrink: 0; height: 44px; padding: 0 12px; border-radius: 12px; display: flex; align-items: center; gap: 2px; color: #495057; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .8); font-size: 19px; }
.vkb-hide:active { transform: scale(.95); }

/* клавиши */
.vkb-keys { display: flex; flex-direction: column; gap: 9px; }
.vkb-row { display: flex; gap: 7px; justify-content: center; }
.lay-ru .r1 { padding: 0 2.2%; }
.lay-en .r1 { padding: 0 5%; }
.k { flex: 1 1 0; min-width: 0; height: 60px; border-radius: 12px; position: relative; font-size: 23px; font-weight: 400; color: #1f2328; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .82));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 -1px 0 rgba(0, 0, 0, .05) inset, 0 6px 14px -10px rgba(40, 25, 10, .55), 0 1px 2px rgba(40, 25, 10, .08);
  transition: transform .07s, background .12s, box-shadow .12s; }
.k.down { transform: translateY(1px) scale(.95); background: linear-gradient(180deg, #fff4e6, #ffe8cc); box-shadow: 0 0 0 2px rgba(255, 146, 43, .45), 0 4px 12px -8px rgba(247, 103, 7, .8); }
/* увеличенная буква над пальцем, как на телефоне */
.k.ch.down::after { content: attr(data-c); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); min-width: 62px; height: 70px; padding: 0 10px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 500; color: #1f2328; background: #fff; box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .04); pointer-events: none; animation: pop .12s ease-out; }
@keyframes pop { from { transform: translateX(-50%) translateY(8px) scale(.8); opacity: .4; } to { transform: translateX(-50%); opacity: 1; } }
.k.fn { flex: 1.45 1 0; font-size: 16px; font-weight: 500; color: #495057; background: linear-gradient(180deg, rgba(233, 236, 239, .85), rgba(222, 226, 230, .7)); }
.k.fn i { font-size: 22px; }
.k.shift.on { color: #fff; background: linear-gradient(160deg, #ffa94d, #f76707); }
.k.shift.caps::before { content: ""; position: absolute; bottom: 9px; left: 50%; width: 16px; height: 3px; margin-left: -8px; border-radius: 2px; background: #fff; }
.k.space { flex: 5.5 1 0; font-size: 14px; color: #868e96; font-weight: 400; }
.k.lang { flex: 1.3 1 0; font-size: 14px; gap: 5px; }
.k.lang i { font-size: 17px; }
.k.go { flex: 2.4 1 0; font-size: 17px; font-weight: 500; color: #fff; background: linear-gradient(160deg, #ffa94d, #f76707); box-shadow: 0 12px 24px -12px rgba(247, 103, 7, .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
.k.go i { font-size: 19px; }
.k.go.down { background: linear-gradient(160deg, #ff922b, #e8590c); }
.lay-num .k.ch { font-size: 22px; }

/* меню и чек не прячутся под клавиатурой */
body.vkb-open .grid { padding-bottom: var(--vkb-h, 360px); }

@media (max-width: 1100px) { .k { height: 54px; font-size: 21px; border-radius: 12px; } .vkb-row { gap: 6px; } }
@media (max-width: 760px) {
  .vkb { left: 4px !important; width: calc(100vw - 8px) !important; bottom: 4px; padding: 8px 6px 10px; border-radius: 12px; }
  .vkb-row { gap: 4px; }
  .vkb-keys { gap: 7px; }
  .k { height: 46px; font-size: 18px; border-radius: 10px; }
  .k.fn { font-size: 13px; }
  .k.go { font-size: 14px; }
  .k.go i, .k.lang i { display: none; }
  .k.ch.down::after { min-width: 44px; height: 54px; font-size: 26px; }
  .sug { height: 42px; }
  .sug .si { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .vkb.in, .k.ch.down::after { animation: none; } }
