/* On-screen keyboard: orange background (#FE8B03) with teal (#1ABEB7) accents. To swap, exchange the two colours below. */
.vk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: linear-gradient(180deg, #FE8B03, #e07700);
  border-top: 4px solid #1ABEB7;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 34px rgba(0, 0, 0, .4);
  transform: translateY(110%); visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.vk.open { transform: none; visibility: visible; transition: transform .25s ease; }

.vk-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 8px; }
.vk-head { display: flex; align-items: center; justify-content: space-between; color: #3b1d00; padding: 0 2px; font-size: .85rem; }
.vk-head b { font-weight: 600; opacity: .9; }
.vk-close { background: rgba(255,255,255,.55); color: #3b1d00; border: 0; border-radius: 999px; padding: .3rem .9rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.vk-close:hover { background: rgba(255,255,255,.8); }

#vk-keys { display: grid; row-gap: 9px; }
.vk-row { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); column-gap: 6px; }
.vk.tel .vk-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vk-key {
  min-width: 0; height: 54px; border: 0; border-radius: 10px; padding: 0;
  background: #fff; color: var(--ink); font: 600 1.3rem/1 var(--font);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3); cursor: pointer;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
  transition: background .08s, transform .08s, box-shadow .08s;
}
.vk-key:hover { background: #fff1e0; }
.vk-key.down { background: #ffd6a6; transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.vk-key.fn { background: #ffe6c7; color: #7a3d00; font-size: 1.15rem; }
.vk-key.fn.down { background: #ffc98a; }
.vk-key.on { background: #1ABEB7; color: #04312f; }
.vk-key.space { font-size: .9rem; color: var(--ink-3); }
.vk-key.enter { background: linear-gradient(180deg, #3fd3cc, #1ABEB7); color: #04312f; font-size: 1.05rem; }
.vk-key.enter.down { filter: brightness(.92); }

/* number pad */
.vk.tel .vk-inner { max-width: 380px; }
.vk.tel .vk-key { height: 58px; font-size: 1.5rem; }
.vk.tel .vk-key.enter { height: 52px; font-size: 1.05rem; }

/* Extra scroll room below the page for the keyboard. Padding on <html> (not <body>) so the page
   content never shifts under the user's finger when the keyboard opens. */
html.vk-open { padding-bottom: var(--vk-h, 300px); }
.vk-target { box-shadow: 0 0 0 4px rgba(26, 190, 183, .45) !important; border-color: #1ABEB7 !important; }

@media (max-width: 520px) {
  .vk { padding-left: 4px; padding-right: 4px; }
  .vk-row { column-gap: 4px; }
  #vk-keys { row-gap: 7px; }
  .vk-key { height: 46px; font-size: 1.1rem; border-radius: 8px; }
  .vk.tel .vk-key { height: 54px; }
}
@media (max-height: 480px) { .vk-key { height: 38px; } .vk-head { display: none; } }
