.match-emote-setup.hud-control { grid-column: 1 / -1; justify-self: start; min-height: 42px; }

.room-dialog.match-emote-loadout {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(465px, calc(100vw - 26px));
    max-height: calc(100dvh - 24px);
}

.room-dialog.match-emote-loadout::backdrop { background: #162a3860; }
.match-emote-loadout-body { display: grid; gap: 12px; font-size: 14px; }
#matchEmoteFields { display: grid; gap: 7px; }
#matchEmoteFields picture img { display: block; }
#matchEmoteFields label {
    display: grid;
    grid-template-columns: minmax(75px, 1fr) 44px minmax(105px, 1.65fr);
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    border: 1px solid #b6804e;
    border-radius: 8px;
    background: #fff1cc;
    font-weight: 800;
}
#matchEmoteFields select {
    grid-column: 3;
    min-height: 36px;
    min-width: 0;
    padding-inline: 6px;
    border: 1px solid #a06841;
    border-radius: 6px;
    background: #fff8e6;
    color: #402616;
    font: inherit;
}
#matchEmoteSaveError { color: #852d1d; }

.match-emote-controls {
    position: fixed;
    top: max(95px, calc(env(safe-area-inset-top, 0px) + 84px));
    left: max(10px, env(safe-area-inset-left, 0px));
    z-index: 98;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #302015;
}
.match-emote-controls[hidden], .match-emote-picker[hidden],
body:has(dialog[open], #gameCanvas.is-aiming) .match-emote-controls { display: none; }
#matchEmoteToggle.arcade-control { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; }
.match-emote-picker {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: linear-gradient(#ffe7af, #ffc67c);
    border: 2px solid #372115;
    border-radius: 9px;
    box-shadow: 0 3px #794121;
}
.match-emote-slot {
    position: relative;
    width: 43px;
    height: 43px;
    padding: 1px;
    border: 1px solid #ba834e;
    border-radius: 5px;
    color: inherit;
    background: #fff5d7;
    cursor: pointer;
}
.match-emote-slot:hover { background: #fff9e9; }
.match-emote-slot img { width: 100%; height: 100%; object-fit: contain; }
.match-emote-slot kbd { position: absolute; right: 2px; bottom: 0; font: 800 11px var(--ui-display, sans-serif); }
@media (max-height: 460px) {
    .match-emote-loadout-body { gap: 6px; padding-block: 6px; }
    #matchEmoteFields { gap: 3px; }
    #matchEmoteFields label { padding-block: 0; }
    #matchEmoteFields img { height: 36px; }
}
