.extra-keys-bar {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-secondary);
    border-top: 1px solid var(--border-default);
    z-index: var(--z-sticky);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.15s ease-out, opacity 0.15s ease-out;
    pointer-events: none;
}

.extra-keys-bar.visible {
    max-height: 120px;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
}

.extra-keys-row {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    gap: 4px;
    padding: 2px 8px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    max-height: 60px;
    opacity: 1;
    transition: max-height 0.15s ease-out, opacity 0.15s ease-out, padding 0.15s ease-out;
}

.extra-keys-row::-webkit-scrollbar { display: none; }

.extra-keys-row-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.15s ease-out, opacity 0.15s ease-out, padding 0.15s ease-out;
}

.extra-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    background: var(--surface-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--duration-fast) var(--ease-default);
    user-select: none;
    touch-action: manipulation;
}

.extra-key:active {
    background: var(--accent-soft);
    border-color: var(--accent-default);
}

.extra-key-modifier.active {
    background: var(--accent-default);
    color: var(--text-inverse);
    border-color: var(--accent-default);
}

.extra-key-dismiss {
    margin-left: auto;
    background: var(--surface-tertiary);
    border-color: var(--border-muted, var(--border-default));
    opacity: 0.8;
}

.extra-key-clipboard {
    background: var(--surface-tertiary);
    border-color: var(--accent-default);
    border-width: 1.5px;
    color: var(--accent-default);
    font-weight: 600;
}

.extra-key-clipboard:active {
    background: var(--accent-soft);
    border-color: var(--accent-default);
    color: var(--text-inverse, var(--text-primary));
}

.extra-key-dismiss:active {
    background: var(--accent-soft);
    border-color: var(--accent-default);
    opacity: 1;
}

@media (orientation: landscape) {
    .extra-key {
        min-height: 44px;
        min-width: 44px;
        font-size: var(--text-sm);
    }
}
