.note-emoji-popover {
  position: absolute;
  z-index: 3000;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  overflow: hidden;
  user-select: none;
}

.note-emoji-popover.hidden {
  display: none;
}

.note-emoji-header {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  background: #fafafa;
  overflow-x: auto;
  scrollbar-width: none;
}

.note-emoji-header::-webkit-scrollbar {
  display: none;
}

.note-emoji-cat {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.note-emoji-cat.active {
  background: rgba(0, 0, 0, .06);
}

.note-emoji-body {
  max-height: 260px;
  overflow: auto;
  padding: 8px;
}

.note-emoji-section {
  margin-bottom: 10px;
}

.note-emoji-title {
  font-size: 12px;
  font-weight: 600;
  opacity: .65;
  padding: 4px 6px 8px;
}

.note-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.note-emoji-btn {
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 8px 0;
  min-height: 40px;
}

.note-emoji-btn:hover,
.note-emoji-btn:focus {
  background: rgba(0, 0, 0, .06);
  outline: none;
}

@media (max-width: 768px) {
  .note-emoji-popover {
    position: fixed;
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
    width: auto;
    max-width: none;
    border-radius: 18px;
  }

  .note-emoji-body {
    max-height: 40vh;
  }

  .note-emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}