.keyboard {
            position: fixed;
            bottom: 0;
            left: 50%;
            width: 100%;
            background: #e5e7eb;
            border-top: 2px solid #9ca3af;
            z-index: 9999;
            box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
        }

        .hidden {
            display: none;
        }

        /* Header (drag handle) */
        .keyboard-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #374151;
            color: #fff;
            padding: 8px 12px;
            cursor: move;
            user-select: none;
        }

        /* Body */
        .keyboard-body {
            padding: 8px;
        }

        /* Rows */
        .kb-row {
            display: flex;
            justify-content: center;
            margin-bottom: 6px;
        }

        /* Keys */
        .kb-key {
            flex: 1;
            max-width: 40px;
            height: 40px;
            margin: 1px;

            background: #fff;
            border: 1px solid #9ca3af;
            border-radius: 6px;

            font-size: 12px;
            cursor: pointer;
            box-shadow: 0 2px 0 #9ca3af;
        }

        .kb-key.special {
            background: #fef3c7;
            font-weight: bold;
        }

        .kb-key.space {
            flex: 5;
        }

        .kb-key:active {
            transform: translateY(2px);
            box-shadow: none;
            background: #dbeafe;
        }

        /* Desktop draggable look */
  @media (min-width: 769px) {
    .keyboard {
        width: 600px;
        top: 5px;        /* distance from top */
        right: 10px;      /* distance from right */
        left: auto;       /* disable left */
        bottom: auto;     /* disable bottom */
        transform: none;  /* remove centering */
        border-radius: 10px;
    }
}

        /* ===============================
        MOBILE & TABLET (≤ 768px)
        =============================== */
        @media (max-width: 768px) {

            #tamilKeyboard {
                position: fixed;
                bottom: 0;
                left: 0;
                width: 100%;
                /* max-height: 45vh;          avoid covering full screen */
                overflow-y: auto;
                border-radius: 0;
                transform: none;
            }

            .keyboard-header {
                font-size: 14px;
                padding: 10px;
            }

            /* .kb-row {
                justify-content: space-between;
            } */

            .kb-key {
                flex: 1;
                min-width: unset;
                height: 40px;
                font-size: 12px;
                margin: 1px 2px;
            }

            .kb-key.space {
                flex: 3;
            }
        }

        /* ===============================
        SMALL PHONES (≤ 480px)
        =============================== */
        @media (max-width: 480px) {

            #tamilKeyboard {
                /* max-height: 40vh; */
                padding: 2px;
            }

            .keyboard-header {
                font-size: 13px;
            }

            .kb-key {
                height: 30px;
                font-size: 10px;
                border-radius: 5px;
            }

            .kb-key.special {
                font-size: 15px;
            }
            .kb-key.space {
                flex: 3;
            }
        }
