/* G8L-239 emote picker (chat-emotes.mjs). Mobile-first glass panel under the
 * chat compose row: 5 x 5 grid for the 25 Native-allowed emotes, 44px touch
 * targets, no fixed widths so a 390px viewport never scrolls sideways. The open
 * toggle uses the glass .active button style. */
#game .social-window .emotion-palette {
  display: grid;
  grid-template-columns: none;
  gap: 6px;
  margin: 0 6px 4px;
  padding: 8px;
  border: 1px solid var(--glass-line, rgb(255 255 255 / 62%));
  border-radius: 12px;
  background: rgb(255 255 255 / 72%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 18px rgb(10 20 40 / 18%), inset 0 1px 0 rgb(255 255 255 / 60%);
  color: var(--glass-ink, #1c2a3a);
  font-family: var(--glass-font, sans-serif);
  max-height: min(56vh, 400px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#game .social-window .emotion-palette.hidden {
  display: none !important;
}
#game .emotion-palette .emote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
#game .emotion-palette .emote-close {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 16px;
  background: rgb(255 255 255 / 60%);
  color: var(--glass-ink, #1c2a3a);
  font-size: 18px;
  line-height: 1;
}
#game .emotion-palette .emote-notice {
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgb(63 105 168 / 12%);
  color: #2b4a75;
  font-size: 12px;
}
#game .emotion-palette .emote-notice.closed {
  background: rgb(120 120 120 / 14%);
  color: #5a636b;
  font-weight: 700;
  text-align: center;
}
#game .emotion-palette .emote-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
#game .emotion-palette .emote-grid button {
  display: grid;
  place-items: center;
  gap: 1px;
  min-width: 0;
  min-height: 48px;
  padding: 4px 2px;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 10px;
  background: rgb(255 255 255 / 62%);
  box-shadow: 0 1px 4px rgb(10 20 40 / 10%);
  color: var(--glass-ink, #1c2a3a);
  font-weight: 600;
  touch-action: manipulation;
}
#game .emotion-palette .emote-grid button span {
  font-size: 20px;
  line-height: 1.1;
}
#game .emotion-palette .emote-grid button small {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#game .emotion-palette .emote-grid button:not(:disabled):active {
  background: rgb(111 154 214 / 30%);
}
#game .emotion-palette .emote-grid button:disabled {
  opacity: 0.42;
  filter: grayscale(0.6);
}
@media (min-width: 720px) {
  #game .emotion-palette .emote-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}
