/* Kompakte Android-Bildschirmtastatur (System-IME bleibt aus). */

.osk-board {
  position: fixed;
  z-index: 12000;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 24px));
  padding: 8px 8px 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 14px;
  background: var(--bg, #1a2238);
  color: var(--ink, #eaf0ff);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-family: inherit;
  user-select: none;
  touch-action: manipulation;
}

.osk-board[hidden] {
  display: none;
}

.osk-handle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 6px;
  padding: 4px 2px 8px;
  color: var(--ink-3, rgba(226, 234, 255, 0.55));
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: grab;
  touch-action: none;
}

.osk-grip {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
  transform: translateX(-50%);
  pointer-events: none;
}

.osk-board.dragging,
.osk-board.dragging .osk-handle {
  cursor: grabbing;
  touch-action: none;
}

.osk-close {
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.osk-close:hover {
  background: var(--bg-subtle, rgba(255, 255, 255, 0.08));
}

.osk-row {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.osk-key {
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.06));
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.osk-key:active,
.osk-key.active {
  background: var(--bg-selected, rgba(74, 125, 255, 0.28));
}

.osk-key.wide {
  flex: 1.4 1 0;
}

.osk-key.space {
  flex: 5 1 0;
}

.osk-key.action {
  font-size: 13px;
  color: var(--ink-2, rgba(226, 234, 255, 0.8));
}
