.unlias-emoji-picker {
    position: fixed;
    z-index: 12000;
    width: min(280px, calc(100vw - 24px));
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #1e293b;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.unlias-emoji-picker.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.unlias-emoji-picker__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

.unlias-emoji-picker__btn {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}

.unlias-emoji-picker__btn:hover,
.unlias-emoji-picker__btn:focus-visible {
    background: rgba(59, 130, 246, 0.18);
    transform: scale(1.06);
}

.unlias-emoji-picker__btn img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    pointer-events: none;
}

.unlias-chat-emoji {
    display: inline-block;
    width: 1.35em;
    height: 1.35em;
    margin: 0 0.05em;
    vertical-align: -0.22em;
    object-fit: contain;
    pointer-events: none;
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 0;
    cursor: inherit;
}

.nex-message-body img.unlias-chat-emoji,
.nex-message-body .unlias-chat-emoji,
.lobby-chat-text img.unlias-chat-emoji,
.lobby-chat-text .unlias-chat-emoji,
.log-line img.unlias-chat-emoji,
.log-line .unlias-chat-emoji,
.play-center-log img.unlias-chat-emoji {
    display: inline-block;
    width: 1.35em;
    height: 1.35em;
    max-width: none;
    max-height: none;
    margin: 0 0.05em;
    margin-top: 0;
    vertical-align: -0.22em;
    border: none;
    border-radius: 0;
    cursor: inherit;
    object-fit: contain;
    pointer-events: none;
}

.unlias-chat-composer-field {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 1.4em;
    max-height: 120px;
    overflow-y: auto;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}

.unlias-chat-composer-field:empty::before {
    content: attr(data-placeholder);
    color: var(--muted, #94a3b8);
    pointer-events: none;
}

.unlias-chat-composer-field .unlias-chat-emoji-token {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin: 0 1px;
    vertical-align: -0.2em;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.unlias-chat-composer-field--single {
    max-height: 1.6em;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.unlias-chat-composer-field--single .unlias-chat-emoji-token {
    vertical-align: -0.28em;
}

.lobby-chat-input.unlias-chat-composer-field,
.play-chat-input.unlias-chat-composer-field {
    outline: none;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    padding: 0;
}

.play-chat-input.unlias-chat-composer-field {
    flex: 1;
    min-width: 0;
    min-height: 24px;
}

.lobby-chat-input.unlias-chat-composer-field {
    padding: 8px 6px;
}

.nex-dm-compose-input.unlias-chat-composer-field {
    width: 100%;
    border: 0;
    background: transparent;
    resize: none;
    outline: none;
    font: inherit;
    color: inherit;
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
}

.nex-dm-compose-tool.unlias-chat-emoji-trigger {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.lobby-chat-tool.unlias-chat-emoji-trigger:not(:disabled),
.play-chat-tool.unlias-chat-emoji-trigger:not(:disabled),
.nex-dm-compose-tool.unlias-chat-emoji-trigger {
    cursor: pointer;
}

.lobby-chat-tool.unlias-chat-emoji-trigger:not(:disabled):hover,
.play-chat-tool.unlias-chat-emoji-trigger:not(:disabled):hover,
.nex-dm-compose-tool.unlias-chat-emoji-trigger:hover {
    color: var(--accent, #6366f1);
}
